Function ecdsa::hazmat::bits2field

source ·
pub fn bits2field<C: PrimeCurve>(bits: &[u8]) -> Result<FieldBytes<C>>
Available on crate feature hazmat only.
Expand description

Partial implementation of the bits2int function as defined in RFC6979 § 2.3.2 as well as SEC1 § 2.3.8.

This is used to convert a message digest whose size may be smaller or larger than the size of the curve’s scalar field into a serialized (unreduced) field element.