swh:1:snp:49cd9498d6cccc5e78252c27dcb645bcf7bf0c91
Raw File
Tip revision: c65b99f046843d2455aa231747b5a07a999a9f3d authored by Linus Torvalds on 01 June 2015, 02:01:07 UTC
Linux 4.1-rc6
Tip revision: c65b99f
aesp8-ppc.h
#include <linux/types.h>
#include <crypto/aes.h>

#define AES_BLOCK_MASK  (~(AES_BLOCK_SIZE-1))

struct aes_key {
    u8 key[AES_MAX_KEYLENGTH];
    int rounds;
};

int aes_p8_set_encrypt_key(const u8 *userKey, const int bits,
        struct aes_key *key);
int aes_p8_set_decrypt_key(const u8 *userKey, const int bits,
        struct aes_key *key);
void aes_p8_encrypt(const u8 *in, u8 *out, const struct aes_key *key);
void aes_p8_decrypt(const u8 *in, u8 *out,const struct aes_key *key);
void aes_p8_cbc_encrypt(const u8 *in, u8 *out, size_t len,
		const struct aes_key *key, u8 *iv, const int enc);
void aes_p8_ctr32_encrypt_blocks(const u8 *in, u8 *out,
        size_t len, const struct aes_key *key, const u8 *iv);
back to top