org.bouncycastle.pqc.crypto.mlkem

## Class Symmetric

- java.lang.Object
- - org.bouncycastle.pqc.crypto.mlkem.Symmetric

- Direct Known Subclasses:
    Symmetric.ShakeSymmetric

      abstract class Symmetric
      extends Object

  Abstract base class for symmetric cryptographic primitives in ML-KEM. Provides hash function interfaces for different symmetric operations.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `(package private) static class` | `Symmetric.ShakeSymmetric` SHAKE-based symmetric implementation for ML-KEM operations.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) int` | `xofBlockBytes`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Symmetric(int blockBytes)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) abstract void` | `hash_g(byte[] out, byte[] in)`
    `(package private) abstract void` | `hash_h(byte[] out, byte[] in, int outOffset)`
    `(package private) abstract void` | `kdf(byte[] out, byte[] in)`
    `(package private) abstract void` | `prf(byte[] out, byte[] key, byte nonce)`
    `(package private) abstract void` | `xofAbsorb(byte[] seed, byte x, byte y)`
    `(package private) abstract void` | `xofSqueezeBlocks(byte[] out, int outOffset, int outLen)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### xofBlockBytes

          final int xofBlockBytes

  - ### Constructor Detail

    - #### Symmetric

          Symmetric(int blockBytes)

  - ### Method Detail

    - #### hash_g

          abstract void hash_g(byte[] out,
                               byte[] in)

    - #### hash_h

          abstract void hash_h(byte[] out,
                               byte[] in,
                               int outOffset)

    - #### kdf

          abstract void kdf(byte[] out,
                            byte[] in)

    - #### prf

          abstract void prf(byte[] out,
                            byte[] key,
                            byte nonce)

    - #### xofAbsorb

          abstract void xofAbsorb(byte[] seed,
                                  byte x,
                                  byte y)

    - #### xofSqueezeBlocks

          abstract void xofSqueezeBlocks(byte[] out,
                                         int outOffset,
                                         int outLen)