[][src]Crate classygroup

Re-exports

pub use self::gmp_classgroup::do_compute;

Modules

gmp
gmp_classgroup

Traits

BigNum
BigNumExt
ClassGroup

Functions

create_discriminant

Create a discriminant from a seed (a byte string) and a bit length (a u16). The discriminant is guaranteed to be a negative prime number that fits in length bits, except with negligible probability (less than 2^(-100)). It is also guaranteed to equal 7 modulo 8.

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.