Class FrodoKEMEngine
- java.lang.Object
-
- org.bouncycastle.crypto.kems.frodo.FrodoKEMEngine
-
public class FrodoKEMEngine extends java.lang.ObjectFrodoKEM as standardised in ISO/IEC 18033-2:2006/Amd 2:2026, Clause 14, for the SHAKE parameter sets at security levels 976 and 1344. A single engine implements both the salted "FrodoKEM" (Salted Fujisaki-Okamoto transform) and the ephemeral "eFrodoKEM" (no salt) variants, selected by thesaltedflag: when salted, the seed seedSE is enlarged to 2*len_mu bits and a salt of 2*len_mu bits is folded into the G_2 hash and the shared secret and carried in the ciphertext; when not salted, len_salt is zero and every salt operation below is a no-op.
-
-
Field Summary
Fields Modifier and Type Field Description static intnbar
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCipherTextSize()static FrodoKEMEnginegetInstance(FrodoKEMParameters params)intgetPrivateKeySize()intgetPublicKeySize()intgetSessionKeySize()voidkem_dec(byte[] ss, byte[] ct, byte[] sk)voidkem_enc(byte[] ct, byte[] ss, byte[] pk, java.security.SecureRandom random)voidkem_keypair(byte[] pk, byte[] sk, java.security.SecureRandom random)
-
-
-
Field Detail
-
nbar
public static final int nbar
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static FrodoKEMEngine getInstance(FrodoKEMParameters params)
-
getCipherTextSize
public int getCipherTextSize()
-
getSessionKeySize
public int getSessionKeySize()
-
getPrivateKeySize
public int getPrivateKeySize()
-
getPublicKeySize
public int getPublicKeySize()
-
kem_keypair
public void kem_keypair(byte[] pk, byte[] sk, java.security.SecureRandom random)
-
kem_enc
public void kem_enc(byte[] ct, byte[] ss, byte[] pk, java.security.SecureRandom random)
-
kem_dec
public void kem_dec(byte[] ss, byte[] ct, byte[] sk)
-
-