Skip to content

crypto/cipher: aesGcm: customize the size of the Tag #19594

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

Closed
gleroi opened this issue Mar 17, 2017 · 7 comments
Closed

crypto/cipher: aesGcm: customize the size of the Tag #19594

gleroi opened this issue Mar 17, 2017 · 7 comments
Labels
FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@gleroi
Copy link

gleroi commented Mar 17, 2017

What did you do?

https://play.golang.org/p/3lHakDk4WV

i'm working on AES GCM encrypted data from the DLMS/Cosem protocol.
This protocol use AES GCM 128 bits but only keep the 12 bytes of the tag

I you look in the code of crypto/cipher/gcm.go:gcm.Open, you'll see that the 12 leftmost bytes are identical, i just need a way to limit the comparison to 12 bytes.

What did you expect to see?

I expect to be able to configure the size of the tag.

System details

go version go1.8 windows/amd64
GOARCH="amd64"
GOBIN=""
GOEXE=".exe"
GOHOSTARCH="amd64"
GOHOSTOS="windows"
GOOS="windows"
GOPATH="D:\Projets\go"
GORACE=""
GOROOT="D:\Go"
GOTOOLDIR="D:\Go\pkg\tool\windows_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\GL262BEN\AppData\Local\Temp\go-build100801603=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
GOROOT/bin/go version: go version go1.8 windows/amd64
GOROOT/bin/go tool compile -V: compile version go1.8 X:framepointer
gdb --version: GNU gdb (GDB) 7.6.1
@bradfitz bradfitz added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Mar 17, 2017
@bradfitz
Copy link
Contributor

To @agl for decision.

@bradfitz bradfitz added this to the Go1.9 milestone Mar 21, 2017
@agl
Copy link
Contributor

agl commented Mar 24, 2017

This is a reasonable request. The different tag size should be exposed as a different AEAD, i.e. something like NewGCMWithTagSize.

@bradfitz bradfitz added NeedsFix The path to resolution is known, but the work has not been done. help wanted and removed NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. labels Mar 24, 2017
@gleroi
Copy link
Author

gleroi commented Mar 25, 2017

Im going to look at the contributor guidelines to propose a pull request on monday if it is ok.

@gopherbot
Copy link
Contributor

CL https://golang.org/cl/38691 mentions this issue.

@bradfitz
Copy link
Contributor

The CL mailed above doesn't compile, so bumping this to Go 1.10.

@bradfitz bradfitz modified the milestones: Go1.10, Go1.9 Jun 13, 2017
@conradoplg
Copy link
Contributor

I had a shot at this in a new CL (I was not sure if I could/should change the other one).

@gopherbot
Copy link
Contributor

CL https://golang.org/cl/48510 mentions this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

6 participants