Class
Class Methods

Generates a random prime number of bit length bits. If safe is true, generates a safe prime. If add is specified, generates a prime that fulfills condition p % add = rem.

Parameters

  • bits - integer

  • safe - boolean

  • add - BN

  • rem - BN

Construct a new OpenSSL BigNum object.

Instance Methods
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available

Division of OpenSSL::BN instances

No documentation available
An alias for cmp

Returns true only if obj has the same value as bn. Contrast this with OpenSSL::BN#eql?, which requires obj to be OpenSSL::BN.

An alias for ==
No documentation available

Returns boolean of whether bit is set. Bitwise operations for openssl BIGNUMs.

No documentation available
No documentation available
No documentation available
No documentation available

Returns true only if obj is a OpenSSL::BN with the same value as big. Contrast this with OpenSSL::BN#==, which performs type conversions.

No documentation available

Returns a hash code for this object.

See also Object#hash.

No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available

Performs a Miller-Rabin probabilistic primality test with checks iterations. If nchecks is not specified, a number of iterations is used that yields a false positive rate of at most 2^-80 for random input.

Parameters

  • checks - integer

Performs a Miller-Rabin primality test. This is same as prime? except this first attempts trial divisions with some small primes.

Parameters

  • checks - integer

  • trial_div - boolean

No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
An alias for to_i

Parameters

  • base - integer Valid values:

    • 0 - MPI

    • 2 - binary

    • 10 - the default

    • 16 - hex

No documentation available
No documentation available