ToyPublicKeys.RSAPrivateKeyType
RSAPrivateKey

RSAPrivateKey is PrivateKey struct for RSA. It holds all information to derive public key and make efficient calculations.

source
ToyPublicKeys.RSAPublicKeyType
RSAPublicKey

RSAPublicKey is PublicKey struct for RSA.

It holds all neccecary information to perform public key computations, but not more.

source
ToyPublicKeys.RSADPMethod
RSAStep(::pkcs1_v1_5_t, msg::BigInt, key::RSAPublicKey)

RSA exponentiation step when only public key is available. Uses repeated squares and other fast modulo exponentiation tricks in its GMP implementation (Base.GMP.MPZ.powm).

source
ToyPublicKeys.RSAEPMethod
RSAStep(::pkcs1_v1_5_t, msg::BigInt, key::RSAPrivateKey)

Fast implementation of the RSA exponentiation step when RSAPrivateKey is provided. It uses Chinese remainer theorem for very fast exp() mod n calculations.

source
ToyPublicKeys.power_crtMethod
power_crt(base::BigInt, pow::BigInt, p::BigInt, q::BigInt)

Wrapper around core implementation, only for generating the parameters if they are not provided.

source
ToyPublicKeys.power_crtMethod
function power_crt(
    base::BigInt,
    p::BigInt,
    q::BigInt,
    d_p::BigInt,
    d_q::BigInt,
    q_inv::BigInt,
)

CRT for PKCS #1 based parameters.

source
ToyPublicKeys.rand_prime_for_rsaFunction
rand_prime_for_rsa(bits::Integer, no_gcd_with=big"65537")

Helper function for rsa random primes, since they should satisfy special properties.

source