diff --git a/src/crypto/mishmash/oid_x25519.c b/src/crypto/mishmash/oid_x25519.c index da05efb1f..6da8f3559 100644 --- a/src/crypto/mishmash/oid_x25519.c +++ b/src/crypto/mishmash/oid_x25519.c @@ -35,7 +35,6 @@ static uint8_t oid_x25519[] = { ASN1_OID_X25519 }; /** "x25519" OID-identified algorithm */ struct asn1_algorithm oid_x25519_algorithm __asn1_algorithm = { .name = "x25519", - .curve = &x25519_curve, .oid = ASN1_CURSOR ( oid_x25519 ), }; diff --git a/src/crypto/x25519.c b/src/crypto/x25519.c index 2a174a501..58382bc89 100644 --- a/src/crypto/x25519.c +++ b/src/crypto/x25519.c @@ -830,59 +830,6 @@ void x25519_key ( const struct x25519_value *base, x25519_reverse ( result ); } -/** - * Check if this is the point at infinity - * - * @v point Curve point - * @ret is_infinity This is the point at infinity - */ -static int x25519_curve_is_infinity ( const void *point ) { - - /* We use all zeroes for the point at infinity (as per RFC8422) */ - return x25519_is_zero ( point ); -} - -/** - * Multiply scalar by curve point - * - * @v base Base point - * @v scalar Scalar multiple - * @v result Result point to fill in - * @ret rc Return status code - */ -static int x25519_curve_multiply ( const void *base, const void *scalar, - void *result ) { - - x25519_key ( base, scalar, result ); - return 0; -} - -/** - * Add curve points (as a one-off operation) - * - * @v addend Curve point to add - * @v augend Curve point to add - * @v result Curve point to hold result - * @ret rc Return status code - */ -static int x25519_curve_add ( const void *addend __unused, - const void *augend __unused, - void *result __unused ) { - - return -ENOTTY; -} - -/** X25519 elliptic curve */ -struct elliptic_curve x25519_curve = { - .name = "x25519", - .pointsize = sizeof ( struct x25519_value ), - .keysize = sizeof ( struct x25519_value ), - .base = x25519_generator.raw, - .is_infinity = x25519_curve_is_infinity, - .multiply = x25519_curve_multiply, - .add = x25519_curve_add, -}; - /** * Calculate public key * diff --git a/src/include/ipxe/x25519.h b/src/include/ipxe/x25519.h index 358746366..88f3d66c1 100644 --- a/src/include/ipxe/x25519.h +++ b/src/include/ipxe/x25519.h @@ -91,7 +91,6 @@ extern void x25519_key ( const struct x25519_value *base, struct x25519_value *result ); extern int x25519_is_zero ( const struct x25519_value *value ); -extern struct elliptic_curve x25519_curve; extern struct exchange_algorithm x25519_algorithm; #endif /* _IPXE_X25519_H */