public class McEliecePointchevalCipher extends Object implements MessageEncryptor
Modifier and Type | Field and Description |
---|---|
static String |
OID
The OID of the algorithm.
|
Constructor and Description |
---|
McEliecePointchevalCipher() |
Modifier and Type | Method and Description |
---|---|
protected int |
decryptOutputSize(int inLen) |
protected int |
encryptOutputSize(int inLen) |
int |
getKeySize(McElieceCCA2KeyParameters key)
Return the key size of the given key object.
|
void |
init(boolean forEncryption,
CipherParameters param) |
void |
initCipherDecrypt(McElieceCCA2PrivateKeyParameters privKey) |
void |
initCipherEncrypt(McElieceCCA2PublicKeyParameters pubKey) |
byte[] |
messageDecrypt(byte[] input) |
byte[] |
messageEncrypt(byte[] input) |
public static final String OID
public void init(boolean forEncryption, CipherParameters param)
init
in interface MessageEncryptor
forEncryption
- true if we are encrypting a signature, false
otherwise.param
- key parameters for encryption or decryption.public int getKeySize(McElieceCCA2KeyParameters key) throws IllegalArgumentException
key
- the McElieceCCA2KeyParameters objectIllegalArgumentException
- if the key is invalidprotected int decryptOutputSize(int inLen)
protected int encryptOutputSize(int inLen)
public void initCipherEncrypt(McElieceCCA2PublicKeyParameters pubKey)
public void initCipherDecrypt(McElieceCCA2PrivateKeyParameters privKey)
public byte[] messageEncrypt(byte[] input)
messageEncrypt
in interface MessageEncryptor
input
- the message to be signed.public byte[] messageDecrypt(byte[] input) throws InvalidCipherTextException
messageDecrypt
in interface MessageEncryptor
input
- the cipher text of the messageInvalidCipherTextException
Copyright © 2017 BouncyCastle.org. All rights reserved.