Repository navigation
fix: x22519 encryption & decryption - #88
maindotdev wants to merge 3 commits into
Conversation
| } else if (isXCurve(recipientPublicKeyJwk['crv'])) { | ||
| final receiverPubKeyBytes = publicKeyBytesFromJwk(recipientPublicKeyJwk); | ||
| final x25519PublicKey = | ||
| await (wallet as Bip32Ed25519Wallet).getX25519PublicKey(keyId); |
There was a problem hiding this comment.
Does it make sense to expose getX25519PublicKey to the general Wallet interface?
Otherwise we need another solution to work with different types of wallets.
There was a problem hiding this comment.
We can't assume the wallet implementation here, a different solution is needed.
I've seen some implementations of DID documents add the x25519 PublicKey to the did document together with the edwards key. Would it work in this case to take in the did?
91d2e77 to
527daa0
Compare
527daa0 to
ca68024
Compare
| } else if (isXCurve(recipientPublicKeyJwk['crv'])) { | ||
| final receiverPubKeyBytes = publicKeyBytesFromJwk(recipientPublicKeyJwk); | ||
| final x25519PublicKey = | ||
| await (wallet as Bip32Ed25519Wallet).getX25519PublicKey(keyId); |
There was a problem hiding this comment.
We can't assume the wallet implementation here, a different solution is needed.
I've seen some implementations of DID documents add the x25519 PublicKey to the did document together with the edwards key. Would it work in this case to take in the did?
cb05074 to
4d5d984
Compare
| keyWrapAlgorithm: keyWrapAlgorithm, | ||
| apu: removePaddingFromBase64( | ||
| base64Encode(utf8.encode(didDoc.verificationMethod[0].id))), | ||
| base64Encode(utf8.encode(x25519DidDoc.verificationMethod[0].id))), |
There was a problem hiding this comment.
Should we check more then one verificationMethod?
No description provided.