https://github.com/filosottile/nistec
NIST P elliptic curves (re-exported from crypto/internal/nistec)
https://github.com/filosottile/nistec
Last synced: 9 months ago
JSON representation
NIST P elliptic curves (re-exported from crypto/internal/nistec)
- Host: GitHub
- URL: https://github.com/filosottile/nistec
- Owner: FiloSottile
- License: bsd-3-clause
- Created: 2022-05-09T18:28:11.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-08-29T14:58:55.000Z (almost 3 years ago)
- Last Synced: 2025-07-26T08:30:30.660Z (11 months ago)
- Language: Assembly
- Homepage: https://pkg.go.dev/filippo.io/nistec
- Size: 956 KB
- Stars: 48
- Watchers: 6
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# filippo.io/nistec
```
import "filippo.io/nistec"
```
This package implements the NIST P elliptic curves, according to FIPS 186-4
and SEC 1, Version 2.0, exposing the necessary APIs to build a wide array of
higher-level primitives.
It's an exported version of `crypto/internal/nistec` in the standard library,
which powers `crypto/elliptic`, `crypto/ecdsa`, and `crypto/ecdh`.
The git history has been preserved, and new upstream changes are applied periodically.
This package uses fiat-crypto or specialized assembly and Go code for its
backend field arithmetic (not math/big) and exposes constant-time, heap
allocation-free, byte slice-based safe APIs. Group operations use modern and
safe complete addition formulas where possible. The point at infinity is
handled and encoded according to SEC 1, Version 2.0, and invalid curve points
can't be represented. This makes it particularly suitable to be used as a
prime order group implementation.
Use the `purego` build tag to exclude the assembly and rely entirely on formally
verified fiat-crypto arithmetic and complete addition formulas.
Read the docs at [pkg.go.dev/filippo.io/nistec](https://pkg.go.dev/filippo.io/nistec).
This repository does not accept contributions.
Any changes should be submitted upstream to the Go project.