EOSIO / eosjs-ecc

Elliptic curve cryptography functions: Private Key, Public Key, Signature, AES, Encryption, Decryption
288 stars 119 forks source link

Standardize public, private, and signature key formats #12

Closed jcalfee closed 6 years ago

jcalfee commented 6 years ago

I would like to standardize on this format: PUB_K1_xxx and PUB_R1_xxx and SIG_xxx. The original WIF private and EOS public key can be accepted but the format would be normalized to the new format.

Back end changes to the private, public, and signature formats: https://github.com/EOSIO/eos/commit/573be193254661b1c9d47b4467080ed992dac15c

Delimiter changed from . to _ https://github.com/EOSIO/eos/commit/f55f431f8fb4d91e8d872d281ffd3a1cd9de3758

EOSpubkey    => PUB_K1_base58pubkey (public key w/legacy fallback) [unit tests](https://github.com/EOSIO/eos/blob/master/libraries/fc/test/crypto/test_cypher_suites.cpp)
EOSsignature => SIG_K1_base58sig (rename signature prefix)
WIF          => PVT_K1_base58private private key prefix

This change affects eosjs-keygen ..

jcalfee commented 6 years ago

This is finished.. We can make a new ticket for the R1 curve. A use-case for R1 would help if we need to add that..