Commit graph

24 commits

Author SHA1 Message Date
cui fliter 6387a56aa6 all: fix misuses of "a" vs "an"
Fixes the misuse of "a" vs "an", according to English grammatical
expectations and using https://www.a-or-an.com/

Change-Id: I53ac724070e3ff3d33c304483fe72c023c7cda47
Reviewed-on: https://go-review.googlesource.com/c/go/+/480536
Run-TryBot: shuang cui <imcusg@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2023-12-10 20:10:48 +01:00
Filippo Valsorda 63e0935134 scalar: replace wide reduction with limbed operations 2022-07-31 17:08:28 -04:00
Filippo Valsorda 467a92bcfd scalar: document and update fiat generation code 2022-07-31 17:08:28 -04:00
Filippo Valsorda 50a0a9e22d scalar: clean up fiat wrapper 2022-07-31 17:08:28 -04:00
Filippo Valsorda 755954a498 scalar: fix aliasing of MultiplyAdd addend and receiver 2022-07-31 17:08:28 -04:00
George Tankersley 589b96254b scalar: update fiat code to v0.0.12-f4c7f3717364cf39b716170bf39f81b78acf544e 2022-07-31 17:08:28 -04:00
George Tankersley e69bd0a524 scalar: remove the Christmas tree 2022-07-31 17:08:28 -04:00
George Tankersley 306e451b8b scalar: replace the Christmas tree with a fiat-crypto generated scalar field 2022-07-31 17:08:28 -04:00
Filippo Valsorda 383e08737b edwards25519: sync with upstream
Minor doc, names, go:build directive changes.
2022-05-25 01:39:14 +02:00
Filippo Valsorda 26ce6fc341 edwards25519: expand the SetUniformBytes docs 2021-06-07 01:08:54 +02:00
Filippo Valsorda c1c1311e51 edwards25519: make Scalar and field.Element setters return errors
Accepting a short value from an attacker and passing it to a setter is
an easy way to end up with a panic. Return errors instead.
2021-06-04 16:57:44 +02:00
Filippo Valsorda dd0c73fa20 all: sync with landed standard library upstream 2021-05-26 18:09:02 +02:00
lukechampine 9e6a9310b2 edwards25519: add (*Scalar).MultiplyAdd 2020-12-03 17:32:03 -05:00
Filippo Valsorda ec6f8a6a18 edwards25519: make (*Scalar).SetCanonicalBytes return the receiver
Like all other SetBytes methods.
2020-11-28 04:38:15 +01:00
Filippo Valsorda 498fb1e96a edwards25519: replace FillBytes with Bytes, again
Since the sizes are fixed, we can use outlining to make Bytes almost as
efficient as FillBytes: a careful caller can avoid the allocation, and
copying 32 bytes is unlikely to show up on the profiles.
2020-11-23 05:10:24 +01:00
Filippo Valsorda 2e52ce252e edwards25519: drop unused (*Scalar).Zero 2020-11-23 04:41:53 +01:00
Filippo Valsorda 7c14a36a2a edwards25519: rename FromBytes to SetBytes
It's consistent with math/big, it follows the pattern of using verbs,
and is clearer in what it does.
2020-11-23 04:20:36 +01:00
Filippo Valsorda daa250742f edwards25519: minor doc and string touch-ups 2020-11-23 03:51:42 +01:00
Filippo Valsorda e8698cda38 edwards25519: implement (*Scalar).FromBytesWithClamping 2020-11-23 03:46:06 +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 176388b1ad edwards25519: cleanup Scalar API to match ristretto255
Also, replaced Bytes (which appended, unlike big.Int.Bytes) with
FillBytes. ristretto255 has Encode/Decode instead of
FillBytes/FromCanonicalBytes in order to match Element, which is not
relevant here.
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 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
Renamed from scalar/scalar.go (Browse further)