#elliptic-curve #bitcoin #crypto #ethereum #secp256k1 #ecc

no-std k256_flow

Flow-Rust-SDK Version of k256 secp256k1 elliptic curve library written in pure Rust with support for ECDSA signing/verification (including Ethereum-style signatures with public-key recovery), Elliptic Curve Diffie-Hellman (ECDH), and general purpose secp256k1 curve arithmetic useful for implementing arbitrary group-based protocols. Heavily modified for signing Flow blockchain transactions

1 stable release

1.0.0 Sep 22, 2021

#39 in #secp256k1

Apache-2.0 OR MIT

260KB
5K SLoC

k256

A heavily modified version, intended for use with the Flow-Rust-SDK.


lib.rs:

Pure Rust implementation of the secp256k1 (K-256) elliptic curve, including support for the Elliptic Curve Digital Signature Algorithm (ECDSA), Elliptic Curve Diffie-Hellman (ECDH), and general purpose elliptic curve/field arithmetic which can be used to implement protocols based on group operations.

About secp256k1 (K-256)

secp256k1 is a Koblitz curve commonly used in cryptocurrency applications. The "K-256" name follows NIST notation where P = prime fields, B = binary fields, and K = Koblitz curves.

The curve is specified as secp256k1 by Certicom's SECG in "SEC 2: Recommended Elliptic Curve Domain Parameters":

https://www.secg.org/sec2-v2.pdf

⚠️ Security Warning

The elliptic curve arithmetic contained in this crate has never been independently audited!

This crate has been designed with the goal of ensuring that secret-dependent operations are performed in constant time (using the subtle crate and constant-time formulas). However, it has not been thoroughly assessed to ensure that generated assembly is constant time on common CPU architectures.

USE AT YOUR OWN RISK!

Minimum Supported Rust Version

Rust 1.52 or higher.

Minimum supported Rust version may be changed in the future, but it will be accompanied with a minor version bump.

Dependencies

~1.8–2.7MB
~53K SLoC