65 memset ( hkey->pad, 0, sizeof ( hkey->pad ) );
66 if (
len <=
sizeof ( hkey->pad ) ) {
89 for ( i = 0 ; i <
sizeof ( hkey->pad ) ; i++ ) {
90 hctx->pad[i] = ( hkey->pad[i] ^ 0x36 );
95 digest_update ( digest, hctx->ctx, hctx->pad, sizeof ( hctx->pad ) );
107 const void *secret,
size_t len ) {
111 hmac_key ( digest, hctx->ctx, secret,
len, hctx->pad );
129 for ( i = 0 ; i <
sizeof ( hctx->pad ) ; i++ ) {
130 hctx->pad[i] ^= 0x6a;
138 digest_update ( digest, hctx->ctx, hctx->pad, sizeof ( hctx->pad ) );
143 memset ( hctx->pad, 0, sizeof ( hctx->pad ) );
struct golan_eq_context ctx
union @162305117151260234136356364136041353210355154177 key
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
void hmac_init(struct digest_algorithm *digest, void *ctx, const void *secret, size_t len)
Initialise HMAC.
void hmac_final(struct digest_algorithm *digest, void *ctx, void *hmac)
Finalise HMAC.
void hmac_key(struct digest_algorithm *digest, void *ctx, const void *secret, size_t len, void *key)
Construct HMAC reduced key.
void hmac_init_key(struct digest_algorithm *digest, void *ctx, const void *key)
Initialise HMAC from reduced key.
Keyed-Hashing for Message Authentication.
#define hmac_key_t(digest)
HMAC reduced key type.
#define hmac_context_t(digest)
HMAC context type.
static void digest_init(struct digest_algorithm *digest, void *ctx)
static void digest_final(struct digest_algorithm *digest, void *ctx, void *out)
static void digest_update(struct digest_algorithm *digest, void *ctx, const void *data, size_t len)
void * memcpy(void *dest, const void *src, size_t len) __nonnull
void * memset(void *dest, int character, size_t len) __nonnull
A message digest algorithm.
size_t digestsize
Digest size.