pseudoRando method

  1. @override
BuBytes pseudoRando({
  1. required List<int> nk,
  2. required List<int> rho,
})
override

PRF^nfOrchard(nk, ρ) := Poseidon(nk, ρ) — LE Fp in/out (32 bytes).

Implementation

@override
BuBytes pseudoRando({required List<int> nk, required List<int> rho}) {
  if (nk.length != 32 || rho.length != 32) {
    throw CoreErrors.cryptoFailed(
      'pseudoRando',
      reason: 'nk and rho must be 32-byte LE Fp',
    );
  }
  return api
      .poseidonHashTwo(a: nk.asBytes, b: rho.asBytes)
      .unwrapOrThrowCryptoError();
}