-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: x/crypto/blake2s: add New(size, key) #32417
Comments
@FiloSottile, saw your tweet here How does this issue request fall wrt to your perspectives on security v safety of golang standard crypto lib? Should we close this issue because it perhaps asks for something unsafe? |
With the right minimums, it can be safe, but any new API adds confusion. I guess it matter whether you need a non-128-or-256 size for compatibility (in which case, with what?), or you'd just like an API that provides both. The former is a stronger case. |
I vote for this request as well.
In fact adding
There are cases when blake2s used with non-128-or-256 keys. For example in And Linux kernel supports these key sizes as well. See https://github.com/torvalds/linux/blob/31caf8b2a847214be856f843e251fc2ed2cd1075/include/crypto/blake2s.h#L19 Getting the golang's crypto library in parity with widely used practice would be a great thing. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I want to be able to export newDigest for blake2s. blake2s.New128 and blake2s.New256 are great, but I want to interface with one function that can take hash size as an input (like blake2b.New)
What did you expect to see?
I want something like blake2b.New, but for blake2s. One way to make that easy is just export blake2s.newDigest
What did you see instead?
function isn't available for export in the package
The text was updated successfully, but these errors were encountered: