🤩

Erlang で Curve25519 の鍵ペアを生成する

2020/11/18に公開

{公開鍵, 秘密鍵} で生成される。

> crypto:generate_key(eddh, x25519).
{<<17,208,221,79,149,125,123,216,172,52,158,198,249,246,
   106,251,169,231,160,90,236,82,201,216,91,211,125,226,
   ...>>,
 <<192,98,95,160,250,146,4,46,149,205,6,64,39,56,102,80,
   15,149,133,125,228,68,70,14,193,89,99,...>>}
> crypto:generate_key(eddsa, ed25519).
{<<23,223,89,138,11,191,239,194,61,181,99,43,242,175,244,
   198,200,226,232,43,56,113,201,68,189,88,233,244,...>>,
 <<78,220,37,196,142,60,167,118,12,139,109,2,202,203,63,
   53,80,173,252,153,72,252,239,124,170,226,170,...>>}

Discussion