Skip to main content

Crate vdf_classgroup

Crate vdf_classgroup 

Source
Expand description

Class groups of binary quadratic forms, using GNU MP (GMP) for arbitrary-precision arithmetic.

Build requirement: a system libgmp development package (libgmp-dev on Debian/Ubuntu, gmp on Homebrew). The arithmetic backend is a vendored rust-gmp copy; replacing it is planned for 0.3.0 and is not part of this 0.2.x series.

Re-exports§

pub use self::gmp_classgroup::do_compute;
pub use self::gmp_classgroup::ffi::export_obj;
pub use self::gmp_classgroup::ffi::import_obj;

Modules§

gmp
Vendored rust-gmp subset used by vdf-classgroup.
gmp_classgroup

Traits§

BigNum
BigNumExt
ClassGroup

Functions§

export_obj
Exports obj to v as an array of 2’s complement, big-endian bytes. If v is too small to hold the result, returns Err(s), where s is the size needed to hold the exported version of obj.
import_obj
Unmarshals a buffer to an Mpz. buf is interpreted as a 2’s complement, big-endian integer. If the buffer is empty, zero is returned.