Functions | Variables
sha384.c File Reference

SHA-384 algorithm. More...

#include <stdint.h>
#include <byteswap.h>
#include <ipxe/crypto.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...

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 56 of file sha384.c.

56  {
57  struct sha512_context *context = ctx;
60 }
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:38
#define SHA384_DIGEST_SIZE
Definition: Tpm20.h:33
void sha512_family_init(struct sha512_context *context, const struct sha512_digest *init, size_t digestsize)
Initialise SHA-512 family algorithm.
Definition: sha512.c:108

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 38 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:233
void sha512_final(void *ctx, void *out)
Generate SHA-512 digest.
Definition: sha512.c:256
static void sha384_init(void *ctx)
Initialise SHA-384 algorithm.
Definition: sha384.c:56
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:33

SHA-384 algorithm.

Definition at line 63 of file sha384.c.

Referenced by peerdist_info_v1(), and sha512_test_exec().