[][src]Crate classygroup

Modules

uint

Zero-allocation U256 and U512 types built on GMP. We created this module specifically for our use case of implementing primality checking for 256-bit integers, but it may be worth polishing a bit for more general use. Obviously there are a lot of unsafe {} blocks to work with GMP. Take care when using this module because there may be bugs we did not catch.

Macros

mut_tuple_elems

Structs

ClassElem
Mpz

Enums

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.

hash_to_prime

Hashes t with an incrementing counter (with blake2b) until a prime is found.