Class MLKEMIndCpa

java.lang.Object
org.bouncycastle.pqc.crypto.mlkem.MLKEMIndCpa

class MLKEMIndCpa extends Object
  • Constructor Details

  • Method Details

    • generateKeyPair

      byte[][] generateKeyPair(byte[] d)
      Generates IndCpa Key Pair
      Returns:
      KeyPair where each key is represented as bytes
    • decrypt

      void decrypt(byte[] secretKey, byte[] cipherText, byte[] m)
    • encrypt

      byte[] encrypt(byte[] pk, int pkOff, byte[] msg, int msgOff, byte[] coins, int coinsOff)
    • packPublicKey

      byte[] packPublicKey(PolyVec publicKeyPolyVec, byte[] seed)
    • unpackPublicKey

      byte[] unpackPublicKey(PolyVec publicKeyPolyVec, byte[] pk, int pkOff)
    • packSecretKey

      byte[] packSecretKey(PolyVec secretKeyPolyVec)
    • unpackSecretKey

      void unpackSecretKey(PolyVec secretKeyPolyVec, byte[] secretKey)
    • generateMatrixA

      void generateMatrixA(PolyVec[] aMatrix, byte[] seed, boolean transpose)