Class RsaKemHybridDecrypt
- java.lang.Object
-
- com.google.crypto.tink.hybrid.subtle.RsaKemHybridDecrypt
-
- All Implemented Interfaces:
HybridDecrypt
public final class RsaKemHybridDecrypt extends java.lang.Object implements HybridDecrypt
Hybrid encryption with RSA-KEM as defined in Shoup's ISO standard proposal as KEM, and AEAD as DEM and HKDF as KDF.Shoup's ISO standard proposal is available at https://www.shoup.net/iso/std6.pdf.
-
-
Constructor Summary
Constructors Constructor Description RsaKemHybridDecrypt(java.security.interfaces.RSAPrivateKey recipientPrivateKey, java.lang.String hkdfHmacAlgo, byte[] hkdfSalt, AeadFactory aeadFactory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RsaKemHybridDecryptcreate(java.security.PrivateKey recipientPrivateKey, java.lang.String hkdfHmacAlgo, byte[] hkdfSalt, AeadFactory aeadFactory)This alternate factory method is to support Android KeyStore, whose RSA private key class does not implement RSAPrivateKey.byte[]decrypt(byte[] ciphertext, byte[] contextInfo)Decryption operation: decryptsciphertextverifying the integrity ofcontextInfo.
-
-
-
Constructor Detail
-
RsaKemHybridDecrypt
public RsaKemHybridDecrypt(java.security.interfaces.RSAPrivateKey recipientPrivateKey, java.lang.String hkdfHmacAlgo, byte[] hkdfSalt, AeadFactory aeadFactory) throws java.security.GeneralSecurityException- Throws:
java.security.GeneralSecurityException
-
-
Method Detail
-
create
public static RsaKemHybridDecrypt create(java.security.PrivateKey recipientPrivateKey, java.lang.String hkdfHmacAlgo, byte[] hkdfSalt, AeadFactory aeadFactory) throws java.security.GeneralSecurityException
This alternate factory method is to support Android KeyStore, whose RSA private key class does not implement RSAPrivateKey.- Parameters:
recipientPrivateKey- should implement both PrivateKey and RSAKey.- Throws:
java.security.GeneralSecurityException
-
decrypt
public byte[] decrypt(byte[] ciphertext, byte[] contextInfo) throws java.security.GeneralSecurityExceptionDescription copied from interface:HybridDecryptDecryption operation: decryptsciphertextverifying the integrity ofcontextInfo.- Specified by:
decryptin interfaceHybridDecrypt- Returns:
- resulting plaintext
- Throws:
java.security.GeneralSecurityException
-
-