From e5e91ab47107dde8eb66442cf35722b5c2ee89f9 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Sun, 12 Apr 2015 16:34:33 +0100 Subject: [crypto] Add SHA-512/256 algorithm SHA-512/256 is almost identical to SHA-512, with differing initial hash values and a truncated output length. This implementation has been verified using the NIST SHA-512/256 test vectors. Signed-off-by: Michael Brown --- src/include/ipxe/asn1.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/include/ipxe/asn1.h') diff --git a/src/include/ipxe/asn1.h b/src/include/ipxe/asn1.h index 7550c4748..f9ae3112b 100644 --- a/src/include/ipxe/asn1.h +++ b/src/include/ipxe/asn1.h @@ -181,6 +181,13 @@ struct asn1_builder_header { ASN1_OID_SINGLE ( 3 ), ASN1_OID_SINGLE ( 4 ), \ ASN1_OID_SINGLE ( 2 ), ASN1_OID_SINGLE ( 4 ) +/** ASN.1 OID for id-sha512-256 (2.16.840.1.101.3.4.2.6) */ +#define ASN1_OID_SHA512_256 \ + ASN1_OID_INITIAL ( 2, 16 ), ASN1_OID_DOUBLE ( 840 ), \ + ASN1_OID_SINGLE ( 1 ), ASN1_OID_SINGLE ( 101 ), \ + ASN1_OID_SINGLE ( 3 ), ASN1_OID_SINGLE ( 4 ), \ + ASN1_OID_SINGLE ( 2 ), ASN1_OID_SINGLE ( 6 ) + /** ASN.1 OID for commonName (2.5.4.3) */ #define ASN1_OID_COMMON_NAME \ ASN1_OID_INITIAL ( 2, 5 ), ASN1_OID_SINGLE ( 4 ), \ -- cgit v1.2.3-55-g7522