]> Cypherpunks repositories - gostls13.git/commit
crypto/elliptic: don't unmarshal invalid encoded points
authorAndreas Auernhammer <aead@mail.de>
Thu, 25 May 2017 20:46:41 +0000 (22:46 +0200)
committerFilippo Valsorda <hi@filippo.io>
Sun, 15 Oct 2017 02:24:19 +0000 (02:24 +0000)
commitfb46b9ea20cfe7677a495d1a6cd9f244ddf1c0eb
tree1ad2f3466151ac58c8e0c7fa649b7222cfccb100
parent8b220d8ef1ad8fdedd2728fe047ec7c2f55e8aa6
crypto/elliptic: don't unmarshal invalid encoded points

ANSI X9.62 specifies that Unmarshal should fail if the a given coordinate is
not smaller than the prime of the elliptic curve. This change makes Unmarshal
ANSI X9.62 compliant and explicitly documents that the Marshal/Unmarshal only
supports uncompressed points.

Fixes #20482

Change-Id: I161a73da8279cae505c9ba0b3022021709fe8145
Reviewed-on: https://go-review.googlesource.com/44312
Reviewed-by: Adam Langley <agl@golang.org>
Reviewed-by: Filippo Valsorda <hi@filippo.io>
Run-TryBot: Adam Langley <agl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/crypto/elliptic/elliptic.go
src/crypto/elliptic/elliptic_test.go