paulmillr / noble-secp256k1

Fastest 4KB JS implementation of secp256k1 signatures and ECDH
https://paulmillr.com/noble
MIT License
757 stars 114 forks source link

why secp256k1.utils.randomPrivateKey() produce a 32 bytes key? #116

Closed zzzh closed 1 year ago

zzzh commented 1 year ago

And so do the secp256k1.getPublicKey(). Shouldn't they produce keys of 64 bytes?

BTW: I tried it in noble/curves, guess it's the same here.

paulmillr commented 1 year ago

Because keys are 32 byte, not 64.