diff options
| author | Michael Brown | 2015-04-12 15:50:18 +0200 |
|---|---|---|
| committer | Michael Brown | 2015-04-12 18:01:10 +0200 |
| commit | 4dbc44348ca9011465c3bce38757173c059309ec (patch) | |
| tree | c5f0790a71bc74fe3083a18e164416b0ecf3ed4b /src/include/ipxe/asn1.h | |
| parent | [test] Simplify digest algorithm self-tests (diff) | |
| download | ipxe-4dbc44348ca9011465c3bce38757173c059309ec.tar.gz ipxe-4dbc44348ca9011465c3bce38757173c059309ec.tar.xz ipxe-4dbc44348ca9011465c3bce38757173c059309ec.zip | |
[crypto] Add SHA-224 algorithm
SHA-224 is almost identical to SHA-256, with differing initial hash
values and a truncated output length.
This implementation has been verified using the NIST SHA-224 test
vectors.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/asn1.h')
| -rw-r--r-- | src/include/ipxe/asn1.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/include/ipxe/asn1.h b/src/include/ipxe/asn1.h index 3302c8053..4e8605fe3 100644 --- a/src/include/ipxe/asn1.h +++ b/src/include/ipxe/asn1.h @@ -160,6 +160,13 @@ struct asn1_builder_header { ASN1_OID_SINGLE ( 3 ), ASN1_OID_SINGLE ( 4 ), \ ASN1_OID_SINGLE ( 2 ), ASN1_OID_SINGLE ( 1 ) +/** ASN.1 OID for id-sha224 (2.16.840.1.101.3.4.2.4) */ +#define ASN1_OID_SHA224 \ + 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 ( 4 ) + /** ASN.1 OID for commonName (2.5.4.3) */ #define ASN1_OID_COMMON_NAME \ ASN1_OID_INITIAL ( 2, 5 ), ASN1_OID_SINGLE ( 4 ), \ |
