|
1 | | -//! Pure Rust implementation of the [secp256k1] (K-256) elliptic curve, |
2 | | -//! including support for the |
3 | | -//! [Elliptic Curve Digital Signature Algorithm (ECDSA)][ECDSA], |
4 | | -//! [Elliptic Curve Diffie-Hellman (ECDH)][ECDH], and general purpose |
5 | | -//! elliptic curve/field arithmetic which can be used to implement |
6 | | -//! protocols based on group operations. |
7 | | -//! |
8 | | -//! ## About secp256k1 (K-256) |
9 | | -//! |
10 | | -//! secp256k1 is a Koblitz curve commonly used in cryptocurrency applications. |
11 | | -//! The "K-256" name follows NIST notation where P = prime fields, |
12 | | -//! B = binary fields, and K = Koblitz curves. |
13 | | -//! |
14 | | -//! The curve is specified as `secp256k1` by Certicom's SECG in |
15 | | -//! "SEC 2: Recommended Elliptic Curve Domain Parameters": |
16 | | -//! |
17 | | -//! <https://www.secg.org/sec2-v2.pdf> |
18 | | -//! |
19 | | -//! ## ⚠️ Security Warning |
20 | | -//! |
21 | | -//! The elliptic curve arithmetic contained in this crate has never been |
22 | | -//! independently audited! |
23 | | -//! |
24 | | -//! This crate has been designed with the goal of ensuring that secret-dependent |
25 | | -//! operations are performed in constant time (using the `subtle` crate and |
26 | | -//! constant-time formulas). However, it has not been thoroughly assessed to ensure |
27 | | -//! that generated assembly is constant time on common CPU architectures. |
28 | | -//! |
29 | | -//! USE AT YOUR OWN RISK! |
30 | | -//! |
31 | | -//! ## Minimum Supported Rust Version |
| 1 | +#![doc = include_str!("../README.md")] |
| 2 | + |
| 3 | +//! ## `serde` support |
32 | 4 | //! |
33 | | -//! Rust **1.56** or higher. |
| 5 | +//! When the `serde` feature of this crate is enabled, `Serialize` and |
| 6 | +//! `Deserialize` are impl'd for the following types: |
34 | 7 | //! |
35 | | -//! Minimum supported Rust version may be changed in the future, but it will be |
36 | | -//! accompanied with a minor version bump. |
| 8 | +//! - [`AffinePoint`] |
| 9 | +//! - [`Scalar`] |
| 10 | +//! - [`ecdsa::VerifyingKey`] |
37 | 11 | //! |
38 | | -//! [secp256k1]: https://en.bitcoin.it/wiki/Secp256k1 |
39 | | -//! [ECDSA]: https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm |
40 | | -//! [ECDH]: https://en.wikipedia.org/wiki/Elliptic-curve_Diffie%E2%80%93Hellman |
| 12 | +//! Please see type-specific documentation for more information. |
41 | 13 |
|
42 | 14 | #![no_std] |
43 | 15 | #![cfg_attr(docsrs, feature(doc_cfg))] |
|
0 commit comments