A function that will take arbitrary slices, hash with BLAKE2b into 256-bit numbers, and perform a modulus multiplication to produce valid scalars.
fn from_var_bytes(bytes: &[u8]) -> Scalar
Possible solution design or implementation
Such functionality is required for downstream protocols such as Phoenix or Rusk contract ID computation. They produce arbitrary bytes, being either asymmetric key exchange protocols or network transaction payload, annd perform off-circuit field operations with such inputs.
Summary
A function that will take arbitrary slices, hash with BLAKE2b into 256-bit numbers, and perform a modulus multiplication to produce valid scalars.
Possible solution design or implementation
Such functionality is required for downstream protocols such as Phoenix or Rusk contract ID computation. They produce arbitrary bytes, being either asymmetric key exchange protocols or network transaction payload, annd perform off-circuit field operations with such inputs.