Sphereon-Opensource/SIOP-OID4VP

Support for more signing algorithms

trusch opened this issue · 4 comments

trusch commented

There are a lot of DID methods which depend on other signing algorithms. I feel that at least ed25519 and sr25519 should be added to support polkadot based DID solutions.

Is this something that might have a chance to land in here? I could also have a look how to add it, if I get positive feedback!

Great project btw. really appreciated.

trusch commented

I see now that support for more signing algorithms would need to be added to decentralized-identity/did-jwt. I also created an issue there: decentralized-identity/did-jwt#282

nklomp commented

Hi @trusch thanks

Indeed the best place is to get it into did-jwt, but you can create a Signer implementation yourself that implements this interface: https://github.com/decentralized-identity/did-jwt/blob/056b2e422896436b781ecab2b466bacf72708d23/src/JWT.ts#L9
If it gets merged we can update our checks for the internal signature (basically DID-JWT supported signers).

We have also created something similar in https://github.com/Sphereon-Opensource/SSI-SDK-crypto-extensions/blob/e91448d1d692ddc6e141bcce806a62466a172d32/packages/kms-local/src/x509/rsa-signer.ts#L46

If you would create your own implementation you would be able to use the SuppliedSigner option with your own Signer.
See

async function signDidJwtSupplied(

nklomp commented

In

withSuppliedSignature(
you can see the RP builder option for a SuppliedSignature.

Note that the signature argument in there is actually a signer, so the name is a bit of. Also note that the code signature of that property is exactly the same as the did-jwt Signer interface/type

nklomp commented

Closing, as it should be possible