iPXE
Functions | Variables
sha512_256.c File Reference

SHA-512/256 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.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
static void sha512_256_init (void *ctx)
 Initialise SHA-512/256 algorithm.

Variables

static struct sha512_digest sha512_256_init_digest
 SHA-512/256 initial digest values.
struct digest_algorithm sha512_256_algorithm
 SHA-512/256 algorithm.
static uint8_t oid_sha512_256 [] = { ASN1_OID_SHA512_256 }
 "sha512_256" object identifier
struct asn1_algorithm
oid_sha512_256_algorithm 
__asn1_algorithm
 "sha512_256" OID-identified algorithm

Detailed Description

SHA-512/256 algorithm.

Definition in file sha512_256.c.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )
static void sha512_256_init ( void *  ctx) [static]

Initialise SHA-512/256 algorithm.

Parameters:
ctxSHA-512/256 context

Definition at line 57 of file sha512_256.c.

References context, ctx, SHA512_256_DIGEST_SIZE, and sha512_family_init().


Variable Documentation

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 ),
        },
}

SHA-512/256 initial digest values.

Definition at line 39 of file sha512_256.c.

Initial value:
 {
        .name           = "sha512/256",
        .ctxsize        = sizeof ( struct sha512_context ),
        .blocksize      = sizeof ( union sha512_block ),
        .digestsize     = SHA512_256_DIGEST_SIZE,
        .init           = sha512_256_init,
        .update         = sha512_update,
        .final          = sha512_final,
}

SHA-512/256 algorithm.

Definition at line 65 of file sha512_256.c.

Referenced by sha512_test_exec().

"sha512_256" object identifier

Definition at line 76 of file sha512_256.c.

struct asn1_algorithm oid_sha512_256_algorithm __asn1_algorithm
Initial value:
 {
        .name = "sha512/256",
        .digest = &sha512_256_algorithm,
        .oid = ASN1_OID_CURSOR ( oid_sha512_256 ),
}

"sha512_256" OID-identified algorithm

Definition at line 79 of file sha512_256.c.