8000 fix: x22519 encryption & decryption by maindotdev · Pull Request #88 · affinidi/affinidi-ssi-dart · GitHub
[go: up one dir, main page]

Skip to content
8000

fix: x22519 encryption & decryption - #88

Open
maindotdev wants to merge 3 commits into
didcommfrom
didcomm-x22519
Open

maindotdev wants to merge 3 commits into
didcommfrom
didcomm-x22519

Conversation

@maindotdev
Copy link
Copy Markdown

No description provided.

@maindotdev
maindotdev requested a review from a team as a code owner April 30, 2025 09:26
} else if (isXCurve(recipientPublicKeyJwk['crv'])) {
final receiverPubKeyBytes = publicKeyBytesFromJwk(recipientPublicKeyJwk);
final x25519PublicKey =
await (wallet as Bip32Ed25519Wallet).getX25519PublicKey(keyId);
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to expose getX25519PublicKey to the general Wallet interface?
Otherwise we need another solution to work with different types of wallets.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

< 8000 /form>

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?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this would work.

Comment thread lib/src/did/did_key.dart Resolved
Comment thread lib/src/did/did_key.dart Resolved
} else if (isXCurve(recipientPublicKeyJwk['crv'])) {
final receiverPubKeyBytes = publicKeyBytesFromJwk(recipientPublicKeyJwk);
final x25519PublicKey =
await (wallet as Bip32Ed25519Wallet).getX25519PublicKey(keyId);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@maindotdev
maindotdev 8000 force-pushed the didcomm-x22519 branch from cb05074 to 4d5d984 Compare April 30, 2025 10:04
keyWrapAlgorithm: keyWrapAlgorithm,
apu: removePaddingFromBase64(
base64Encode(utf8.encode(didDoc.verificationMethod[0].id))),
base64Encode(utf8.encode(x25519DidDoc.verificationMethod[0].id))),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we check more then one verificationMethod?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0