Fork of https://filippo.io/edwards25519 with unsafe faster operations. https://filippo.io/edwards25519
Go to file
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
.github/workflows .github/workflows: add GitHub Actions tests (#1) 2020-11-23 05:40:35 +01:00
edwards25519.go edwards25519: panic if an uninitialized Point is used 2020-12-17 19:15:22 +01:00
edwards25519_test.go edwards25519: document why this can't implement X25519 2021-01-31 15:10:24 +01:00
fe.go edwards25519: make SqrtRatio slightly more efficient 2020-12-18 15:04:48 +01:00
fe_alias_test.go edwards25519: hide FieldElement and (*Point).ExtendedCoords 2020-11-23 05:27:48 +01:00
fe_amd64.go edwards25519: rewrite carryPropagate in arm64 assembly 2020-12-12 08:36:08 -05:00
fe_amd64.s edwards25519: apply gc build tag 2020-11-23 05:28:02 +01:00
fe_arm64.go edwards25519: rewrite carryPropagate in arm64 assembly 2020-12-12 08:36:08 -05:00
fe_arm64.s edwards25519: relax the limb schedule slightly 2020-12-12 08:36:08 -05:00
fe_bench_test.go edwards25519: hide FieldElement and (*Point).ExtendedCoords 2020-11-23 05:27:48 +01:00
fe_generic.go edwards25519: relax the limb schedule slightly 2020-12-12 08:36:08 -05:00
fe_mul_bits.go all: flatten the package and make FieldElement opaque 2020-09-28 14:18:44 +02:00
fe_mul_compat.go all: flatten the package and make FieldElement opaque 2020-09-28 14:18:44 +02:00
fe_noasm.go edwards25519: rewrite carryPropagate in arm64 assembly 2020-12-12 08:36:08 -05:00
fe_test.go edwards25519: relax the limb schedule slightly 2020-12-12 08:36:08 -05:00
go.mod all: expose edwards25519, base, and scalar packages 2020-08-27 00:35:09 -04:00
LICENSE all: flatten the package and make FieldElement opaque 2020-09-28 14:18:44 +02:00
README.md README: add pkg.go.dev link 2020-11-23 14:39:08 +01:00
scalar.go edwards25519: add (*Scalar).MultiplyAdd 2020-12-03 17:32:03 -05:00
scalar_alias_test.go edwards25519: test the invariant that Scalars are always reduced 2020-11-23 00:08:28 +01:00
scalar_test.go edwards25519: add TestScalarSetBytesWithClamping 2020-12-12 14:27:59 +01:00
scalarmult.go edwards25519: fix ScalarMult when receiver is not the identity (#12) 2021-02-03 23:49:06 +01:00
scalarmult_test.go edwards25519: fix ScalarMult when receiver is not the identity (#12) 2021-02-03 23:49:06 +01:00
table_constants.go edwards25519: hide FieldElement and (*Point).ExtendedCoords 2020-11-23 05:27:48 +01:00
tables.go edwards25519: rename ProjP3 to Point and unexport other point types 2020-09-28 14:18:44 +02:00
tables_test.go edwards25519: remove (*Point).Identity and (*Point).Generator 2020-11-23 04:58:26 +01:00

filippo.io/edwards25519

import "filippo.io/edwards25519"

This library implements the edwards25519 elliptic curve, exposing the necessary APIs to build a wide array of higher-level primitives. Read the docs at pkg.go.dev/filippo.io/edwards25519.

The code is originally derived from Adam Langley's internal implementation in the Go standard library, and includes George Tankersley's performance improvements. It was then further developed by Henry de Valence for use in ristretto255.

Most users don't need this package, and should instead use crypto/ed25519 for signatures, golang.org/x/crypto/curve25519 for Diffie-Hellman, or github.com/gtank/ristretto255 for prime order group logic. However, for anyone currently using a fork of crypto/ed25519/internal/edwards25519 or github.com/agl/edwards25519, this package should be a safer, faster, and more powerful alternative.

Since this package is meant to curb proliferation of edwards25519 implementations in the Go ecosystem, it welcomes requests for new APIs or reviewable performance improvements.