AES (Rijndael) cipher - decrypt. More...
#include "includes.h"
#include "common.h"
#include "crypto.h"
#include "aes_i.h"
Go to the source code of this file.
Defines | |
#define | ROUND(i, d, s) |
Functions | |
void | rijndaelKeySetupDec (u32 rk[], const u8 cipherKey[]) |
void * | aes_decrypt_init (const u8 *key, size_t len) |
Initialize AES for decryption. | |
void | aes_decrypt (void *ctx, const u8 *crypt, u8 *plain) |
Decrypt one AES block. | |
void | aes_decrypt_deinit (void *ctx) |
Deinitialize AES decryption. |
AES (Rijndael) cipher - decrypt.
Modifications to public domain implementation:
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.
Alternatively, this software may be distributed under the terms of BSD license.
See README and COPYING for more details.
Definition in file aes-internal-dec.c.
#define ROUND | ( | i, | |||
d, | |||||
s | ) |
d##0 = TD0(s##0) ^ TD1(s##3) ^ TD2(s##2) ^ TD3(s##1) ^ rk[4 * i]; \ d##1 = TD0(s##1) ^ TD1(s##0) ^ TD2(s##3) ^ TD3(s##2) ^ rk[4 * i + 1]; \ d##2 = TD0(s##2) ^ TD1(s##1) ^ TD2(s##0) ^ TD3(s##3) ^ rk[4 * i + 2]; \ d##3 = TD0(s##3) ^ TD1(s##2) ^ TD2(s##1) ^ TD3(s##0) ^ rk[4 * i + 3]
void aes_decrypt | ( | void * | ctx, | |
const u8 * | crypt, | |||
u8 * | plain | |||
) |
Decrypt one AES block.
ctx | Context pointer from aes_encrypt_init() | |
crypt | Encrypted data (16 bytes) | |
plain | Buffer for the decrypted data (16 bytes) |
Definition at line 142 of file aes-internal-dec.c.
void aes_decrypt_deinit | ( | void * | ctx | ) |
Deinitialize AES decryption.
ctx | Context pointer from aes_encrypt_init() |
Definition at line 148 of file aes-internal-dec.c.
void* aes_decrypt_init | ( | const u8 * | key, | |
size_t | len | |||
) |
Initialize AES for decryption.
key | Decryption key | |
len | Key length in bytes (usually 16, i.e., 128 bits) |
Definition at line 63 of file aes-internal-dec.c.
void rijndaelKeySetupDec | ( | u32 | rk[], | |
const u8 | cipherKey[] | |||
) |
Expand the cipher key into the decryption key schedule.
Definition at line 36 of file aes-internal-dec.c.