Cha Cha Engine.Permute Method
Applies the ChaCha permutation to a 16-word (512-bit) state.
Definition
Namespace: Numerics.NET.Random.Engines
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
C#
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
public static void Permute(
Span<uint> state,
int rounds
)Parameters
Remarks
This method performs the ChaCha permutation in-place on the provided state. The state is modified directly and represents the output after the specified number of rounds.
Note: This method performs only the permutation step. To generate the final ChaCha output block, the original state must be added to the permuted state (ARX construction).
Exceptions
| Argument | Thrown when state length is not 16 or rounds is not 8, 12, or 20. |