in akd_client/src/ecvrf.rs [131:149]
fn hash_to_curve(&self, alpha: &[u8]) -> EdwardsPoint {
let mut result = [0u8; 32];
let mut counter = 0;
let mut wrapped_point: Option<EdwardsPoint> = None;
while wrapped_point.is_none() {
let hash = Sha512::new()
.chain(&[SUITE, ONE])
.chain(self.0.as_bytes())
.chain(&alpha)
.chain(&[counter])
.finalize();
result.copy_from_slice(&hash[..32]);
wrapped_point = CompressedEdwardsY::from_slice(&result).decompress();
counter += 1;
}
wrapped_point.unwrap().mul_by_cofactor()
}