libaaruformat 1.0
Aaru Data Preservation Suite - Format Library
Loading...
Searching...
No Matches
aes128.h File Reference
#include <stdint.h>

Go to the source code of this file.

Functions

void aes128_cbc_encrypt (const uint8_t key[16], const uint8_t iv[16], uint8_t *data, uint32_t length)
 AES-128 CBC encrypt data in-place.
void aes128_cbc_decrypt (const uint8_t key[16], const uint8_t iv[16], uint8_t *data, uint32_t length)
 AES-128 CBC decrypt data in-place.

Function Documentation

◆ aes128_cbc_decrypt()

void aes128_cbc_decrypt ( const uint8_t key[16],
const uint8_t iv[16],
uint8_t * data,
uint32_t length )

AES-128 CBC decrypt data in-place.

Parameters
key16-byte decryption key.
iv16-byte initialization vector (not modified).
dataBuffer to decrypt in-place. Must be a multiple of 16 bytes.
lengthNumber of bytes to decrypt. Must be a multiple of 16.

Definition at line 290 of file aes128.c.

References aes128_cbc_decrypt(), AES_BLOCK_SIZE, inv_cipher(), key_expansion(), aes128_ctx::round_key, and xor_block().

Referenced by aes128_cbc_decrypt(), ps3_decrypt_sector(), wii_decrypt_group(), and wiiu_decrypt_physical_sector().

◆ aes128_cbc_encrypt()

void aes128_cbc_encrypt ( const uint8_t key[16],
const uint8_t iv[16],
uint8_t * data,
uint32_t length )

AES-128 CBC encrypt data in-place.

Parameters
key16-byte encryption key.
iv16-byte initialization vector (not modified).
dataBuffer to encrypt in-place. Must be a multiple of 16 bytes.
lengthNumber of bytes to encrypt. Must be a multiple of 16.

Definition at line 274 of file aes128.c.

References aes128_cbc_encrypt(), AES_BLOCK_SIZE, cipher(), key_expansion(), aes128_ctx::round_key, and xor_block().

Referenced by aes128_cbc_encrypt(), ps3_derive_disc_key(), ps3_encrypt_sector(), wii_encrypt_group(), and wiiu_encrypt_physical_sector().