hook_ed_decompress

Function hook_ed_decompress 

Source
pub fn hook_ed_decompress(_: HookEnv<'_, '_>, buf: &[u8]) -> Vec<Vec<u8>>
Expand description

Checks if a compressed Edwards point can be decompressed.

ยงArguments

  • env - The environment in which the hook is invoked.
  • buf - The buffer containing the compressed Edwards point.
    • The compressed Edwards point is 32 bytes.
    • The high bit of the last byte is the sign bit.

Returns vec![vec![1]] if the point is decompressable. Returns vec![vec![0], v_inv, nqr_hint] if the point is not decompressable.

WARNING: This function merely hints at the validity of the compressed point. These values must be constrained by the zkVM for correctness.