aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/asn1.h
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2025-01-22 13:07:23 +0000
committerMichael Brown <mcb30@ipxe.org>2025-01-28 16:57:40 +0000
commitbc5f3dbe3e03bc67a846981c1fb93206f5557283 (patch)
tree7f330866ceef7bb972b5e3bdf130e6b7eddd0c8e /src/include/ipxe/asn1.h
parentbe9ce490768dd4060fa4737ca5f50777ba6a15a8 (diff)
downloadipxe-bc5f3dbe3e03bc67a846981c1fb93206f5557283.tar.gz
[crypto] Add definitions and tests for the NIST P-256 elliptic curve
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/asn1.h')
-rw-r--r--src/include/ipxe/asn1.h6
1 files changed, 6 insertions, 0 deletions
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 ), \