ToyPublicKeys.RSAKey — TypeRSAKeyUnion of RSAPrivateKey and RSAPublicKey for methods, that do not require specific key.
ToyPublicKeys.RSAPrivateKey — TypeRSAPrivateKeyRSAPrivateKey is PrivateKey struct for RSA. It holds all information to derive public key and make efficient calculations.
ToyPublicKeys.RSAPublicKey — TypeRSAPublicKey
RSAPublicKey is PublicKey struct for RSA.It holds all neccecary information to perform public key computations, but not more.
ToyPublicKeys.RSADP — MethodRSAStep(::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).
ToyPublicKeys.RSAEP — MethodRSAStep(::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.
ToyPublicKeys.RSASP1 — MethodRSASP1(::pkcs1_v1_5_t, msg::BigInt, key::RSAPrivateKey)ToyPublicKeys.RSAStep — MethodRSAStep(::pkcs1_v1_5_t, msg::String, key::RSAKey)RSA exponentiation step for Strings. Only prepares the buffer for RSAStep(msg::BigInt, key::RSAPublicKey).
ToyPublicKeys.RSAStep — MethodRSAStep(::pkcs1_v1_5_t, msg::AbstractVector{T}, key::RSAKey) where {T<:Base.BitInteger}RSA exponentiation step for AbstractVectors (arbitrary buffers). Only prepares the buffer for RSAStep(msg::BigInt, key::RSAPublicKey).
ToyPublicKeys.RSAVP1 — MethodRSAVP1(::pkcs1_v1_5_t, msg::BigInt, key::RSAPublicKey)ToyPublicKeys.decrypt — Methoddecrypt(::pkcs1_v1_5_t,
msg::Vector{UInt8},
key::RSAPrivateKey)RSA decryption function for strings, expects PKCS#1 v1.5 padding.
ToyPublicKeys.decrypt — Methoddecrypt(::pkcs1_v2_2_t,
msg::Vector{UInt8},
key::RSAPrivateKey)RSA decryption function for strings, expects PKCS#1 v1.5 padding.
ToyPublicKeys.decrypt — Methoddecrypt(msg::Vector{UInt8},
key::RSAPrivateKey)RSA decryption function for strings, expects PKCS#1 v1.5 padding.
ToyPublicKeys.encrypt — Methodencrypt(::pkcs1_v1_5_t,
msg::Vector{UInt8},
key::RSAPublicKey)RSA encryption function with PKCS#1 v1.5 padding.
ToyPublicKeys.encrypt — Methodencrypt(::pkcs1_v2_2_t,
msg::Vector{UInt8},
key::RSAPublicKey)RSA encryption function with PKCS#1 v1.5 padding.
ToyPublicKeys.encrypt — Methodencrypt(msg::Vector{UInt8},
key::RSAPublicKey)RSA encryption function with PKCS#1 v1.5 padding.
ToyPublicKeys.generate_rsa_key_pair — Methodgenerate_rsa_key_pair(::pkcs1_v1_5_t, bits::Integer)RSA key pair constructor (hopefully) according to RFC 2313
ToyPublicKeys.is_probab_prime_p — Methodis_probab_prime_p(n::BigInt, n_tests::Int)Binding for GMPlib's gmpzprobabprime_p function. Only uses probability based tests as it would equal factoring n` otherwise.
ToyPublicKeys.power_crt — Methodpower_crt(base::BigInt, pow::BigInt, p::BigInt, q::BigInt)Wrapper around core implementation, only for generating the parameters if they are not provided.
ToyPublicKeys.power_crt — Methodfunction power_crt(
base::BigInt,
p::BigInt,
q::BigInt,
d_p::BigInt,
d_q::BigInt,
q_inv::BigInt,
)CRT for PKCS #1 based parameters.
ToyPublicKeys.power_crt_components — Methodpower_crt_components(d::BigInt, p::BigInt, q::BigInt)Utility function for calculating dth power in p*q mod CRT parameters for PKCS #1.
ToyPublicKeys.power_crt_components — Methodpower_crt_components(e::BigInt, d::BigInt, primes::Vector{BigInt})Utility function for calculating the CRT parameters for PKCS #1.
ToyPublicKeys.rand_prime_for_rsa — Functionrand_prime_for_rsa(bits::Integer, no_gcd_with=big"65537")Helper function for rsa random primes, since they should satisfy special properties.
ToyPublicKeys.random_bigint_from_range — Methodrandom_bigint_from_range(bits::Integer)Custom random big int function since core julia does not yet provide 'proper one' (in my opinion).
ToyPublicKeys.sign — Methodsign(::pkcs1_v1_5_t,
msg::Vector{UInt8},
key::RSAPrivateKey)Sign string with RSA key.
ToyPublicKeys.sign — Methodsign(::pkcs1_v2_2_t,
msg::Vector{UInt8},
key::RSAPrivateKey)Sign string with RSA key.
ToyPublicKeys.sign — Methodsign(msg::Vector{UInt8},
key::RSAPrivateKey)Sign string with RSA key.
ToyPublicKeys.verify_signature — Methodverify_signature(::pkcs1_v1_5_t,
msg::Vector{UInt8},
signature::Vector{UInt8},
key::RSAPublicKey)Verify the signature.
ToyPublicKeys.verify_signature — Methodverify_signature(::pkcs1_v2_2_t,
msg::Vector{UInt8},
signature::Vector{UInt8},
key::RSAPublicKey)Verify the signature.
ToyPublicKeys.verify_signature — Methodverify_signature(msg::Vector{UInt8},
signature::Vector{UInt8},
key::RSAPublicKey)Verify the signature.
ToyPublicKeys.RSAKeyToyPublicKeys.RSAPrivateKeyToyPublicKeys.RSAPublicKeyToyPublicKeys.RSADPToyPublicKeys.RSAEPToyPublicKeys.RSASP1ToyPublicKeys.RSAStepToyPublicKeys.RSAStepToyPublicKeys.RSAVP1ToyPublicKeys.decryptToyPublicKeys.decryptToyPublicKeys.decryptToyPublicKeys.encryptToyPublicKeys.encryptToyPublicKeys.encryptToyPublicKeys.generate_rsa_key_pairToyPublicKeys.is_probab_prime_pToyPublicKeys.power_crtToyPublicKeys.power_crtToyPublicKeys.power_crt_componentsToyPublicKeys.power_crt_componentsToyPublicKeys.rand_prime_for_rsaToyPublicKeys.random_bigint_from_rangeToyPublicKeys.signToyPublicKeys.signToyPublicKeys.signToyPublicKeys.verify_signatureToyPublicKeys.verify_signatureToyPublicKeys.verify_signature