Functions | Variables
sha224.c File Reference

SHA-224 algorithm. More...

#include <stdint.h>
#include <byteswap.h>
#include <ipxe/crypto.h>
#include <ipxe/asn1.h>
#include <ipxe/sha256.h>

Go to the source code of this file.


static void sha224_init (void *ctx)
 Initialise SHA-224 algorithm. More...


static const struct sha256_digest sha224_init_digest
 SHA-224 initial digest values. More...
struct digest_algorithm sha224_algorithm
 SHA-224 algorithm. More...
static uint8_t oid_sha224 [] = { ASN1_OID_SHA224 }
 "sha224" object identifier More...
struct asn1_algorithm oid_sha224_algorithm __asn1_algorithm
 "sha224" OID-identified algorithm More...

Detailed Description

SHA-224 algorithm.

Definition in file sha224.c.

Function Documentation



◆ sha224_init()

static void sha224_init ( void *  ctx)

Initialise SHA-224 algorithm.

ctxSHA-224 context

Definition at line 57 of file sha224.c.

57  {
58  struct sha256_context *context = ctx;
61 }
struct golan_eq_context ctx
Definition: CIB_PRM.h:28
static const struct sha256_digest sha224_init_digest
SHA-224 initial digest values.
Definition: sha224.c:39
#define SHA224_DIGEST_SIZE
SHA-224 digest size.
Definition: sha256.h:77
void sha256_family_init(struct sha256_context *context, const struct sha256_digest *init, size_t digestsize)
Initialise SHA-256 family algorithm.
Definition: sha256.c:93
An SHA-256 context.
Definition: sha256.h:61

References ctx, SHA224_DIGEST_SIZE, sha224_init_digest, and sha256_family_init().

Variable Documentation

◆ sha224_init_digest

const struct sha256_digest sha224_init_digest
Initial value:
= {
.h = {
cpu_to_be32 ( 0xc1059ed8 ),
cpu_to_be32 ( 0x367cd507 ),
cpu_to_be32 ( 0x3070dd17 ),
cpu_to_be32 ( 0xf70e5939 ),
cpu_to_be32 ( 0xffc00b31 ),
cpu_to_be32 ( 0x68581511 ),
cpu_to_be32 ( 0x64f98fa7 ),
cpu_to_be32 ( 0xbefa4fa4 ),
#define cpu_to_be32(value)
Definition: byteswap.h:110

SHA-224 initial digest values.

Definition at line 39 of file sha224.c.

Referenced by sha224_init().

◆ sha224_algorithm

struct digest_algorithm sha224_algorithm
Initial value:
= {
.name = "sha224",
.ctxsize = sizeof ( struct sha256_context ),
.blocksize = sizeof ( union sha256_block ),
.init = sha224_init,
.update = sha256_update,
.final = sha256_final,
static void sha224_init(void *ctx)
Initialise SHA-224 algorithm.
Definition: sha224.c:57
void sha256_update(void *ctx, const void *data, size_t len)
Accumulate data with SHA-256 algorithm.
Definition: sha256.c:217
An SHA-256 data block.
Definition: sha256.h:25
#define SHA224_DIGEST_SIZE
SHA-224 digest size.
Definition: sha256.h:77
uint32_t digestsize
Digest size (i.e.
Definition: pccrr.h:14
An SHA-256 context.
Definition: sha256.h:61
void sha256_final(void *ctx, void *out)
Generate SHA-256 digest.
Definition: sha256.c:240

SHA-224 algorithm.

Definition at line 64 of file sha224.c.

Referenced by sha256_test_exec().

◆ oid_sha224

uint8_t oid_sha224[] = { ASN1_OID_SHA224 }

"sha224" object identifier

Definition at line 75 of file sha224.c.

◆ __asn1_algorithm

struct asn1_algorithm oid_sha224_algorithm __asn1_algorithm
Initial value:
= {
.name = "sha224",
.digest = &sha224_algorithm,
static uint8_t oid_sha224[]
"sha224" object identifier
Definition: sha224.c:75
#define ASN1_OID_CURSOR(oid_value)
Define an ASN.1 cursor containing an OID.
Definition: asn1.h:292
struct digest_algorithm sha224_algorithm
SHA-224 algorithm.
Definition: sha224.c:64

"sha224" OID-identified algorithm

Definition at line 78 of file sha224.c.