Code review - Issue 6846091: code review 6846091: go.crypto/bn256: updates tests in light of b2b2ae1f5140.https://codereview.appspot.com/2012-12-15T19:19:47+00:00rietveld
Message from unknown
2012-11-22T21:30:25+00:00agl1urn:md5:23dd864516753d4b40336040fc0241be
Message from unknown
2012-11-22T21:30:29+00:00agl1urn:md5:ba53e788dc888210187e5888453c88b7
Message from unknown
2012-11-22T21:45:15+00:00agl1urn:md5:7ba760e344a507ad0cbb3bf99eac8de0
Message from agl@golang.org
2012-11-22T21:45:17+00:00agl1urn:md5:dd4fe49847b1017eda20d0831ec04905
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com),
I'd like you to review this change to
https://code.google.com/p/go.crypto
Message from bradfitz@golang.org
2012-11-22T22:15:36+00:00bradfitzurn:md5:58ec1c3cca7cb173323b8d60182f9591
LGTM
On Nov 22, 2012 1:45 PM, <agl@golang.org> wrote:
> Reviewers: golang-dev_googlegroups.com,
>
> Message:
> Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com),
>
> I'd like you to review this change to
> https://code.google.com/p/go.**crypto<https://code.google.com/p/go.crypto>
>
>
> Description:
> go.crypto/bn256: updates tests in light of b2b2ae1f5140.
>
> http://codereview.appspot.com/**6850091<http://codereview.appspot.com/6850091>fixed the bug in question.
> This change updates the tests so that they are broken without
> that change.
>
> Please review this at http://codereview.appspot.com/**6846091/<http://codereview.appspot.com/6846091/>
>
> Affected files:
> M bn256/bn256_test.go
>
>
> Index: bn256/bn256_test.go
> ==============================**==============================**=======
> --- a/bn256/bn256_test.go
> +++ b/bn256/bn256_test.go
> @@ -273,12 +273,12 @@
> b, _ := rand.Int(rand.Reader, Order)
> c, _ := rand.Int(rand.Reader, Order)
>
> - pa := new(G1).ScalarBaseMult(a)
> - qa := new(G2).ScalarBaseMult(a)
> - pb := new(G1).ScalarBaseMult(b)
> - qb := new(G2).ScalarBaseMult(b)
> - pc := new(G1).ScalarBaseMult(c)
> - qc := new(G2).ScalarBaseMult(c)
> + pa, _ := new(G1).Unmarshal(new(G1).**ScalarBaseMult(a).Marshal())
> + qa, _ := new(G2).Unmarshal(new(G2).**ScalarBaseMult(a).Marshal())
> + pb, _ := new(G1).Unmarshal(new(G1).**ScalarBaseMult(b).Marshal())
> + qb, _ := new(G2).Unmarshal(new(G2).**ScalarBaseMult(b).Marshal())
> + pc, _ := new(G1).Unmarshal(new(G1).**ScalarBaseMult(c).Marshal())
> + qc, _ := new(G2).Unmarshal(new(G2).**ScalarBaseMult(c).Marshal())
>
> k1 := Pair(pb, qc)
> k1.ScalarMult(k1, a)
>
>
>
Message from unknown
2012-11-26T15:38:05+00:00agl1urn:md5:530a3119228bf0a98fd28c5d9915b464
Message from unknown
2012-11-26T15:38:19+00:00agl1urn:md5:2826552adf92777e663db743a19e40a7
Message from unknown
2012-11-26T15:38:34+00:00agl1urn:md5:42be478473645862b4a6527622e26f8c
Message from unknown
2012-11-26T15:40:51+00:00agl1urn:md5:5b600dbd2cd8c281929e67c6275ef874
Message from unknown
2012-11-26T15:41:05+00:00agl1urn:md5:dcd44f3cb969063b023d6cc1805ea8c7
Message from unknown
2012-11-26T16:15:29+00:00agl1urn:md5:7640b0613f125acfc56986fb6b66278f
Message from unknown
2012-12-15T19:19:35+00:00agl1urn:md5:466f87b49f2517534e28c3d979cecb56
Message from agl@golang.org
2012-12-15T19:19:47+00:00agl1urn:md5:309e915c5cfbc85c70fc0bafc448f1cd
*** Submitted as https://code.google.com/p/go/source/detail?r=ded2b5058b03&repo=crypto ***
go.crypto/bn256: updates tests in light of b2b2ae1f5140.
http://codereview.appspot.com/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://codereview.appspot.com/6846091