Bouffalo SDK
1.0
Bouffalolab Software Development Kit
|
#include "bflb_core.h"
Go to the source code of this file.
Data Structures | |
struct | bflb_aes_link_s |
struct | bflb_aes_xts_link_s |
Macros | |
#define | AES_MODE_ECB 0 |
#define | AES_MODE_CTR 1 |
#define | AES_MODE_CBC 2 |
#define | AES_MODE_XTS 3 |
#define | AES_LINK_KEY_128BITS 0 |
#define | AES_LINK_KEY_192BITS 2 |
#define | AES_LINK_KEY_256BITS 1 |
#define | AES_LINK_KEY_DOUBLE_128BITS 3 |
#define | AES_LINK_XTS_MODE1 0 |
#define | AES_LINK_XTS_MODE2 1 |
Functions | |
struct bflb_aes_link_s | __attribute__ ((aligned(4))) |
void | bflb_aes_init (struct bflb_device_s *dev) |
Enable aes. More... | |
void | bflb_aes_deinit (struct bflb_device_s *dev) |
Disable aes. More... | |
void | bflb_aes_set_hwkey (uint8_t keysel) |
Set aes hardware key. More... | |
void | bflb_aes_set_hwkey_source (struct bflb_device_s *dev, uint8_t source) |
Set aes hardware key source. More... | |
void | bflb_aes_set_mode (struct bflb_device_s *dev, uint8_t mode) |
Set aes mode. More... | |
void | bflb_aes_setkey (struct bflb_device_s *dev, const uint8_t *key, uint16_t keybits) |
Set aes key. More... | |
int | bflb_aes_encrypt (struct bflb_device_s *dev, const uint8_t *input, const uint8_t *iv, uint8_t *output, uint32_t len) |
Perform aes encrypt. More... | |
int | bflb_aes_decrypt (struct bflb_device_s *dev, const uint8_t *input, const uint8_t *iv, uint8_t *output, uint32_t len) |
Perform aes decrypt. More... | |
void | bflb_aes_link_init (struct bflb_device_s *dev) |
Enable aes link mode. More... | |
void | bflb_aes_link_deinit (struct bflb_device_s *dev) |
Disable aes link mode. More... | |
int | bflb_aes_link_update (struct bflb_device_s *dev, uint32_t link_addr, const uint8_t *input, uint8_t *output, uint32_t len) |
Perform encrypt or decrypt with link mode. More... | |
void | bflb_group0_request_aes_access (struct bflb_device_s *dev) |
Enable aes in group0. More... | |
void | bflb_group0_release_aes_access (struct bflb_device_s *dev) |
Disable aes in group0. More... | |
Variables | |
uint32_t | __pad0__ |
uint32_t | aes_key |
uint32_t | aes_dec_en |
uint32_t | aes_newkey_dis |
uint32_t | aes_hwkey_en |
uint32_t | __pad1__ |
uint32_t | aes_intclr |
uint32_t | aes_intset |
uint32_t | __pad2__ |
uint32_t | aes_mode |
uint32_t | aes_newiv_dis |
uint32_t | aes_xts |
uint32_t | aes_msglen |
uint32_t | aes_srcaddr |
uint32_t | aes_dstaddr |
uint32_t | aes_iv0 |
uint32_t | aes_iv1 |
uint32_t | aes_iv2 |
uint32_t | aes_iv3 |
uint32_t | aes_key0 |
uint32_t | aes_key1 |
uint32_t | aes_key2 |
uint32_t | aes_key3 |
uint32_t | aes_key4 |
uint32_t | aes_key5 |
uint32_t | aes_key6 |
uint32_t | aes_key7 |
uint32_t | aes_key10 |
uint32_t | aes_key11 |
uint32_t | aes_key12 |
uint32_t | aes_key13 |
uint32_t | aes_key14 |
uint32_t | aes_key15 |
uint32_t | aes_key16 |
uint32_t | aes_key17 |
uint32_t | __pad3__ |
uint32_t | aes_unitlen |
uint32_t | aes_key20 |
uint32_t | aes_key21 |
uint32_t | aes_key22 |
uint32_t | aes_key23 |
uint32_t | aes_key24 |
uint32_t | aes_key25 |
uint32_t | aes_key26 |
uint32_t | aes_key27 |
uint32_t __pad0__ |
[2:0]Reserved
Definition at line 62 of file bflb_sec_aes.h.
uint32_t __pad1__ |
[8]Reserved
Definition at line 67 of file bflb_sec_aes.h.
uint32_t __pad2__ |
[11]Reserved
Definition at line 70 of file bflb_sec_aes.h.
uint32_t __pad3__ |
[15:0]Reserved
Definition at line 89 of file bflb_sec_aes.h.
uint32_t aes_dec_en |
[5]Encode or decode
Definition at line 64 of file bflb_sec_aes.h.
uint32_t aes_dstaddr |
Message destination address
Definition at line 76 of file bflb_sec_aes.h.
uint32_t aes_hwkey_en |
[7]Enable or disable using hardware hey
Definition at line 66 of file bflb_sec_aes.h.
uint32_t aes_intclr |
[9]Clear interrupt
Definition at line 68 of file bflb_sec_aes.h.
uint32_t aes_intset |
[10]Set interrupt
Definition at line 69 of file bflb_sec_aes.h.
uint32_t aes_iv0 |
Big endian initial vector(MSB)
Definition at line 77 of file bflb_sec_aes.h.
uint32_t aes_iv1 |
Big endian initial vector
Definition at line 78 of file bflb_sec_aes.h.
uint32_t aes_iv2 |
Big endian initial vector
Definition at line 79 of file bflb_sec_aes.h.
uint32_t aes_iv3 |
Big endian initial vector(LSB)(CTR mode:counter initial value)
Definition at line 80 of file bflb_sec_aes.h.
uint32_t aes_key |
[4:3]128-bit/256-bit/192-bit/128-bit-double key mode select
Definition at line 63 of file bflb_sec_aes.h.
uint32_t aes_key0 |
Big endian aes key(aes-128/256 key MSB)
Definition at line 81 of file bflb_sec_aes.h.
uint32_t aes_key1 |
Big endian aes key
Definition at line 82 of file bflb_sec_aes.h.
uint32_t aes_key10 |
Big endian aes key(aes-128/256 key MSB)
Definition at line 81 of file bflb_sec_aes.h.
uint32_t aes_key11 |
Big endian aes key1
Definition at line 82 of file bflb_sec_aes.h.
uint32_t aes_key12 |
Big endian aes key1
Definition at line 83 of file bflb_sec_aes.h.
uint32_t aes_key13 |
Big endian aes key1(aes-128 key LSB)
Definition at line 84 of file bflb_sec_aes.h.
uint32_t aes_key14 |
Big endian aes key1
Definition at line 85 of file bflb_sec_aes.h.
uint32_t aes_key15 |
Big endian aes key1
Definition at line 86 of file bflb_sec_aes.h.
uint32_t aes_key16 |
Big endian aes key1
Definition at line 87 of file bflb_sec_aes.h.
uint32_t aes_key17 |
Big endian aes key1(aes-256 key LSB)
Definition at line 88 of file bflb_sec_aes.h.
uint32_t aes_key2 |
Big endian aes key
Definition at line 83 of file bflb_sec_aes.h.
uint32_t aes_key20 |
Big endian aes key2(aes-128/256 key MSB)
Definition at line 91 of file bflb_sec_aes.h.
uint32_t aes_key21 |
Big endian aes key2
Definition at line 92 of file bflb_sec_aes.h.
uint32_t aes_key22 |
Big endian aes key2
Definition at line 93 of file bflb_sec_aes.h.
uint32_t aes_key23 |
Big endian aes key2(aes-128 key LSB)
Definition at line 94 of file bflb_sec_aes.h.
uint32_t aes_key24 |
Big endian aes key2
Definition at line 95 of file bflb_sec_aes.h.
uint32_t aes_key25 |
Big endian aes key2
Definition at line 96 of file bflb_sec_aes.h.
uint32_t aes_key26 |
Big endian aes key2
Definition at line 97 of file bflb_sec_aes.h.
uint32_t aes_key27 |
Big endian aes key2(aes-256 key LSB)
Definition at line 98 of file bflb_sec_aes.h.
uint32_t aes_key3 |
Big endian aes key(aes-128 key LSB)
Definition at line 84 of file bflb_sec_aes.h.
uint32_t aes_key4 |
Big endian aes key
Definition at line 85 of file bflb_sec_aes.h.
uint32_t aes_key5 |
Big endian aes key
Definition at line 86 of file bflb_sec_aes.h.
uint32_t aes_key6 |
Big endian aes key
Definition at line 87 of file bflb_sec_aes.h.
uint32_t aes_key7 |
Big endian aes key(aes-256 key LSB)
Definition at line 88 of file bflb_sec_aes.h.
uint32_t aes_mode |
[13:12]ECB/CTR/CBC mode select
Definition at line 71 of file bflb_sec_aes.h.
uint32_t aes_msglen |
[31:16]Number of 128-bit block
Definition at line 74 of file bflb_sec_aes.h.
uint32_t aes_newiv_dis |
[14]Use new iv or use same iv as last one
Definition at line 72 of file bflb_sec_aes.h.
uint32_t aes_newkey_dis |
[6]Use new key or use same key as last one
Definition at line 65 of file bflb_sec_aes.h.
uint32_t aes_srcaddr |
Message source address
Definition at line 75 of file bflb_sec_aes.h.
uint32_t aes_unitlen |
[31:16]Big endian aes unit len
Definition at line 90 of file bflb_sec_aes.h.
uint32_t aes_xts |
[15]XTS mode select
Definition at line 73 of file bflb_sec_aes.h.