Class McElieceFujisakiCipher
java.lang.Object
org.bouncycastle.pqc.legacy.crypto.mceliece.McElieceFujisakiCipher
- All Implemented Interfaces:
MessageEncryptor
This class implements the Fujisaki/Okamoto conversion of the McEliecePKCS.
Fujisaki and Okamoto propose hybrid encryption that merges a symmetric
encryption scheme which is secure in the find-guess model with an asymmetric
one-way encryption scheme which is sufficiently probabilistic to obtain a
public key cryptosystem which is CCA2-secure. For details, see D. Engelbert,
R. Overbeck, A. Schmidt, "A Summary of McEliece-Type Cryptosystems and their Security", technical report.
https://www.degruyter.com/document/doi/10.1515/JMC.2007.009/html
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
void
init
(boolean forEncryption, CipherParameters param) byte[]
messageDecrypt
(byte[] input) byte[]
messageEncrypt
(byte[] input)
-
Field Details
-
OID
The OID of the algorithm.- See Also:
-
-
Constructor Details
-
McElieceFujisakiCipher
public McElieceFujisakiCipher()
-
-
Method Details
-
init
- Specified by:
init
in interfaceMessageEncryptor
- Parameters:
forEncryption
- true if we are encrypting a signature, false otherwise.param
- key parameters for encryption or decryption.
-
getKeySize
- Throws:
IllegalArgumentException
-
messageEncrypt
public byte[] messageEncrypt(byte[] input) - Specified by:
messageEncrypt
in interfaceMessageEncryptor
- Parameters:
input
- the message to be signed.
-
messageDecrypt
- Specified by:
messageDecrypt
in interfaceMessageEncryptor
- Parameters:
input
- the cipher text of the message- Throws:
InvalidCipherTextException
-