junyechen1996 / draft-chen-cfrg-vdaf-pine

VDAF to support aggregating real number vectors with L2-norm bound
Other
4 stars 0 forks source link

Make sure l2_norm_bound is not negative #88

Closed cjpatton closed 2 months ago

cjpatton commented 2 months ago

The upper bits of the field are used for negative numbers. If l2_norm_bound is larger than the field modulus divided by 2, then it will be interpreted as a negative number.

Also rename encode_f64_into_field() to encode_float_into_field() since Python doesn't have an f64 type.