Function fromHash [src]
Map a 64-bit hash into an Edwards25519 point
Prototype
pub fn fromHash(h: [64]u8) Edwards25519
Parameters
h: [64]u8
Source
pub fn fromHash(h: [64]u8) Edwards25519 {
const fe_f = Fe.fromBytes64(h);
var elr = elligator2(fe_f);
const y_sign = !elr.not_square;
const y_neg = elr.y.neg();
elr.y.cMov(y_neg, @intFromBool(elr.y.isNegative()) ^ @intFromBool(y_sign));
return montToEd(elr.x, elr.y).clearCofactor();
}