Functions | Variables
sha384.c File Reference

SHA-384 algorithm. More...

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

Go to the source code of this file.


static void sha384_init (void *ctx)
 Initialise SHA-384 algorithm. More...


static const struct sha512_digest sha384_init_digest
 SHA-384 initial digest values. More...
struct digest_algorithm sha384_algorithm
 SHA-384 algorithm. More...
static uint8_t oid_sha384 [] = { ASN1_OID_SHA384 }
 "sha384" object identifier More...
struct asn1_algorithm oid_sha384_algorithm __asn1_algorithm
 "sha384" OID-identified algorithm More...

Detailed Description

SHA-384 algorithm.

Definition in file sha384.c.

Function Documentation



◆ sha384_init()

static void sha384_init ( void *  ctx)

Initialise SHA-384 algorithm.

ctxSHA-384 context

Definition at line 57 of file sha384.c.

57  {
58  struct sha512_context *context = ctx;
61 }
struct golan_eq_context ctx
Definition: CIB_PRM.h:28
An SHA-512 context.
Definition: sha512.h:63
static const struct sha512_digest sha384_init_digest
SHA-384 initial digest values.
Definition: sha384.c:39
#define SHA384_DIGEST_SIZE
Definition: Tpm20.h:40
void sha512_family_init(struct sha512_context *context, const struct sha512_digest *init, size_t digestsize)
Initialise SHA-512 family algorithm.
Definition: sha512.c:109

References ctx, SHA384_DIGEST_SIZE, sha384_init_digest, and sha512_family_init().

Variable Documentation

◆ sha384_init_digest

const struct sha512_digest sha384_init_digest
Initial value:
= {
.h = {
cpu_to_be64 ( 0xcbbb9d5dc1059ed8ULL ),
cpu_to_be64 ( 0x629a292a367cd507ULL ),
cpu_to_be64 ( 0x9159015a3070dd17ULL ),
cpu_to_be64 ( 0x152fecd8f70e5939ULL ),
cpu_to_be64 ( 0x67332667ffc00b31ULL ),
cpu_to_be64 ( 0x8eb44a8768581511ULL ),
cpu_to_be64 ( 0xdb0c2e0d64f98fa7ULL ),
cpu_to_be64 ( 0x47b5481dbefa4fa4ULL ),
#define cpu_to_be64(value)
Definition: byteswap.h:111

SHA-384 initial digest values.

Definition at line 39 of file sha384.c.

Referenced by sha384_init().

◆ sha384_algorithm

struct digest_algorithm sha384_algorithm
Initial value:
= {
.name = "sha384",
.ctxsize = sizeof ( struct sha512_context ),
.blocksize = sizeof ( union sha512_block ),
.init = sha384_init,
.update = sha512_update,
.final = sha512_final,
void sha512_update(void *ctx, const void *data, size_t len)
Accumulate data with SHA-512 algorithm.
Definition: sha512.c:234
void sha512_final(void *ctx, void *out)
Generate SHA-512 digest.
Definition: sha512.c:257
static void sha384_init(void *ctx)
Initialise SHA-384 algorithm.
Definition: sha384.c:57
An SHA-512 context.
Definition: sha512.h:63
An SHA-512 data block.
Definition: sha512.h:25
uint32_t digestsize
Digest size (i.e.
Definition: pccrr.h:14
#define SHA384_DIGEST_SIZE
Definition: Tpm20.h:40

SHA-384 algorithm.

Definition at line 64 of file sha384.c.

Referenced by peerdist_info_v1(), and sha512_test_exec().

◆ oid_sha384

uint8_t oid_sha384[] = { ASN1_OID_SHA384 }

"sha384" object identifier

Definition at line 75 of file sha384.c.

◆ __asn1_algorithm

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

"sha384" OID-identified algorithm

Definition at line 78 of file sha384.c.