RSA
class RSA constructor(val publicKey: CryptoPublicKey.RSA, val privateKey: BigInteger, val prime1: BigInteger, val prime2: BigInteger, val prime1exponent: BigInteger, val prime2exponent: BigInteger, val crtCoefficient: BigInteger, val otherPrimeInfos: List<CryptoPrivateKey.RSA.PrimeInfo>?, val attributes: List<Asn1Element>? = null) : CryptoPrivateKey.Impl, CryptoPrivateKey.WithPublicKey<CryptoPublicKey.RSA>
PKCS#1 RSA Private key representation as per RFC 8017 augmented with optional attributes. Attributes are never PKCS#1 encoded, but are relevant when PKCS#8-encoding a private key.
Constructors
Link copied to clipboard
constructor(publicKey: CryptoPublicKey.RSA, privateKey: BigInteger, prime1: BigInteger, prime2: BigInteger, prime1exponent: BigInteger, prime2exponent: BigInteger, crtCoefficient: BigInteger, otherPrimeInfos: List<CryptoPrivateKey.RSA.PrimeInfo>?, attributes: List<Asn1Element>? = null)
Properties
Link copied to clipboard
optional attributes relevant when PKCS#8-encoding a private key
Link copied to clipboard
Link copied to clipboard
qInv: the factors' CRT coefficient (q^(-1) mod p)
Link copied to clipboard
information about additional prime factors: triples (r_i, d_i, t_i) of prime factor, exponent, coefficient
Link copied to clipboard
dP: the first factor's CRT exponent
Link copied to clipboard
dQ: the second factor's CRT exponent
Link copied to clipboard
d: the private key such that d*e = 1 mod phi(n)
Link copied to clipboard
The CryptoPublicKey.RSA (n,e) matching this private key
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
PKCS#8 encoding of a private key:
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Converts this privateKey into a SecKeyRef, making it usable on iOS
Link copied to clipboard