-
Notifications
You must be signed in to change notification settings - Fork 18k
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
proposal: crypto/cipher: detached mode AEAD Seal/Open #24990
Comments
Based on discussion with @agl, we want something like this. We need to decide what shape the API will take. If it will be different from BoringSSL we'll need a good reason to ignore their decision. |
@FiloSottile So, how to split at this moment? It seems to "append", so can i just get the last 32 length? |
@jyxjjj Yes, but the GCM tag is normally 16 bytes. You can get its length by calling |
Thank you. |
Adding to proposal minutes. Is this still something people need? |
This proposal has been added to the active column of the proposals project |
Based on the discussion above, this proposal seems like a likely decline. |
Yes. Some protocols put the authentication tag before the ciphertext. Having this new API could help simplify the implementation of such protocols. |
Which protocols do that? What is the API you would need for those? |
This proposal has been added to the active column of the proposals project |
/cc @golang/security |
I don't remember why I was interested in this in 2018, but I know I haven't needed it since. Note that this is exclusively a performance improvement: you can already allocate a slice, put the Given how little this is used, and how there's a workaround for those use cases, I don't think we should do this. |
I don't remember too, and also haven't need it since. But I don't think we don't need it. Even we have other way to get them as we want. To copy them separately will be more like C behavior. Will be more easy to Integrate with other languages. Be more friendly to beginners. |
Based on the discussion above, this proposal seems like a likely decline. |
No change in consensus, so declined. |
The AEAD interface currently exposes only combined mode operation with authentication tag appended to the cipher text.
The popular crypto library libsodium supports detached mode operation where authentication tag and cipher text can be at different locations (e.g. some applications may need to store authentication tag before cipher text).
Due to Go1 compatibility requirement the existing AEAD interface cannot be changed. Therefore I propose we add a new interface DetachedAEAD.
The text was updated successfully, but these errors were encountered: