Pike v8.0 release 1738

Method Nettle.rsa_generate_keypair()


Method rsa_generate_keypair

array(Gmp.mpz) rsa_generate_keypair(int bits, int e, function(int(0..):string(8bit)) rnd)

Description

Generates an RSA key pair with a bits sized modulus (n), using the provided value for e and random function rnd.

Returns
Array
Gmp.mpz 0

The value n, the modulo.

Gmp.mpz 1

The value d, the private exponent.

Gmp.mpz 2

The value p, a prime.

Gmp.mpz 3

The value q, a prime.