What are the key schemes, sizes, and encodings used in GUN db?
I didn't find a quick answer on searching so am adding the question here.
The keys look like:
let lee = await SEA.pair()
>lee.pub
"wfcQUDB44NhKFikH4NhWKVZfhQY-xGRpwnZIHjgmwRI.xLxhMgWvgvYHCc95L6Ni2RLmjJCMowWNbR3eQ1r4MOU"
For Signing/Verifying:
Gun uses ECDSA with the P-256 curve.
The keys are encoded in base64.
More specifically, the public key is a
.delineated concatenation of thexandyoutput parameters from runningexportKeyon a JSON web key (JWK)CryptoKeyPairobject obtained from thesubtleCrypto.exportKeyfunction (following key generation usingsubtleCrypto.generateKeywith ECDSA P256 curve).This has an overview of the
xandyparams.For Encryption/Decryption:
Gun uses ECDH P-256 cruve with same process as above (public keys stored as
lee.epubfor OP example)