annotate aes128.h @ 216:1c3c3b1b9596 libavutil

cbc support
author michael
date Tue, 16 Jan 2007 19:08:52 +0000
parents 363f904df04d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
176
363f904df04d 128bit-only AES implementation under development.
reimar
parents:
diff changeset
1 #ifndef AES128_H
363f904df04d 128bit-only AES implementation under development.
reimar
parents:
diff changeset
2 #define AES128_H
363f904df04d 128bit-only AES implementation under development.
reimar
parents:
diff changeset
3
363f904df04d 128bit-only AES implementation under development.
reimar
parents:
diff changeset
4 #ifdef CONFIG_GCRYPT
363f904df04d 128bit-only AES implementation under development.
reimar
parents:
diff changeset
5 #include <gcrypt.h>
363f904df04d 128bit-only AES implementation under development.
reimar
parents:
diff changeset
6 typedef struct {
363f904df04d 128bit-only AES implementation under development.
reimar
parents:
diff changeset
7 gcry_cipher_hd_t ch;
363f904df04d 128bit-only AES implementation under development.
reimar
parents:
diff changeset
8 } AES128Context;
363f904df04d 128bit-only AES implementation under development.
reimar
parents:
diff changeset
9 #else
363f904df04d 128bit-only AES implementation under development.
reimar
parents:
diff changeset
10 typedef struct {
363f904df04d 128bit-only AES implementation under development.
reimar
parents:
diff changeset
11 uint32_t multbl[4][256];
363f904df04d 128bit-only AES implementation under development.
reimar
parents:
diff changeset
12 uint8_t subst[256];
363f904df04d 128bit-only AES implementation under development.
reimar
parents:
diff changeset
13 uint8_t key[11][16];
363f904df04d 128bit-only AES implementation under development.
reimar
parents:
diff changeset
14 } AES128Context;
363f904df04d 128bit-only AES implementation under development.
reimar
parents:
diff changeset
15 #endif
363f904df04d 128bit-only AES implementation under development.
reimar
parents:
diff changeset
16 AES128Context *aes128_init(void);
363f904df04d 128bit-only AES implementation under development.
reimar
parents:
diff changeset
17 void aes128_set_key(AES128Context *c, const uint8_t *key);
363f904df04d 128bit-only AES implementation under development.
reimar
parents:
diff changeset
18 void aes128_cbc_decrypt(AES128Context *c, uint8_t *mem, int blockcnt, uint8_t *IV);
363f904df04d 128bit-only AES implementation under development.
reimar
parents:
diff changeset
19
363f904df04d 128bit-only AES implementation under development.
reimar
parents:
diff changeset
20 #endif