libosmogsm 1.11.0
Osmocom GSM library
|
Macros | |
#define | RORc(x, y) |
#define | Ch(x, y, z) |
#define | Maj(x, y, z) |
#define | S(x, n) |
#define | R(x, n) |
#define | Sigma0(x) |
#define | Sigma1(x) |
#define | Gamma0(x) |
#define | Gamma1(x) |
#define | MIN(x, y) |
#define | RND(a, b, c, d, e, f, g, h, i) |
Functions | |
int | sha256_vector (size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) |
sha256_vector - SHA256 hash for data vector @num_elem: Number of elements in the data vector @addr: Pointers to the data areas @len: Lengths of the data blocks @mac: Buffer for the hash Returns: 0 on success, -1 of failure | |
static int | sha256_compress (struct sha256_state *md, unsigned char *buf) |
void | sha256_init (struct sha256_state *md) |
int | sha256_process (struct sha256_state *md, const unsigned char *in, unsigned long inlen) |
Process a block of memory though the hash. | |
int | sha256_done (struct sha256_state *md, unsigned char *out) |
Terminate the hash to get the digest. | |
Variables | |
static const unsigned long | K [64] |
#define Gamma0 | ( | x | ) |
#define Gamma1 | ( | x | ) |
Referenced by sha256_compress().
#define MIN | ( | x, | |
y ) |
Referenced by sha256_process().
Referenced by _kasumi(), kasumi_FI(), kasumi_FL(), and kasumi_FO().
Referenced by sha256_compress().
#define RORc | ( | x, | |
y ) |
Referenced by sha256_compress().
|
static |
References sha256_state::buf, Gamma0, Gamma1, RND, S, sha256_state::state, and WPA_GET_BE32.
Referenced by sha256_done(), and sha256_process().
int sha256_done | ( | struct sha256_state * | md, |
unsigned char * | out ) |
Terminate the hash to get the digest.
md | The hash state |
out | [out] The destination of the hash (32 bytes) |
References sha256_state::buf, sha256_state::curlen, sha256_state::length, SHA256_BLOCK_SIZE, sha256_compress(), sha256_state::state, WPA_PUT_BE32, and WPA_PUT_BE64.
Referenced by sha256_vector().
void sha256_init | ( | struct sha256_state * | md | ) |
References sha256_state::curlen, sha256_state::length, and sha256_state::state.
Referenced by sha256_vector().
int sha256_process | ( | struct sha256_state * | md, |
const unsigned char * | in, | ||
unsigned long | inlen ) |
Process a block of memory though the hash.
md | The hash state |
in | The data to hash |
inlen | The length of the data (octets) |
References sha256_state::buf, sha256_state::curlen, sha256_state::length, MIN, n, os_memcpy, SHA256_BLOCK_SIZE, and sha256_compress().
Referenced by sha256_vector().
sha256_vector - SHA256 hash for data vector @num_elem: Number of elements in the data vector @addr: Pointers to the data areas @len: Lengths of the data blocks @mac: Buffer for the hash Returns: 0 on success, -1 of failure
sha256_vector - SHA256 hash for data vector @num_elem: Number of elements in the data vector @addr: Pointers to the data areas @len: Lengths of the data blocks @mac: Buffer for the hash Returns: 0 on success, -1 on failure
References len, sha256_done(), sha256_init(), and sha256_process().
Referenced by hmac_sha256_vector().
|
static |