//! Multiprecision Integers.
//!
//! Cryptographic objects like [public keys], [secret keys],
//! [ciphertexts], and [signatures] are scalar numbers of arbitrary
//! precision. OpenPGP specifies that these are stored encoded as
//! big-endian integers with leading zeros stripped (See [Section 3.2
//! of RFC 4880]). Multiprecision integers in OpenPGP are extended by
//! [RFC 6637] to store curves and coordinates used in elliptic curve
//! cryptography (ECC).
//!
//! [public keys]: enum.PublicKey.html
//! [secret keys]: enum.SecretKeyMaterial.html
//! [ciphertexts]: enum.Ciphertext.html
//! [signatures]: enum.Signature.html
//! [Section 3.2 of RFC 4880]: https://tools.ietf.org/html/rfc4880#section-3.2
//! [RFC 6637]: https://tools.ietf.org/html/rfc6637
use std::fmt;
use std::cmp::Ordering;
#[cfg(test)]
use quickcheck::{Arbitrary, Gen};
#[cfg(test)]
use rand::Rng;
use crate::types::{
Curve,
HashAlgorithm,
PublicKeyAlgorithm,
SymmetricAlgorithm,
};
use