decentralized-identity / decentralized-identity/veramo
Add support for Bls12381G2 keys in kms-local
- Dominant language
- TypeScript
- Stars
- 543
- Forks
- 137
- Avg merge
- 12m
- Merged PRs (30d)
- 2
Description
The kms-local implementation only supports a fixed set of key types. It is not possible to extend the current implementation as it is today to include a new key type like 'Bls12381G2'.
The asManagedKeyInfoInner method where the key types are checked is private. If you derive the base class to add new key types, you basically need to copy/clone that private method for supporting the existing key types (Ed25519, Secp256k1 and X25519) + new ones (Bls12381G2). Also that method expects 'RequireOnly)' as input. That assumes the public key can actually be derived from the private key all the time. I haven't found any implementation for Bls12381G2 keys that derive the public key from the private one, so I was expecting to also pass the public key as optional if it can not be derived.
This is for generating a new DID key for Bls12381G2 keys.
I've implemented something that works, but as I said, it is not ideal as I had to duplicate code from your implementation.
https://github.com/pcibraro/veramo/blob/next/packages/kms-bbs/src/key-management-system.ts
Contributor guide
Assessment
This issue has not been assessed yet.