Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: cc3000_ping_demo_try_2
Fork of cc3000_hostdriver_mbedsocket by
cc3000_security Class Reference
Security class used only if encrypted smart config is set. More...
#include <cc3000.h>
Public Member Functions | |
void | expandKey (uint8_t *expanded_key, uint8_t *key) |
Expand a 16 bytes key for AES128 implementation. | |
uint8_t | galois_mul2 (uint8_t value) |
multiply by 2 in the galois field. | |
void | aes_encr (uint8_t *state, uint8_t *expanded_key) |
internal implementation of AES128 encryption. | |
void | aes_decr (uint8_t *state, uint8_t *expanded_key) |
internal implementation of AES128 decryption. | |
void | aes_encrypt (uint8_t *state, uint8_t *key) |
AES128 encryption. | |
void | aes_decrypt (uint8_t *state, uint8_t *key) |
AES128 decryption. | |
int32_t | aes_read_key (uint8_t *key) |
Read the AES128 key from fileID #12 in EEPROM. | |
int32_t | aes_write_key (uint8_t *key) |
Write the AES128 key to fileID #12 in EEPROM. |
Detailed Description
Security class used only if encrypted smart config is set.
Definition at line 594 of file cc3000.h.
Member Function Documentation
void aes_decr | ( | uint8_t * | state, |
uint8_t * | expanded_key | ||
) |
internal implementation of AES128 decryption.
straightforward aes decryption implementation
the order of substeps is the exact reverse of decryption
inverse functions:
- addRoundKey is its own inverse
- rsbox is inverse of sbox
- rightshift instead of leftshift
- invMixColumns = barreto + mixColumns
no further subfunctions to save cycles for function calls
no structuring with "for (....)" to save cycles
- Parameters:
-
[in] expanded_key expanded AES128 key in\out] state 16 bytes of cipher text and plain text
- Returns:
- none
Definition at line 227 of file cc3000_security.cpp.
void aes_decrypt | ( | uint8_t * | state, |
uint8_t * | key | ||
) |
AES128 decryption.
Given AES128 key and 16 bytes cipher text, plain text of 16 bytes is computed.
The AES implementation is in mode ECB (Electronic Code Book).
- Parameters:
-
[in] key AES128 key of size 16 bytes in\out] state 16 bytes of cipher text and plain text
- Returns:
- none
Definition at line 358 of file cc3000_security.cpp.
void aes_encr | ( | uint8_t * | state, |
uint8_t * | expanded_key | ||
) |
internal implementation of AES128 encryption.
straight forward aes encryption implementation
first the group of operations
- addRoundKey
- subbytes
- shiftrows
- mixcolums
is executed 9 times, after this addroundkey to finish the 9th
round, after that the 10th round without mixcolums
no further subfunctions to save cycles for function calls
no structuring with "for (....)" to save cycles.
- Parameters:
-
[in] expanded_key expanded AES128 key in/out] state 16 bytes of plain text and cipher text
- Returns:
- none
Definition at line 122 of file cc3000_security.cpp.
void aes_encrypt | ( | uint8_t * | state, |
uint8_t * | key | ||
) |
AES128 encryption.
Given AES128 key and 16 bytes plain text, cipher text of 16 bytes is computed.
The AES implementation is in mode ECB (Electronic Code Book).
- Parameters:
-
[in] key AES128 key of size 16 bytes in\out] state 16 bytes of plain text and cipher text
- Returns:
- none
Definition at line 352 of file cc3000_security.cpp.
int32_t aes_read_key | ( | uint8_t * | key ) |
Read the AES128 key from fileID #12 in EEPROM.
- Parameters:
-
[out] key AES128 key of size 16 bytes
- Returns:
- 0 on success, error otherwise.
Definition at line 363 of file cc3000_security.cpp.
int32_t aes_write_key | ( | uint8_t * | key ) |
Write the AES128 key to fileID #12 in EEPROM.
- Parameters:
-
[out] key AES128 key of size 16 bytes
- Returns:
- on success 0, error otherwise.
Definition at line 371 of file cc3000_security.cpp.
void expandKey | ( | uint8_t * | expanded_key, |
uint8_t * | key | ||
) |
Expand a 16 bytes key for AES128 implementation.
- Parameters:
-
expanded_key expanded AES128 key key AES128 key - 16 bytes
- Returns:
- none
Definition at line 87 of file cc3000_security.cpp.
uint8_t galois_mul2 | ( | uint8_t | value ) |
multiply by 2 in the galois field.
- Parameters:
-
value Argument to multiply
- Returns:
- multiplied argument
Definition at line 113 of file cc3000_security.cpp.
Generated on Tue Jul 12 2022 18:37:33 by
