EDGE Toolkit Technical Guideline

Elliptic Curve Schnorr Digital Signature Algorithm for secp256k1

BIP 340 Key Pair Generation

edgetk -pkey keygen -algorithm bip0340 -curve secp256k1 -prv "Private.pem" -pass nil -pub "Public.pem"
EC-GDSA key pair generated successfully:
Private key saved to: albanese.atwebpages.com/directrix/Private.pem
Public key saved to: albanese.atwebpages.com/directrix/Public.pem
Fingerprint: zh/b3Bq9hWDAPYDJf6RRvpkZoJdKG1uuqOUk6Mvid28=
BIP0340 (256-bit)
+-----------------+
|#O^^^^^B*O@%^^^^^|
|=E.OB^=/+*BO%^^^^|
|o o o &  o..OX&/#|
|   o .   *   =@XB|
|      . S * o=o+o|
|       . *  ..o .|
|             o o.|
|            . . o|
|                 |
+-----------------+

Private Key Details

edgetk -pkey text -key "Private.pem"
Private key details:
-----BEGIN BIP0340 PRIVATE KEY-----
MIGDAgEAMA8GBij0KAMADgYFK4EEAAoEbTBrAgEBBCCJWbhZhkRyVdqqSi3MENj+
pUdCXuOueECc+s+PFh/f36FEA0IABCA/THhZL8FvFYBRo0RZy40YBytnPe3KM+yG
kwwJHppLab7hYsVG1b7CTyftYhk6sept0fKmpViyynXz80y+VEg=
-----END BIP0340 PRIVATE KEY-----
Private-Key: (256-bit)
priv:
    89:59:b8:59:86:44:72:55:da:aa:4a:2d:cc:10:d8:
    fe:a5:47:42:5e:e3:ae:78:40:9c:fa:cf:8f:16:1f:
    df:df
pub:
    04:20:3f:4c:78:59:2f:c1:6f:15:80:51:a3:44:59:
    cb:8d:18:07:2b:67:3d:ed:ca:33:ec:86:93:0c:09:
    1e:9a:4b:69:be:e1:62:c5:46:d5:be:c2:4f:27:ed:
    62:19:3a:b1:ea:6d:d1:f2:a6:a5:58:b2:ca:75:f3:
    f3:4c:be:54:48
Curve: secp256k1

KeyID: b0ff465a5657b32d94cf1312fbdb154bce18f71e

Public Key Details

edgetk -pkey text -key "Public.pem"
Public key details:
-----BEGIN PUBLIC KEY-----
MFUwDwYGKPQoAwAOBgUrgQQACgNCAAQgP0x4WS/BbxWAUaNEWcuNGAcrZz3tyjPs
hpMMCR6aS2m+4WLFRtW+wk8n7WIZOrHqbdHypqVYssp18/NMvlRI
-----END PUBLIC KEY-----
Public-Key: (256-bit)
pub.X:
    20:3f:4c:78:59:2f:c1:6f:15:80:51:a3:44:59:cb:
    8d:18:07:2b:67:3d:ed:ca:33:ec:86:93:0c:09:1e:
    9a:4b
pub.Y:
    69:be:e1:62:c5:46:d5:be:c2:4f:27:ed:62:19:3a:
    b1:ea:6d:d1:f2:a6:a5:58:b2:ca:75:f3:f3:4c:be:
    54:48
pub:
    04:20:3f:4c:78:59:2f:c1:6f:15:80:51:a3:44:59:
    cb:8d:18:07:2b:67:3d:ed:ca:33:ec:86:93:0c:09:
    1e:9a:4b:69:be:e1:62:c5:46:d5:be:c2:4f:27:ed:
    62:19:3a:b1:ea:6d:d1:f2:a6:a5:58:b2:ca:75:f3:
    f3:4c:be:54:48
Curve: secp256k1

Digital Signature Generation

edgetk -pkey sign -algorithm bip0340 -md radiogatun -key "Private.pem" "test.txt" > sign.txt
Digital signature generated successfully:
30460221008f9f0de5c7e45aab99522d680ef3ee9fea651e46a3653fa8bc0963db0de63acc022100b12c8a37bd85b59c2f1145ed609a5502022d2a5a5152a45df93621da6d866373

Digital Signature Verification

edgetk -pkey verify -algorithm bip0340 -md radiogatun -key "Public.pem" -signature "30460221008f9f0de5c7e45aab99522d680ef3ee9fea651e46a3653fa8bc0963db0de63acc022100b12c8a37bd85b59c2f1145ed609a5502022d2a5a5152a45df93621da6d866373" "test.txt"
Signature verified successfully:
Verified: true