pub fn hook_ed_decompress(buf: &[u8]) -> Result<Vec<u8>, ExitCode>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.