mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-31 01:04:03 -05:00
Add crypto_ec_point_cmp()
This is needed to allow SAE to check whether ECC elements are identical. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
8e2a3a4c21
commit
4e7e68890a
@ -776,4 +776,15 @@ int crypto_ec_point_is_at_infinity(struct crypto_ec *e,
|
|||||||
int crypto_ec_point_is_on_curve(struct crypto_ec *e,
|
int crypto_ec_point_is_on_curve(struct crypto_ec *e,
|
||||||
const struct crypto_ec_point *p);
|
const struct crypto_ec_point *p);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* crypto_ec_point_cmp - Compare two EC points
|
||||||
|
* @e: EC context from crypto_ec_init()
|
||||||
|
* @a: EC point
|
||||||
|
* @b: EC point
|
||||||
|
* Returns: 0 on equal, non-zero otherwise
|
||||||
|
*/
|
||||||
|
int crypto_ec_point_cmp(const struct crypto_ec *e,
|
||||||
|
const struct crypto_ec_point *a,
|
||||||
|
const struct crypto_ec_point *b);
|
||||||
|
|
||||||
#endif /* CRYPTO_H */
|
#endif /* CRYPTO_H */
|
||||||
|
@ -1326,4 +1326,13 @@ int crypto_ec_point_is_on_curve(struct crypto_ec *e,
|
|||||||
return EC_POINT_is_on_curve(e->group, (const EC_POINT *) p, e->bnctx);
|
return EC_POINT_is_on_curve(e->group, (const EC_POINT *) p, e->bnctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int crypto_ec_point_cmp(const struct crypto_ec *e,
|
||||||
|
const struct crypto_ec_point *a,
|
||||||
|
const struct crypto_ec_point *b)
|
||||||
|
{
|
||||||
|
return EC_POINT_cmp(e->group, (const EC_POINT *) a,
|
||||||
|
(const EC_POINT *) b, e->bnctx);
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_ECC */
|
#endif /* CONFIG_ECC */
|
||||||
|
Loading…
Reference in New Issue
Block a user