|
Bouncy Castle Cryptography Library 1.49 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.bouncycastle.pqc.crypto.mceliece.McEliecePKCSCipher
public class McEliecePKCSCipher
This class implements the McEliece Public Key cryptosystem (McEliecePKCS). It was first described in R.J. McEliece, "A public key cryptosystem based on algebraic coding theory", DSN progress report, 42-44:114-116, 1978. The McEliecePKCS is the first cryptosystem which is based on error correcting codes. The trapdoor for the McEliece cryptosystem using Goppa codes is the knowledge of the Goppa polynomial used to generate the code.
Field Summary | |
---|---|
int |
cipherTextSize
|
int |
maxPlainTextSize
|
static java.lang.String |
OID
The OID of the algorithm. |
Constructor Summary | |
---|---|
McEliecePKCSCipher()
|
Method Summary | |
---|---|
int |
getKeySize(McElieceKeyParameters key)
Return the key size of the given key object. |
void |
init(boolean forSigning,
CipherParameters param)
|
void |
initCipherDecrypt(McEliecePrivateKeyParameters privKey)
|
void |
initCipherEncrypt(McEliecePublicKeyParameters pubKey)
|
byte[] |
messageDecrypt(byte[] input)
Decrypt a cipher text. |
byte[] |
messageEncrypt(byte[] input)
Encrypt a plain text. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String OID
public int maxPlainTextSize
public int cipherTextSize
Constructor Detail |
---|
public McEliecePKCSCipher()
Method Detail |
---|
public void init(boolean forSigning, CipherParameters param)
init
in interface MessageEncryptor
forSigning
- true if we are encrypting a signature, false
otherwise.param
- key parameters for encryption or decryption.public int getKeySize(McElieceKeyParameters key)
key
- the McElieceKeyParameters object
public void initCipherEncrypt(McEliecePublicKeyParameters pubKey)
public void initCipherDecrypt(McEliecePrivateKeyParameters privKey)
public byte[] messageEncrypt(byte[] input)
messageEncrypt
in interface MessageEncryptor
input
- the plain text
public byte[] messageDecrypt(byte[] input) throws java.lang.Exception
messageDecrypt
in interface MessageEncryptor
input
- the cipher text
java.lang.Exception
- if the cipher text is invalid.
|
Bouncy Castle Cryptography Library 1.49 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |