pyecsca.sca.re.zvp module¶
Provides functionality inspired by the Zero-value point attack [ZVP].
Implements ZVP point construction from [FFD].
- map_to_affine(formula, polys)[source]¶
Map unrolled polynomials of a formula to affine form, using some assumptions along the way (e.g. Z = 1).
- compute_factor_set(formula, affine=True, filter_nonhomo=True, xonly=False)[source]¶
Compute a set of factors present in the
formula
.- Parameters:
- Return type:
Set
[Poly
]- Returns:
The set of factors present in the formula.
- zvp_points(poly, curve, k, n)[source]¶
Find a set of (affine) ZVP points for a given intermediate value and dlog relationship.
- Parameters:
poly¶ (
Poly
) – The polynomial to zero out, obtained as a result ofunroll_formula()
(or its factor).curve¶ (
EllipticCurve
) – The curve to compute over.k¶ (
int
) – The discrete-log relationship between the two points, i.e. (x2, x2) = [k](x1, x1)n¶ (
int
) – The curve order.
- Return type:
Set
[Point
]- Returns:
The set of points (x1, y1).