indutny / elliptic

Fast Elliptic Curve Cryptography in plain javascript
1.68k stars 373 forks source link

KeyPair.fromPublic: returns a KeyPair? #305

Open fauxbytes opened 1 year ago

fauxbytes commented 1 year ago

IIUC, above function is used to recover a full public key from its compressed variant.

It returns a KeyPair. I could not find any particular docs on this type, so assume it stands for a key "pair' - meaning a public key and a private key. But then, isn't fromPublic returning only the public part? In what sense then is it a key pair?