[Bug 26411] Caller can't force JWK to be distinguished as public or private key

https://www.w3.org/Bugs/Public/show_bug.cgi?id=26411

--- Comment #3 from Ryan Sleevi <sleevi@google.com> ---
(In reply to Mark Watson from comment #2)
> Perhaps the import / unwrap should return a KeyPair in this case ?

I'd be a little concerned with consistency across algorithms, in the event
private key did not contain the public representation.

While I haven't thought through the implications, and I doubt it would directly
affect us, I note that a number of smart cards have 'compressed' format
representations where they can omit storing the public key ("for
performance!"), so from the native/smart-card land, I've developed a bit of an
aversion to API-coupling public/private keys as a "sure thing".

But like I said, I don't really think it's a problem. An alternative solution
would be "two" formats, since "SPKI" and "PKCS8" are functionally "DER: Public
Key" and "DER: Private Key", so you could argue (a bit perversely) that we
should have "JWK: Public Key" and "JWK: Private Key" formats.

And this isn't beginning to touch the world of ECDH, or how things like "raw"
would/should behave.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Wednesday, 23 July 2014 01:45:58 UTC