|
Leancrypto 1.7.2
Post-Quantum Cryptographic Library
|
Go to the source code of this file.
Macros | |
| #define | LC_INIT_AES_SBOX (1 << 0) |
| #define | LC_INIT_AES_CT (1 << 1) |
Functions | |
| int | lc_init (unsigned int flags) |
| Initialization of leancrypto. More... | |
| #define LC_INIT_AES_CT (1 << 1) |
Use the AES C implementation based on a constant time algorithm
This is a slower implementation, but based on current understanding free of side channels. Use ths if you need to rely on a C implementation of AES and have extra requirements regarding security.
Leancrypto applies a security-by-default strategy which implies that this implementation is used as default if no accelerated implementations are available. Yet, this implementation is about 3 to 5 times slower compared to the AES with S-Boxes enabled with LC_INIT_AES_SBOX. If you are sure that side-channels are of lesser concern in your environment and you use the C implementation, you may use the S-Box variant.
| #define LC_INIT_AES_SBOX (1 << 0) |
Use the AES C implementation based on an S-Box
This is a fast implementation, but not guaranteed to be constant time and thus fully free of side-channels with respect to the plaintext or ciphertext. Yet, the key schedule generation is using a constant-time operation.
| int lc_init | ( | unsigned int | flags | ) |
Initialization of leancrypto.
This function invokes all necessary initialization functions required at the loading time of leancrypto. However, this function is only needed for environments without a constructor functionality such as the Linux kernel or the EFI environment.
For regular environments such as Linux, this function is not required to be called. But it does not hurt to be called.
| [in] | flags | see LC_INIT_* flags |