Top Inners Fields Constructors Methods
org.bouncycastle.pqc.jcajce.provider.mceliece

public Class McEliecePKCSCipherSpi

extends AsymmetricBlockCipher
implements PKCSObjectIdentifiers, X509ObjectIdentifiers
Class Inheritance
All Implemented Interfaces
org.bouncycastle.asn1.x509.X509ObjectIdentifiers, org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers
Known Direct Subclasses
org.bouncycastle.pqc.jcajce.provider.mceliece.McEliecePKCSCipherSpi.McEliecePKCS
Imports
java.security.InvalidAlgorithmParameterException, .InvalidKeyException, .Key, .PrivateKey, .PublicKey, .SecureRandom, java.security.spec.AlgorithmParameterSpec, javax.crypto.BadPaddingException, .IllegalBlockSizeException, org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers, org.bouncycastle.asn1.x509.X509ObjectIdentifiers, org.bouncycastle.crypto.CipherParameters, org.bouncycastle.crypto.params.ParametersWithRandom, org.bouncycastle.pqc.jcajce.provider.util.AsymmetricBlockCipher, org.bouncycastle.pqc.legacy.crypto.mceliece.McElieceCipher, .McElieceKeyParameters

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private McElieceCipher
Inherited from org.bouncycastle.pqc.jcajce.provider.util.AsymmetricBlockCipher:
bufcipherTextSizemaxPlainTextSizeparamSpec

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int
getKeySize(Key
the key object
key
)

Implements abstract org.bouncycastle.pqc.jcajce.provider.util.CipherSpiExt.getKeySize.

Return the key size of the given key object in bits.

public String
protected void
initCipherDecrypt(Key
the key which has to be used to decrypt data
key
,
AlgorithmParameterSpec
the algorithm parameters
params
)

Implements abstract org.bouncycastle.pqc.jcajce.provider.util.AsymmetricBlockCipher.initCipherDecrypt.

Initialize the AsymmetricBlockCipher with a certain key for data encryption.

protected void
initCipherEncrypt(Key
the key which has to be used to encrypt data
key
,
AlgorithmParameterSpec
the algorithm parameters
params
,
SecureRandom
the source of randomness
sr
)

Implements abstract org.bouncycastle.pqc.jcajce.provider.util.AsymmetricBlockCipher.initCipherEncrypt.

Initialize the AsymmetricBlockCipher with a certain key for data encryption.

protected byte[]
messageDecrypt(byte[]
the ciphertext to be decrypted (the ciphertext length is less than or equal to maxCipherTextSize)
input
)

Implements abstract org.bouncycastle.pqc.jcajce.provider.util.AsymmetricBlockCipher.messageDecrypt.

Decrypt the ciphertext stored in input.

protected byte[]
messageEncrypt(byte[]
the message to be encrypted (usually the message length is less than or equal to maxPlainTextSize)
input
)

Implements abstract org.bouncycastle.pqc.jcajce.provider.util.AsymmetricBlockCipher.messageEncrypt.

Encrypt the message stored in input.

Inherited from org.bouncycastle.pqc.jcajce.provider.util.AsymmetricBlockCipher:
checkLengthdoFinaldoFinalgetBlockSizegetIVgetOutputSizegetParametersinitDecryptinitDecryptinitEncryptinitEncryptinitEncryptinitEncryptsetModesetPaddingupdateupdate

Field Detail

cipherback to summary
private McElieceCipher cipher

Constructor Detail

McEliecePKCSCipherSpiback to summary
public McEliecePKCSCipherSpi(McElieceCipher cipher)

Method Detail

getKeySizeback to summary
public int getKeySize(Key key) throws InvalidKeyException

Implements abstract org.bouncycastle.pqc.jcajce.provider.util.CipherSpiExt.getKeySize.

Doc from org.bouncycastle.pqc.jcajce.provider.util.CipherSpiExt.getKeySize.

Return the key size of the given key object in bits.

Parameters
key:Key

the key object

Returns:int

the key size in bits of the given key object

Exceptions
InvalidKeyException:
if key is invalid.
getNameback to summary
public String getName()

Implements abstract org.bouncycastle.pqc.jcajce.provider.util.CipherSpiExt.getName.

Returns:String

Doc from org.bouncycastle.pqc.jcajce.provider.util.CipherSpiExt.getName.

the name of this cipher

initCipherDecryptback to summary
protected void initCipherDecrypt(Key key, AlgorithmParameterSpec params) throws InvalidKeyException, InvalidAlgorithmParameterException

Implements abstract org.bouncycastle.pqc.jcajce.provider.util.AsymmetricBlockCipher.initCipherDecrypt.

Doc from org.bouncycastle.pqc.jcajce.provider.util.AsymmetricBlockCipher.initCipherDecrypt.

Initialize the AsymmetricBlockCipher with a certain key for data encryption.

Parameters
key:Key

the key which has to be used to decrypt data

params:AlgorithmParameterSpec

the algorithm parameters

Exceptions
InvalidKeyException:
if the given key is inappropriate for initializing this cipher
InvalidAlgorithmParameterException:
if the given parameters are inappropriate for initializing this cipher.
initCipherEncryptback to summary
protected void initCipherEncrypt(Key key, AlgorithmParameterSpec params, SecureRandom sr) throws InvalidKeyException, InvalidAlgorithmParameterException

Implements abstract org.bouncycastle.pqc.jcajce.provider.util.AsymmetricBlockCipher.initCipherEncrypt.

Doc from org.bouncycastle.pqc.jcajce.provider.util.AsymmetricBlockCipher.initCipherEncrypt.

Initialize the AsymmetricBlockCipher with a certain key for data encryption.

Parameters
key:Key

the key which has to be used to encrypt data

params:AlgorithmParameterSpec

the algorithm parameters

sr:SecureRandom

the source of randomness

Exceptions
InvalidKeyException:
if the given key is inappropriate for initializing this cipher.
InvalidAlgorithmParameterException:
if the given parameters are inappropriate for initializing this cipher.
messageDecryptback to summary
protected byte[] messageDecrypt(byte[] input) throws IllegalBlockSizeException, BadPaddingException

Implements abstract org.bouncycastle.pqc.jcajce.provider.util.AsymmetricBlockCipher.messageDecrypt.

Doc from org.bouncycastle.pqc.jcajce.provider.util.AsymmetricBlockCipher.messageDecrypt.

Decrypt the ciphertext stored in input. The method should also perform an additional length check.

Parameters
input:byte[]

the ciphertext to be decrypted (the ciphertext length is less than or equal to maxCipherTextSize)

Returns:byte[]

the decrypted message

Exceptions
IllegalBlockSizeException:
if the input is inappropriate for this cipher.
BadPaddingException:
if the input format is invalid.
messageEncryptback to summary
protected byte[] messageEncrypt(byte[] input) throws IllegalBlockSizeException, BadPaddingException

Implements abstract org.bouncycastle.pqc.jcajce.provider.util.AsymmetricBlockCipher.messageEncrypt.

Doc from org.bouncycastle.pqc.jcajce.provider.util.AsymmetricBlockCipher.messageEncrypt.

Encrypt the message stored in input. The method should also perform an additional length check.

Parameters
input:byte[]

the message to be encrypted (usually the message length is less than or equal to maxPlainTextSize)

Returns:byte[]

the encrypted message (it has length equal to maxCipherTextSize_)

Exceptions
IllegalBlockSizeException:
if the input is inappropriate for this cipher.
BadPaddingException:
if the input format is invalid.
org.bouncycastle.pqc.jcajce.provider.mceliece back to summary

public Class McEliecePKCSCipherSpi.McEliecePKCS

extends McEliecePKCSCipherSpi
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.bouncycastle.pqc.jcajce.provider.mceliece.McEliecePKCSCipherSpi:
getKeySizegetNameinitCipherDecryptinitCipherEncryptmessageDecryptmessageEncrypt

Constructor Detail

McEliecePKCSback to summary
public McEliecePKCS()