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

Different values of "tag" in cifra and libsodium for the same function #6

Closed
monicaphalswal opened this issue Feb 15, 2017 · 5 comments

Comments

@MalteJ
Copy link

MalteJ commented Feb 24, 2017

same problem here

@ctz
Copy link
Owner

ctz commented Feb 24, 2017

Could you post some code or test vectors?

I just tried:

key: 6b65792e6b65792e6b65792e6b65792e6b65792e6b65792e6b65792e6b65792e
nonce: 6e6f6e63652e6e6f6e63652e
aad: 616164
msg: 6d657373616765
cipher: 5d9c0a9fe7d5e5
tag: 2824af504fdce6e85fc9d80c7c2a9f38

And both libsodium/cifra agree. Cifra also passes the known answer tests in the RFC (though it's possible those are poorly designed and not exhaustive).

@ctz
Copy link
Owner

ctz commented Feb 24, 2017

Actually, the test vectors from the RFC don't cover |aad| == 0, and cifra gets this case wrong. Fix incoming.

@ctz
Copy link
Owner

ctz commented Feb 24, 2017

Fixed in b6cdf9f. Sorry for the inconvenience and thanks for the report.

@ctz ctz closed this as completed Feb 24, 2017
@MalteJ
Copy link

MalteJ commented Feb 27, 2017

Great!
Thank you! :)

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

3 participants