Functions | Variables
sha512_256.c File Reference

SHA-512/256 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 sha512_256_init (void *ctx)
 Initialise SHA-512/256 algorithm. More...


static const struct sha512_digest sha512_256_init_digest
 SHA-512/256 initial digest values. More...
struct digest_algorithm sha512_256_algorithm
 SHA-512/256 algorithm. More...

Detailed Description

SHA-512/256 algorithm.

Definition in file sha512_256.c.

Function Documentation



◆ sha512_256_init()

static void sha512_256_init ( void *  ctx)

Initialise SHA-512/256 algorithm.

ctxSHA-512/256 context

Definition at line 56 of file sha512_256.c.

56  {
57  struct sha512_context *context = ctx;
61 }
#define SHA512_256_DIGEST_SIZE
SHA-512/256 digest size.
Definition: sha512.h:85
An SHA-512 context.
Definition: sha512.h:63
struct golan_eq_context ctx
Definition: CIB_PRM.h:28
static const struct sha512_digest sha512_256_init_digest
SHA-512/256 initial digest values.
Definition: sha512_256.c:38
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, SHA512_256_DIGEST_SIZE, sha512_256_init_digest, and sha512_family_init().

Variable Documentation

◆ sha512_256_init_digest

const struct sha512_digest sha512_256_init_digest
Initial value:
= {
.h = {
cpu_to_be64 ( 0x22312194fc2bf72cULL ),
cpu_to_be64 ( 0x9f555fa3c84c64c2ULL ),
cpu_to_be64 ( 0x2393b86b6f53b151ULL ),
cpu_to_be64 ( 0x963877195940eabdULL ),
cpu_to_be64 ( 0x96283ee2a88effe3ULL ),
cpu_to_be64 ( 0xbe5e1e2553863992ULL ),
cpu_to_be64 ( 0x2b0199fc2c85b8aaULL ),
cpu_to_be64 ( 0x0eb72ddc81c52ca2ULL ),
#define cpu_to_be64(value)
Definition: byteswap.h:111

SHA-512/256 initial digest values.

Definition at line 38 of file sha512_256.c.

Referenced by sha512_256_init().

◆ sha512_256_algorithm

struct digest_algorithm sha512_256_algorithm
Initial value:
= {
.name = "sha512/256",
.ctxsize = sizeof ( struct sha512_context ),
.blocksize = sizeof ( union sha512_block ),
.init = sha512_256_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
#define SHA512_256_DIGEST_SIZE
SHA-512/256 digest size.
Definition: sha512.h:85
static void sha512_256_init(void *ctx)
Initialise SHA-512/256 algorithm.
Definition: sha512_256.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

SHA-512/256 algorithm.

Definition at line 64 of file sha512_256.c.

Referenced by sha512_test_exec().