w3c-ccg / did-method-key

DID (Decentralized Identifier) did:key method for embedding keys in DID urls
https://w3c-ccg.github.io/did-method-key
Other
18 stars 12 forks source link

Describe RSA public key representation #45

Closed clehner closed 2 years ago

clehner commented 2 years ago

Re: https://github.com/w3c-ccg/did-method-key/pull/41#issuecomment-977522794

This is to offer a way to support a subset of RSA keys using a subset of ASN.1, using specific modulus lengths and exponents.

clehner commented 2 years ago

@OR13, @expede, @b5, can any of you confirm the byte sequences in this PR?

expede commented 2 years ago

@clehner double checking the format, I believe that to be correct, yes 👍 (I was confused initially, I'm used to seeing this in hex — it may be worth noting that this is in decimal, though it should also be clear from some of the elements being 3 digits long).

Also a small suggestion: if the purpose is to explain what the breakdown is, it may be helpful to be explicit about what each segment contains, even though that would repeat what's in the DER spec (e.g. the last 5 bytes are a 3-byte int descriptor and the exponent).