-
Notifications
You must be signed in to change notification settings - Fork 473
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
Wycheproof failing GCM test - invalid/modified tag #451
Conversation
Exactly the same trouble with ChaCha20Poly1305 - failing test (one of them):
|
@sjaeckel a question for you (pls answer without looking into doc and/or code) Let us have the following code: err = gcm_memory(idx, key, sizeof(key), iv, sizeof(iv), NULL, 0,
pt, sizeof(ct), ct, tag, &taglen, GCM_DECRYPT); Do you expect that the caller should fill the tag + taglen before calling |
ah the good ol' TBH I've no clue, I'd have to have a look in the code or docs... Btw. there's still #307 ;) |
did I already mention that this is super inconsistent with e.g. (or the other AEAD algos which don't have a |
Yes, it is a mess. And BTW I have a security hole in my perl bindings DCIT/perl-CryptX#47 as I was expecting that it validates the tag (which it doesn't). What is the proper fix? I tend to like more two separate functions: |
BTW the doc for A possible "fix" may be just updating doc and declare the current behaviour, IMO slightly unexpected, as a feature. Or can we afford an API breakage here? |
ooops
very good question! we did put some effort into cleaning-up the API of we could re-use that pattern? Otherwise I'd be fine with two separate functions, but should we then change that in CCM as well?! |
I have the code aligning |
1822605
to
2a7f1f8
Compare
becee0c
to
f0b77d3
Compare
f0b77d3
to
7d85676
Compare
The wycheproof GCM test in question:
The trouble is that we do not reject invalid tag
d9847dbc326a06e988c77ad3863e6083
, corresponding valid tag has the first byted8
.