From bc5f3dbe3e03bc67a846981c1fb93206f5557283 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 22 Jan 2025 13:07:23 +0000 Subject: [crypto] Add definitions and tests for the NIST P-256 elliptic curve Signed-off-by: Michael Brown --- src/include/ipxe/asn1.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/include/ipxe/asn1.h') diff --git a/src/include/ipxe/asn1.h b/src/include/ipxe/asn1.h index 752b423b9..d503ccf9b 100644 --- a/src/include/ipxe/asn1.h +++ b/src/include/ipxe/asn1.h @@ -127,6 +127,12 @@ struct asn1_builder_header { #define ASN1_OID_TRIPLE( value ) \ ( 0x80 | ( ( (value) >> 14 ) & 0x7f ) ), ASN1_OID_DOUBLE ( (value) ) +/** ASN.1 OID for prime256v1 (1.2.840.10045.3.1.7) */ +#define ASN1_OID_PRIME256V1 \ + ASN1_OID_INITIAL ( 1, 1 ), ASN1_OID_DOUBLE ( 840 ), \ + ASN1_OID_DOUBLE ( 10045 ), ASN1_OID_SINGLE ( 3 ), \ + ASN1_OID_SINGLE ( 1 ), ASN1_OID_SINGLE ( 7 ) + /** ASN.1 OID for rsaEncryption (1.2.840.113549.1.1.1) */ #define ASN1_OID_RSAENCRYPTION \ ASN1_OID_INITIAL ( 1, 2 ), ASN1_OID_DOUBLE ( 840 ), \ -- cgit