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.
This function uses SHA-256 to expand the seed. Different seeds will result
in completely different discriminants with overwhelming probability.
The function is deterministic: identical seeds and lengths always produce
the same discriminant.
Create a discriminant from a seed and bit length.
The discriminant is guaranteed to be a negative prime number that fits in
lengthbits, except with negligible probability (less than 2^-100). It is also guaranteed to equal 7 modulo 8.This function uses SHA-256 to expand the seed. Different seeds will result in completely different discriminants with overwhelming probability. The function is deterministic: identical seeds and lengths always produce the same discriminant.