-
Notifications
You must be signed in to change notification settings - Fork 162
Separate all crypto implementation details from Pack/Unpack #475
Comments
Expected to be needed for the JWE DIDcomm envelope format to be accepted by the IETF, probably not necessary for the legacy envelope format. Uncertain how soon we'll need it. |
What our Packers need as part of this: For JWE:
For Legacy:
A note on public key conversion - key types won't necessarily support this (or be able to do it safely), but the pack/unpack algorithms could be modified to operate using only encryption keys, with some updates to the draft specs. |
For the JWE envelope, we should also support all public key formats and algorithms that are being specified in the W3C DID WG & DIF Interop Group. For public key formats, this is specifically:
For algorithms, we should support:
|
I think there's a conflation here between two interfaces - one interface is the "logical operations" interface - a crypto user might need, for example, a key wrapping algorithm, a password KDF, a secret-based KDF, an AEAD stream cipher, DH, Sign/Verify, etc. Those can be provided by different algorithms, and we could provide those algorithms in one package - for example, the Ed25519/X25519 Xc20P suite that we are essentially using right now. We could also provide those algorithms as separate interfaces, and I don't know which is cleaner. To allow the Packers, for example, to be independent of the crypto operation algorithms, then they need to consume an interface that provides the logical operations, so with a suitable implementation, any of RSA, ed25519, and secp256k1 could be used for Diffie-Hellman, for example. The other interface being conflated is the interface to the crypto plugin itself - this is interface which we will fulfill with a single provider in an aries instance, which provides all of the crypto operations that aries components need. If there is any circumstance where we need multiple alternatives available to an aries instance for the same logical operation (you provided such a circumstance above @troyronda ), then we need to have the crypto plugin have multiple implementations of the relevant logical-operation interfaces. So, with that example, a crypto plugin that satisfies the relevant specs would have 3 implementations of the public-key-logical-operation interface; for RSA, Ed25519, and secp256k1. |
This is the last change about X25519 keys for ECDH KW. It updates the old ECDH key types into the new type names and add the X25519 key type as well. Also part of this change is the removal of remnant code from legacyKMS which was removed from the framework last year. closes hyperledger-archives#2447, hyperledger-archives#1684, hyperledger-archives#815 also part of hyperledger-archives#857 closes hyperledger-archives#475, hyperledger-archives#596 Signed-off-by: Baha Shaaban <[email protected]>
This is the last change about X25519 keys for ECDH KW. It updates the old ECDH key types into the new type names and add the X25519 key type as well. It includes JWE encryption/decryption updates to support XC20P content encryption along with recipients kw using both NIST P curved keys and X25519 keys. Also part of this change is the removal of remnant code from legacyKMS which was removed from the framework last year. closes hyperledger-archives#2447 closes hyperledger-archives#1684 closes hyperledger-archives#815 closes hyperledger-archives#475 closes hyperledger-archives#596 also part of hyperledger-archives#857 Signed-off-by: Baha Shaaban <[email protected]>
This is the last change about X25519 keys for ECDH KW. It updates the old ECDH key types into the new type names and add the X25519 key type as well. It includes JWE encryption/decryption updates to support XC20P content encryption along with recipients kw using both NIST P curved keys and X25519 keys. Also part of this change is the removal of remnant code from legacyKMS which was removed from the framework last year. closes hyperledger-archives#2447 closes hyperledger-archives#1684 closes hyperledger-archives#815 closes hyperledger-archives#475 closes hyperledger-archives#596 also part of hyperledger-archives#857 Signed-off-by: Baha Shaaban <[email protected]>
This is the last change about X25519 keys for ECDH KW. It updates the old ECDH key types into the new type names and add the X25519 key type as well. It includes JWE encryption/decryption updates to support XC20P content encryption along with recipients kw using both NIST P curved keys and X25519 keys. Also part of this change is the removal of remnant code from legacyKMS which was removed from the framework last year. closes hyperledger-archives#2447 closes hyperledger-archives#1684 closes hyperledger-archives#815 closes hyperledger-archives#475 closes hyperledger-archives#596 also part of hyperledger-archives#857 Signed-off-by: Baha Shaaban <[email protected]>
This is the last change about X25519 keys for ECDH KW. It updates the old ECDH key types into the new type names and add the X25519 key type as well. It includes JWE encryption/decryption updates to support XC20P content encryption along with recipients kw using both NIST P curved keys and X25519 keys. Also part of this change is the removal of remnant code from legacyKMS which was removed from the framework last year. closes hyperledger-archives#2447 closes hyperledger-archives#1684 closes hyperledger-archives#815 closes hyperledger-archives#475 closes hyperledger-archives#596 also part of hyperledger-archives#857 Signed-off-by: Baha Shaaban <[email protected]>
This is the last change about X25519 keys for ECDH KW. It updates the old ECDH key types into the new type names and add the X25519 key type as well. It includes JWE encryption/decryption updates to support XC20P content encryption along with recipients kw using both NIST P curved keys and X25519 keys. Also part of this change is the removal of remnant code from legacyKMS which was removed from the framework last year. closes hyperledger-archives#2447 closes hyperledger-archives#1684 closes hyperledger-archives#815 closes hyperledger-archives#475 closes hyperledger-archives#596 also part of hyperledger-archives#857 Signed-off-by: Baha Shaaban <[email protected]>
This is the last change about X25519 keys for ECDH KW. It updates the old ECDH key types into the new type names and add the X25519 key type as well. It includes JWE encryption/decryption updates to support XC20P content encryption along with recipients kw using both NIST P curved keys and X25519 keys. Also part of this change is the removal of remnant code from legacyKMS which was removed from the framework last year. closes hyperledger-archives#2447 closes hyperledger-archives#1684 closes hyperledger-archives#815 closes hyperledger-archives#475 closes hyperledger-archives#596 also part of hyperledger-archives#857 Signed-off-by: Baha Shaaban <[email protected]>
Extending #352 and #385, make pack/unpack invoke an injectable crypto-operator (could call it a crypter and do some renaming) for all encryption, decryption, AEAD, etc, using format-agnostic parameters, so the envelope format can be algorithm-independent.
The text was updated successfully, but these errors were encountered: