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

Required or recommended encryption algorithms #2

Open
stpeter opened this issue Feb 5, 2018 · 5 comments
Open

Required or recommended encryption algorithms #2

stpeter opened this issue Feb 5, 2018 · 5 comments

Comments

@stpeter
Copy link
Collaborator

stpeter commented Feb 5, 2018

The encryption proposal does not specific which JOSE encryption algorithms are required or recommended. A list of algorithms can be found at https://www.iana.org/assignments/jose/jose.xhtml#web-signature-encryption-algorithms ...

@adrianhopebailie
Copy link
Contributor

The many known-to-be-weak-or-compromised algos that are allowed is commonly cited as a weakness of JWT. I suggest we define a limited profile that are allowed in our use case.

This is explicitly allowed by RFC 7519 in the steps for validating a JWT:

  1. Verify that the resulting JOSE Header includes only parameters
    and values whose syntax and semantics are both understood and
    supported or that are specified as being ignored when not
    understood.

@msporny
Copy link
Member

msporny commented Feb 15, 2018

The way we've done this in the Verifiable Claims WG is to define cryptography suites for Linked Data Signatures/Proofs to make it easier on developers. So, a developer would pick something like "RsaSignature2018" or "RsaXYZEncryption2018" and the spec for the crypto suite would specify a number of parameters to use in the JWS. Example for a signature (which also applies to encryption) here: https://w3c.github.io/vc-data-model/#proofs-aka-signatures

More on crypto suites here:

https://w3c-dvcg.github.io/ld-signatures/#signature-suites

@stpeter
Copy link
Collaborator Author

stpeter commented Mar 8, 2018

Given that the proposal uses JWE, it seems best to use the "recommended+" algorithms from Section 4.1 of RFC 7518, such as RSA-OAEP for encryption of the Content Encryption Key (CEK) and ECDH-ES for encryption of the content itself.

@adrianhopebailie
Copy link
Contributor

The sample from @MasterKeyur in https://github.com/w3c/webpayments-crypto/blob/master/payment-encryption.md uses RSA-OAEP for key exchange and AES-GCM for the content encryption.

+1 to these as the initial set of supported algorithms in our JWE profile.

@MasterKeyur
Copy link
Collaborator

I appreciate the feedback. The idea was this to be starting point for payment request encryption spec. +1 with limited algorithm that are reviewed by security specialist as well as that are performant.

Also I did not use signatures specifically because we would need separate key pair for it.

I did not use ECDH-ES for content encryption as it does not generate MAC. For key pair generation we can look at ECDH.

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

No branches or pull requests

4 participants