A Multiprecision Integer.
Creates a new MPI.
This function takes care of removing leading zeros.
Creates new MPI encoding an uncompressed EC point.
Encodes the given point on a elliptic curve (see Section 6 of
RFC 6637 for details). This is used to encode public keys
and ciphertexts for the NIST curves (
pub fn new_compressed_point(x: &[u8]) -> Self[src]
Creates new MPI encoding a compressed EC point using native encoding.
Encodes the given point on a elliptic curve (see Section 13.2
of RFC4880bis for details). This is used to encode public
keys and ciphertexts for the Bernstein curves (currently
Returns the length of the MPI in bits.
Leading zero-bits are not included in the returned size.
Returns the value of this MPI.
Note that due to stripping of zero-bytes, the returned value may be shorter than expected.
Decodes an EC point encoded as MPI.
Decodes the MPI into a point on an elliptic curve (see
Section 6 of RFC 6637 and Section 13.2 of RFC4880bis for
details). If the point is not compressed, the function
(x, y). If it is compressed,
y will be empty.
Error::UnsupportedEllipticCurve if the curve is not
Error::MalformedMPI if the point is formatted
impl From<MPI> for ProtectedMPI[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where1.3.0[src]
impl MarshalInto for MPI[src]
fn serialized_len(&self) -> usize[src]
fn export_to_vec(&self) -> Result<Vec<u8>>[src]
fn from_reader<R: Read>(reader: R) -> Result<Self>[src]
impl PartialOrd<MPI> for MPI[src]
impl RefUnwindSafe for MPI
impl UnwindSafe for MPI
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)[src]
type Error = Infallible
The type returned in the event of a conversion error.