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

x/crypto/nacl/box, x/crypto/nacl/secretbox: implement cipher.AEAD #15720

Closed
rakyll opened this issue May 17, 2016 · 2 comments
Closed

x/crypto/nacl/box, x/crypto/nacl/secretbox: implement cipher.AEAD #15720

rakyll opened this issue May 17, 2016 · 2 comments

Comments

@rakyll
Copy link
Contributor

rakyll commented May 17, 2016

Are box and secretbox packages supposed to be AEAD implementations? If so, is there a particular reason why they don't implement cipher.AEAD but introducing their slightly different API surfaces?

/cc @agl @dsymonds @adg

@rakyll rakyll added this to the Unreleased milestone May 17, 2016
@agl
Copy link
Contributor

agl commented May 17, 2016

They don't support additional data. (I.e. they are AE, not AEAD.)

They could be shoehorned into crypto.AEAD if Seal paniced on non-empty additional data. I don't know if that would be useful or a landmine.

@rakyll
Copy link
Contributor Author

rakyll commented May 17, 2016

Since they are not AEAD, there is no good reason to try to comply with the AEAD interface. Misleading APIs with panic'ing runtime behavior is uglier than anything else.

(If anyone has other arguments, please comment and/or reopen.)

@rakyll rakyll closed this as completed May 17, 2016
@golang golang locked and limited conversation to collaborators May 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants