Package com.google.crypto.tink.jwt
Class JwtRsaSsaPkcs1PrivateKey
- java.lang.Object
-
- com.google.crypto.tink.Key
-
- com.google.crypto.tink.jwt.JwtSignaturePrivateKey
-
- com.google.crypto.tink.jwt.JwtRsaSsaPkcs1PrivateKey
-
- All Implemented Interfaces:
PrivateKey
public final class JwtRsaSsaPkcs1PrivateKey extends JwtSignaturePrivateKey
Represents a private key for RSA SSA PKCS1 signatures (RS256, RS384, RS512).Standard: https://datatracker.ietf.org/doc/html/rfc7518
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJwtRsaSsaPkcs1PrivateKey.BuilderBuilder for JwtRsaSsaPkcs1PrivateKey.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JwtRsaSsaPkcs1PrivateKey.Builderbuilder()booleanequalsKey(Key o)Returns true if the key is guaranteed to be equal toother.SecretBigIntegergetCrtCoefficient()Returns the CRT coefficient qInv.JwtRsaSsaPkcs1ParametersgetParameters()Returns the key parameters.SecretBigIntegergetPrimeExponentP()Returns the prime exponent dP.SecretBigIntegergetPrimeExponentQ()Returns the prime exponent dQ.SecretBigIntegergetPrimeP()Returns the prime factor p.SecretBigIntegergetPrimeQ()Returns the prime factor q.SecretBigIntegergetPrivateExponent()Returns the private exponent d.JwtRsaSsaPkcs1PublicKeygetPublicKey()Returns the public key.-
Methods inherited from class com.google.crypto.tink.jwt.JwtSignaturePrivateKey
getIdRequirementOrNull, getKid
-
-
-
-
Method Detail
-
builder
public static JwtRsaSsaPkcs1PrivateKey.Builder builder()
-
getParameters
public JwtRsaSsaPkcs1Parameters getParameters()
Returns the key parameters.- Specified by:
getParametersin classJwtSignaturePrivateKey
-
getPublicKey
public JwtRsaSsaPkcs1PublicKey getPublicKey()
Returns the public key.- Specified by:
getPublicKeyin interfacePrivateKey- Specified by:
getPublicKeyin classJwtSignaturePrivateKey
-
getPrimeP
public SecretBigInteger getPrimeP()
Returns the prime factor p.
-
getPrimeQ
public SecretBigInteger getPrimeQ()
Returns the prime factor q.
-
getPrivateExponent
public SecretBigInteger getPrivateExponent()
Returns the private exponent d.
-
getPrimeExponentP
public SecretBigInteger getPrimeExponentP()
Returns the prime exponent dP.
-
getPrimeExponentQ
public SecretBigInteger getPrimeExponentQ()
Returns the prime exponent dQ.
-
getCrtCoefficient
public SecretBigInteger getCrtCoefficient()
Returns the CRT coefficient qInv.
-
equalsKey
public boolean equalsKey(Key o)
Description copied from class:KeyReturns true if the key is guaranteed to be equal toother.Implementations are required to do this in constant time.
Note: this is allowed to return false even if two keys are guaranteed to represent the same function, but are represented differently. For example, a key is allowed to internally store the number of zero-bytes used as padding when a large number is represented as a byte array, and use this in the comparison.
Note: Tink
Keyobjects should typically not overridehashCode(because it could risk leaking key material). Hence, they typically also should not overrideequals.
-
-