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 thex
andy
output parameters from runningexportKey
on a JSON web key (JWK)CryptoKeyPair
object obtained from thesubtleCrypto.exportKey
function (following key generation usingsubtleCrypto.generateKey
with ECDSA P256 curve).This has an overview of the
x
andy
params.For Encryption/Decryption:
Gun uses ECDH P-256 cruve with same process as above (public keys stored as
lee.epub
for OP example)