|
iPXE
|
SHA-1 algorithm. More...
#include <stdint.h>#include <assert.h>#include <ipxe/rotate.h>#include <ipxe/crypto.h>#include <ipxe/sha1.h>Go to the source code of this file.
Data Structures | |
| struct | sha1_variables |
| SHA-1 variables. More... | |
| struct | sha1_step |
| An SHA-1 step function. More... | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| FILE_SECBOOT (PERMITTED) | |
| static uint32_t | sha1_f_0_19 (struct sha1_variables *v) |
| f(a,b,c,d) for steps 0 to 19 | |
| static uint32_t | sha1_f_20_39_60_79 (struct sha1_variables *v) |
| f(a,b,c,d) for steps 20 to 39 and 60 to 79 | |
| static uint32_t | sha1_f_40_59 (struct sha1_variables *v) |
| f(a,b,c,d) for steps 40 to 59 | |
| static void | sha1_compress (struct sha1_digest_data *dd, const struct sha1_digest *digest) |
| Calculate SHA-1 digest of accumulated data. | |
| MDHASH_ALGORITHM (sha1, sha1_algorithm, sha1_compress, __BIG_ENDIAN, struct sha1_digest_data, sha1_init, SHA1_DIGEST_SIZE) | |
| SHA-1 algorithm. | |
Variables | |
| static const struct sha1_step | sha1_steps [4] |
| SHA-1 steps. | |
| static const struct sha1_digest | sha1_init |
| SHA-1 initial digest values. | |
SHA-1 algorithm.
Definition in file sha1.c.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| FILE_SECBOOT | ( | PERMITTED | ) |
|
static |
f(a,b,c,d) for steps 0 to 19
| v | SHA-1 variables |
| f | f(a,b,c,d) |
Definition at line 57 of file sha1.c.
References sha1_variables::b, sha1_variables::c, and sha1_variables::d.
|
static |
f(a,b,c,d) for steps 20 to 39 and 60 to 79
| v | SHA-1 variables |
| f | f(a,b,c,d) |
Definition at line 67 of file sha1.c.
References sha1_variables::b, sha1_variables::c, and sha1_variables::d.
|
static |
f(a,b,c,d) for steps 40 to 59
| v | SHA-1 variables |
| f | f(a,b,c,d) |
Definition at line 77 of file sha1.c.
References sha1_variables::b, sha1_variables::c, and sha1_variables::d.
|
static |
Calculate SHA-1 digest of accumulated data.
| dd | Digest and data block |
| digest | Copy of current digest value |
Definition at line 117 of file sha1.c.
References sha1_variables::a, sha1_variables::b, build_assert, sha1_variables::c, container_of, sha1_variables::d, DBGC2, sha1_digest_data::digest, sha1_variables::e, sha1_step::f, sha1_digest::h, k, rol32(), sha1_algorithm, sha1_steps, step(), typeof(), u, and sha1_variables::w.
Referenced by MDHASH_ALGORITHM().
| MDHASH_ALGORITHM | ( | sha1 | , |
| sha1_algorithm | , | ||
| sha1_compress | , | ||
| __BIG_ENDIAN | , | ||
| struct sha1_digest_data | , | ||
| sha1_init | , | ||
| SHA1_DIGEST_SIZE | ) |
SHA-1 algorithm.
References __BIG_ENDIAN, sha1_algorithm, sha1_compress(), SHA1_DIGEST_SIZE, and sha1_init.
|
static |
SHA-1 steps.
Definition at line 95 of file sha1.c.
Referenced by sha1_compress().
|
static |
SHA-1 initial digest values.
Definition at line 107 of file sha1.c.
Referenced by MDHASH_ALGORITHM().