Fork of https://filippo.io/edwards25519 with unsafe faster operations. https://filippo.io/edwards25519
Go to file
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
.github/workflows .github/workflows: add GitHub Actions tests (#1) 2020-11-23 05:40:35 +01:00
field edwards25519: make Scalar and field.Element setters return errors 2021-06-04 16:57:44 +02:00
doc.go all: sync with landed standard library upstream 2021-05-26 18:09:02 +02:00
edwards25519.go edwards25519: make Scalar and field.Element setters return errors 2021-06-04 16:57:44 +02:00
edwards25519_test.go all: sync with landed standard library upstream 2021-05-26 18:09:02 +02:00
extra.go extra: make Scalar.Invert(0) return 0 2021-06-04 16:55:16 +02:00
extra_test.go edwards25519: make Scalar and field.Element setters return errors 2021-06-04 16:57:44 +02:00
go.mod all: sync with landed standard library upstream 2021-05-26 18:09:02 +02: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: make Scalar and field.Element setters return errors 2021-06-04 16:57:44 +02:00
scalar_alias_test.go all: sync with landed standard library upstream 2021-05-26 18:09:02 +02:00
scalar_test.go edwards25519: make Scalar and field.Element setters return errors 2021-06-04 16:57:44 +02:00
scalarmult.go all: sync with landed standard library upstream 2021-05-26 18:09:02 +02:00
scalarmult_test.go all: sync with landed standard library upstream 2021-05-26 18:09:02 +02:00
tables.go all: sync with landed standard library upstream 2021-05-26 18:09:02 +02:00
tables_test.go all: sync with landed standard library upstream 2021-05-26 18:09:02 +02: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.