Commit Graph
8 Commits
Author SHA1 Message Date
Filippo Valsorda 8b1d31080a bn256: explicitly fix MakeAffine for ∞
When c = ∞, z = 0 and 0 does not have a modular inverse, triggering
undefined behavior (recently changed to returning nil) in ModInverse.

Unclear how this used to work anyway. Looks like ModInverse was
leaving the receiver untouched, making zInv = 0 when pool = nil.

Fixes golang/go#25199

Change-Id: Ib39abf59f0e71cf43cdb5836142ebdd3b206fb3f
Reviewed-on: https://go-review.googlesource.com/110695
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Adam Langley <agl@golang.org>
2018-05-02 18:48:08 +00:00
Adam Langley 0fcca4842a bn256: don't claim a 128-bit security level.
It's no longer true.

Fixes golang/go#19479

Change-Id: I85b0ce850ebde60b816924a25368208527a8e617
Reviewed-on: https://go-review.googlesource.com/79877
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-12-31 21:50:28 +00:00
Kevin Burke e8f229864d all: fix errors reported by vet, golint
None are "wrong" per se, but there are a lot of good suggestions and
in one case a docstring that was not present in godoc due to the
presence of an extra newline.

Changed "Id" in struct properties to "ID" in some non-exported
structs. Removed a trailing period from some error messages; I believe
the exact contents of error strings are not covered by the Go
compatibility promise.

Change-Id: I7c620582dc247396f72c52d38c909ccc0ec87b83
Reviewed-on: https://go-review.googlesource.com/80145
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-11-28 17:48:09 +00:00
David Lazar 3f77d69517 bn256: fix equations in comments
Change-Id: Icb220341756f472ade15f5fc6b91016214233da9
Reviewed-on: https://go-review.googlesource.com/34030
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-12-06 19:59:59 +00:00
David Symonds 1fbbd62cfe crypto: add import comments.
Change-Id: I33240faf1b8620d0cd600de661928d8e422ebdbc
Reviewed-on: https://go-review.googlesource.com/1235
Reviewed-by: Andrew Gerrand <adg@golang.org>
2014-12-09 23:26:36 +00:00
Adam Langley 84f97f92d0 go.crypto/bn256: updates tests in light of b2b2ae1f5140.
https://golang.org/cl/6850091 fixed the bug in question.
This change updates the tests so that they are broken without
that change.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6846091
2012-12-15 14:19:38 -05:00
Adam Langley 4c5258d8b6 go.crypto/bn256: ensure that t is initialised correctly.
t caches the value of z squared, but wasn't getting correctly
initialised when the value of z was reset.

R=golang-dev
CC=golang-dev
https://golang.org/cl/6850091
2012-11-22 13:44:59 -05:00
Adam Langley 71484c7202 bn256: add package
Package bn256 implements a particular bilinear group at the 128-bit
security level.

R=golang-dev, remyoudompheng, r, r, akumar
CC=golang-dev
https://golang.org/cl/6402052
2012-07-27 12:54:55 -04:00