Closed tplooker closed 3 years ago
Provider implements deriveBits function. I think it's enough for the key derivation.
webcrypto-core
implements deriveKey in SubtleCrypto
class.
deriveKey
- derive bits
- import key
Does it work for you? Why do you want deriveKey
in the Provider
class?
Hi, in general we are interested in seeing if we can expand support in this library for X25519/Curve25519 for DH and ed25519 for EDDSA. Most of the operations are relatively straightforward to implement.
We would also like to support a derive key operation that converts a ed25519 from an x25519 hence the interest in the derive key operation.
webcrypto-core
is base project which doesn't implement crypto mechanisms. I'm using that project for the arguments checking only.
See NodeJS WebCrypto and (Browser WebCrypto)(https://github.com/PeculiarVentures/webcrypto-liner) implementations
We would also like to support a derive key operation that converts a ed25519 from an x25519 hence the interest in the derive key operation
I'm not sure this is a good idea. You cant convert ECDSA to ECDH without exportKey
and importKey
functions. Use standard operations to implement this conversion.
What about deriveKey
, as I told before you must implement deriveBits
function. After that, you can start to use deriveKey
from the SubtleCrypto class (eg ECDH key derivation).
Hi, I realize this is just the input validation layer however it must support validation of the parameters for EDDSA and ECDH with X25519. I will review the example you have linked. Would you accept a PR for an addition of the this?
We are interested in supporting these however we do want to make sure we do so in a way that’s architecture consistent.
@peculiar/webcrypto@1.1.6
supports those mechanisms
https://github.com/PeculiarVentures/webcrypto/pull/25
Hi is there any plan to support or are you will to accept a PR that adds using the deriveKey() api, in the core provider?