Add crate for working with short Weierstrass elliptic curves

This commit is contained in:
Luke Parker
2025-08-28 08:20:31 -04:00
parent 220bcbc592
commit f2d399ba1e
12 changed files with 528 additions and 2 deletions

View File

@@ -83,6 +83,15 @@ pub mod __prime_field_private {
}
}
/// Construct a odd-prime field.
///
/// The length of the `modulus_as_be_hex` string will effect the size of the underlying
/// representation and the encoding. It MAY have a "0x" prefix, if preferred.
///
/// `multiplicative_generator_as_be_hex` MAY have a "0x" prefix. It MAY be short and of a length
/// less than `modulus_as_be_hex`.
///
/// `big_endian` controls if the encoded representation will be big-endian or not.
#[macro_export]
macro_rules! odd_prime_field {
(