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/auth: Use constants consistently in Verify #21788

Closed
tv42 opened this issue Sep 7, 2017 · 3 comments
Closed

x/crypto/nacl/auth: Use constants consistently in Verify #21788

tv42 opened this issue Sep 7, 2017 · 3 comments

Comments

@tv42
Copy link

tv42 commented Sep 7, 2017

https://godoc.org/golang.org/x/crypto/nacl/auth has

const (
    // KeySize is the size, in bytes, of an authentication key.
    KeySize = 32
)
func Sum(m []byte, key *[KeySize]byte) *[Size]byte
func Verify(digest []byte, m []byte, key *[32]byte) bool

Is there a good reason Verify doesn't take key *[KeySize]byte? This seems like the existence of the constant was forgotten.

@gopherbot gopherbot added this to the Unreleased milestone Sep 7, 2017
@ianlancetaylor
Copy link
Contributor

CC @kevinburke

@kevinburke
Copy link
Contributor

good question, thanks - will take a look tonight

@agl agl self-assigned this Sep 9, 2017
@gopherbot
Copy link

Change https://golang.org/cl/79875 mentions this issue: nacl/auth: use KeySize constant consistently.

@golang golang locked and limited conversation to collaborators Nov 27, 2018
c-expert-zigbee pushed a commit to c-expert-zigbee/crypto_go that referenced this issue Mar 28, 2022
Fixes golang/go#21788

Change-Id: I9310b438ce90cd3bba48295c829d44779c9f09c5
Reviewed-on: https://go-review.googlesource.com/79875
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Kevin Burke <kev@inburke.com>
c-expert-zigbee added a commit to c-expert-zigbee/crypto_go that referenced this issue Mar 29, 2022
Fixes golang/go#21788

Change-Id: I9310b438ce90cd3bba48295c829d44779c9f09c5
Reviewed-on: https://go-review.googlesource.com/79875
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Kevin Burke <kev@inburke.com>
@rsc rsc unassigned agl Jun 23, 2022
LewiGoddard pushed a commit to LewiGoddard/crypto that referenced this issue Feb 16, 2023
Fixes golang/go#21788

Change-Id: I9310b438ce90cd3bba48295c829d44779c9f09c5
Reviewed-on: https://go-review.googlesource.com/79875
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Kevin Burke <kev@inburke.com>
BiiChris pushed a commit to BiiChris/crypto that referenced this issue Sep 15, 2023
Fixes golang/go#21788

Change-Id: I9310b438ce90cd3bba48295c829d44779c9f09c5
Reviewed-on: https://go-review.googlesource.com/79875
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Kevin Burke <kev@inburke.com>
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

5 participants