Class CMCEEngine
java.lang.Object
org.bouncycastle.crypto.kems.cmce.CMCEEngine
The Classic McEliece KEM as standardised in ISO/IEC 18033-2:2006/Amd 2:2026, Clause 13. A single
engine implements both the non-pc construction (Encapsulation 13.12.2 / Decapsulation 13.13.2) and
the pc ("plaintext confirmation") construction (13.12.3 / 13.13.3), selected by the
pc
flag: when pc, a 32-byte confirmation C1 = Hash(2, e) is appended to the ciphertext and the
session key is hashed over the full C0 || C1. The semi-systematic "f" key-generation variant is
selected by the usePivots flag.-
Method Summary
Modifier and TypeMethodDescriptionintstatic CMCEEnginegetInstance(CMCEParameters params) intintintintkem_dec(byte[] key, byte[] cipher_text, byte[] sk) intkem_enc(byte[] cipher_text, byte[] key, byte[] pk, SecureRandom random) voidkem_keypair(byte[] pk, byte[] sk, SecureRandom random)
-
Method Details
-
getPrivateKeySize
public int getPrivateKeySize() -
getPublicKeySize
public int getPublicKeySize() -
getCipherTextSize
public int getCipherTextSize() -
getInstance
-
kem_keypair
-
kem_enc
-
kem_dec
public int kem_dec(byte[] key, byte[] cipher_text, byte[] sk) -
getSessionKeySize
public int getSessionKeySize()
-