56 for ( j = 0; j < 6; j++ ) {
58 for ( i = 1; i <= nblk; i++ ) {
63 A[7] ^= ( nblk * j ) + i;
102 for ( j = 5; j >= 0; j-- ) {
103 R =
dest + ( nblk - 1 ) * 8;
104 for ( i = nblk; i >= 1; i-- ) {
107 B[7] ^= ( nblk * j ) + i;
118 for ( i = 0; i < 8; i++ ) {
#define AES_CTX_SIZE
AES context size.
struct cipher_algorithm aes_algorithm
Basic AES algorithm.
#define cipher_encrypt(cipher, ctx, src, dst, len)
void * memcpy(void *dest, const void *src, size_t len) __nonnull
static void(* free)(struct refcnt *refcnt))
u8 kek[WPA_KEK_LEN]
EAPOL-Key Key Encryption Key (KEK)
#define cipher_decrypt(cipher, ctx, src, dst, len)
void * malloc(size_t size)
Allocate memory.
int aes_wrap(const void *kek, const void *src, void *dest, int nblk)
Wrap a key or other data using AES Key Wrap (RFC 3394)
void * memmove(void *dest, const void *src, size_t len) __nonnull
if(len >=6 *4) __asm__ __volatile__("movsl" if(len >=5 *4) __asm__ __volatile__("movsl" if(len >=4 *4) __asm__ __volatile__("movsl" if(len >=3 *4) __asm__ __volatile__("movsl" if(len >=2 *4) __asm__ __volatile__("movsl" if(len >=1 *4) __asm__ __volatile__("movsl" if((len % 4) >=2) __asm__ __volatile__("movsw" if((len % 2) >=1) __asm__ __volatile__("movsb" return dest
int aes_unwrap(const void *kek, const void *src, void *dest, int nblk)
Unwrap a key or other data using AES Key Wrap (RFC 3394)
FILE_LICENCE(GPL2_OR_LATER)
static int cipher_setkey(struct cipher_algorithm *cipher, void *ctx, const void *key, size_t keylen)
void * memset(void *dest, int character, size_t len) __nonnull