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 and enable AES CCM ciphers #271

Merged
merged 4 commits into from
Mar 24, 2018
Merged

Add and enable AES CCM ciphers #271

merged 4 commits into from
Mar 24, 2018

Conversation

ocheron
Copy link
Contributor

@ocheron ocheron commented Mar 18, 2018

No reason to hold this any longer now that cryptonite-0.25 is in lts.

@vdukhovni Can you look if I got the order of ciphersuites right?

Basically in ciphersuite_strong I priorize AES256CCM over AES128GCM for security reason.
In ciphersuite_default, order is reversed for performance reason.

CCM8 is only in ciphersuite_all because I don't believe it's often used. It's only half of an AEAD.

@kazu-yamamoto
Copy link
Collaborator

Would you show the document that says CCM is stronger than GCM?

@ocheron
Copy link
Contributor Author

ocheron commented Mar 19, 2018

I don't think there is. But 256 is stronger than 128, isn't it?

@kazu-yamamoto
Copy link
Collaborator

Oh. I didn't notice the bit sizes. Probably you are right.

BTW, do you know why GCM is used instead of CCM in the main stream such as HTTP/2?

@ocheron
Copy link
Contributor Author

ocheron commented Mar 22, 2018

CCM needs two AES operations per block, so is twice slower.

@kazu-yamamoto
Copy link
Collaborator

@ocheron Thank you for the explanation! I did not know it.

@kazu-yamamoto
Copy link
Collaborator

Ping @vdukhovni

@vdukhovni
Copy link
Collaborator

Given the performance impact, I'm reluctant to say that CCM is sufficiently stronger over GCM to justify the preference. But I am not a cryptographer. This question is better for the cryptography list: http://www.metzdowd.com/mailman/listinfo/cryptography

@vdukhovni
Copy link
Collaborator

See also: https://tools.ietf.org/html/draft-ietf-tls-iana-registry-updates-04#section-9
Note that CCM8 is not recommended, and we should probably not support it at all.

@vdukhovni
Copy link
Collaborator

A more focused forum for such a question may be the TLS working group.

@vincenthz
Copy link
Collaborator

vincenthz commented Mar 24, 2018

our current of implementation of GCM is not sufficiently optimised, so it's even possible that 2 block encryption are currenlty faster than 1 block encryption + 1 GFmul.

@vincenthz vincenthz merged commit 543f76b into haskell-tls:master Mar 24, 2018
@vincenthz
Copy link
Collaborator

👍 nice addition and thanks for keeping track of haskell-ci/travis stuff too !

@vdukhovni
Copy link
Collaborator

Any appetite for removing CCM8? I think it is not recommended for TLS.

@ocheron
Copy link
Contributor Author

ocheron commented Mar 25, 2018

I included CCM8 mainly because there is a cipher defined in the TLS 1.3 draft.
But I can remove if preferred.

@kazu-yamamoto
Copy link
Collaborator

Any appetite for removing CCM8? I think it is not recommended for TLS.

@vdukhovni Any references which suggest that CCM8 is not recommended for TLS?

@ocheron ocheron deleted the ccm-ciphers branch May 27, 2018 15:41
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

4 participants