Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RSA public key (x.509 Encoded) #195

Closed
wants to merge 1 commit into from
Closed

Conversation

b5
Copy link
Contributor

@b5 b5 commented Sep 8, 2020

Add a prefix for raw (not libp2p) x.509 public key bytes. I think we should have this for a parity with other public key formats.

It's worth adding now because it'll make writing code that does key rotation from RSA -> ED25519 with open standards possible.

Regarding the 0x5d prefix There's a W3C working group draft spec floating out in the wild that would require this addition to make RSA keys work, and this issue makes reference to 0x5d as the chosen prefix. I've reused this value here to be just slightly above picking at random.

@rvagg
Copy link
Member

rvagg commented Sep 9, 2020

I think we're trying to avoid assigning single-byte entries as much as possible. Perhaps this might rise above the bar, although I don't really have a feel for where that bar might be and how close this comes to it. @Stebalien @vmx, thoughts?

@vmx
Copy link
Member

vmx commented Sep 9, 2020

To me the bar for single byte entries is. Would it be a problem to put it into the 2-bytes (or more) range? If the answer is "why not", then definitely put it into that other range.

@b5 Is there a reason why it needs to be in the single byte range, or could it well be in some other range?

@jonnycrunch
Copy link

@jonnycrunch just adding myself to the discussion as a reminder that is cool stuff @b5 and I need to understand it more!

@b5
Copy link
Contributor Author

b5 commented Sep 11, 2020

No reason at all it needs to be in the single byte range. Given the use case is mostly around migration, I agree it makes more sense to use the two byte (or more range). I mainly kicked this PR off to get this discussion going, and would welcome a byte assignment from spec maintainers.

At the risk of being presumptuous, I think RSA is starting to lose favourability in circles that will be interested in multiformats, (even in our case we're interested in this multicodec so we can transition to Edwards curve keys), so I fully agree it should move to the 2 bytes or more range.

If others don't have a suggestion in the next day or two I'll pick something in the 2 byte range to keep the conversation moving, but I'd much prefer to be told what works here :)

@rvagg
Copy link
Member

rvagg commented Sep 12, 2020

We have a block in 0x1200 that was going to be curve keys, but we could just as easily say that 0x1200 is -pub keys and 0x1300 is -priv keys, so this would probably fit there. They're all key anyway. 🤷

@expede
Copy link
Contributor

expede commented Aug 26, 2021

@b5 just moving the conversation back here. I'd love to see this get merged; we depend on RSA for did:key and have currently rolled our own waiting for this to settle. What do we still need to figure out?

@rvagg
Copy link
Member

rvagg commented Aug 26, 2021

Should be good to land if we move it up into the 0x12xx and rebase to current master.

@expede expede mentioned this pull request Aug 29, 2021
@b5
Copy link
Contributor Author

b5 commented Aug 29, 2021

superseded by #226

@b5 b5 closed this Aug 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants