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 incremental CCM authentication processing #55

Merged
merged 1 commit into from
Nov 2, 2014
Merged

Add incremental CCM authentication processing #55

merged 1 commit into from
Nov 2, 2014

Conversation

pascal-brand38
Copy link

CCM is only meant for packet mode where the length of the input is known in
advance. Since it is a packet mode function, CCM only had one function that
performs the protocol.

However, incremental authentication is usefull in some usecases. It also
ensure some kind of coherencies when processing with a given authentication
mode or another. To achieve this aim, this commit adds the following functions:
ccm_init()
ccm_add_aad()
cm_add_nonce()
ccm_process()
ccm_done()
ccm_reset()
as well as the data structure
ccm_state

Change-Id: I5225a42bb098708c4af07518b561bb00f85bc243

CCM is only meant for packet mode where the length of the input is known in
advance. Since it is a packet mode function, CCM only had one function that
performs the protocol.

However, incremental authentication is usefull in some usecases. It also
ensure some kind of coherencies when processing with a given authentication
mode or another. To achieve this aim, this commit adds the following functions:
    ccm_init()
    ccm_add_aad()
    cm_add_nonce()
    ccm_process()
    ccm_done()
    ccm_reset()
as well as the data structure
    ccm_state

Change-Id: I5225a42bb098708c4af07518b561bb00f85bc243
@pascal-brand38
Copy link
Author

Did anyone get a chance to look at it?
Thanks.

@sjaeckel
Copy link
Member

Yeah I did and that's the result :(

mac_test......
185: x=0 y=1
tag is     contents: 
7c 20 51 a7 ae 20 0b cf 
tag should contents: 
17 e8 d1 2c fd f9 26 e0 
Algorithm failed test vectors. (5)
mac_test.c:31:ccm_test()

Probably I got something wrong?
The testvectors should be fine as they're from NIST

@sjaeckel
Copy link
Member

please find my changes here

@sjaeckel sjaeckel merged commit 992506c into libtom:develop Nov 2, 2014
sjaeckel added a commit that referenced this pull request Nov 2, 2014
@sjaeckel
Copy link
Member

sjaeckel commented Nov 2, 2014

Would you mind adding documentation please?

@pascal-brand38
Copy link
Author

Pull-request proposed at #56

@karel-m karel-m mentioned this pull request Jul 7, 2016
@sjaeckel sjaeckel modified the milestone: v2.0.0 Feb 21, 2017
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

2 participants