Commit graph

16 commits

Author SHA1 Message Date
Bryan C. Mills 16197b4051 crypto/internal/edwards25519: shorten quick.Check tests in short mode
The edwards25519 tests can be quite slow on platforms without a
well-optimized implementation, especially if the race detector is also
enabled. Since these tests aren't checking for specific inputs anyway,
the extra coverage of a more aggressive quick.Config does not seem
worth wasting extra time on slow CI builders and TryBots.

For #60109.

Change-Id: I530e75a0b76725585df5a2f5ded6705ab1b9da51
Reviewed-on: https://go-review.googlesource.com/c/go/+/522715
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Joedian Reid <joedian@golang.org>
2023-12-10 20:10:48 +01:00
George Tankersley 306e451b8b scalar: replace the Christmas tree with a fiat-crypto generated scalar field 2022-07-31 17:08:28 -04:00
Ludi Rehak 36a90d6b20 all: rename type *testing.B variable to 'b'
Reserve 't' for type *testing.T variables.

Change-Id: I037328df59d3af1aa28714f9efe15695b6fd62a9
Reviewed-on: https://go-review.googlesource.com/c/go/+/400826
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-05-24 17:21:59 +02:00
Filippo Valsorda dd0c73fa20 all: sync with landed standard library upstream 2021-05-26 18:09:02 +02:00
Adrian Hamelink b73a7c8249
edwards25519: fix ScalarMult when receiver is not the identity (#12)
Calling v.ScalarMult on a receiver v that is not the identity point results in an incorrect operation.
This was fixed by setting v to the identity point in ScalarMult.

A simple test was added to check this behaviour.
2021-02-03 23:49:06 +01:00
Filippo Valsorda 132d95c169 edwards25519: sprinkle on-curve checks around tests 2020-12-12 12:01:36 +01:00
Filippo Valsorda 90c35a7f43 edwards25519: hide FieldElement and (*Point).ExtendedCoords
We'll need these for ristretto255, but we might want to expose them in a
separate package. Note how FieldElement was only exported for the
benefit of ExtendedCoords. For now, unexport FieldElement and delete
ExtendedCoords (since a proper FromExtendedCoords implementation would
check the curve equations anyway).
2020-11-23 05:27:48 +01:00
Filippo Valsorda daa250742f edwards25519: minor doc and string touch-ups 2020-11-23 03:51:42 +01:00
Filippo Valsorda f28d75ad5d edwards25519: change constructors
We now don't have a NewPoint which maybe helps imply there isn't a zero
value for a Point, and renamed Zero and One to Identity and Generator.
2020-11-23 02:57:28 +01:00
Filippo Valsorda 36d8598588 edwards25519: test the invariant that Scalars are always reduced 2020-11-23 00:08:28 +01:00
Filippo Valsorda f6ee18761d edwards25519: make Point opaque 2020-09-28 14:18:44 +02:00
Filippo Valsorda c5c2e9e1ac edwards25519: rename ProjP3 to Point and unexport other point types 2020-09-28 14:18:44 +02:00
Filippo Valsorda 1a86a9cb60 edwards25519: make Scalar opaque 2020-09-28 14:18:44 +02:00
Filippo Valsorda 07a7683e64 edwards25519: hide some more exposed symbols 2020-09-28 14:18:44 +02:00
Filippo Valsorda d3569cbbb3 all: flatten the package and make FieldElement opaque
For the license changes, see gtank/ristretto255-private#28 and
gtank/ristretto255#32, that contribute all code in those repositories to
the Go project under the Google CLA.
2020-09-28 14:18:44 +02:00
Filippo Valsorda 6f5f5828e1 all: expose edwards25519, base, and scalar packages 2020-08-27 00:35:09 -04:00
Renamed from internal/edwards25519/scalarmult_test.go (Browse further)