Compile switches used to find the optimum trade-off between performance, memory footprint and supported features. More...

Macros | |
| #define | PH_CRYPTOSYM_SW_DES |
| Enables DES support. More... | |
| #define | PH_CRYPTOSYM_SW_AES |
| Enables AES support. More... | |
| #define | PH_CRYPTOSYM_SW_ONLINE_KEYSCHEDULING |
| Enables online key scheduling. More... | |
| #define | PH_CRYPTOSYM_SW_ONLINE_CMAC_SUBKEY_CALCULATION |
| Enables online CMAC SubKey calculation. More... | |
| #define | PH_CRYPTOSYM_SW_ROM_OPTIMIZATION |
| Enables ROM optimizations in the AES algorithm. More... | |
| #define | PH_CRYTOSYM_SW_FAST_RAM |
| Enables 8051 data storage specifier. More... | |
| #define | PH_CRYPTOSYM_SW_CONST_ROM |
| ROM specifier - not set per default. | |
| #define | PH_CRYPTOSYM_SW_MAX_BLOCK_SIZE PH_CRYPTOSYM_AES_BLOCK_SIZE |
| Maximum Block Size of the currently supported ciphers. | |
| #define | PH_CRYPTOSYM_MAX_BLOCK_SIZE PH_CRYPTOSYM_SW_MAX_BLOCK_SIZE |
| Maximum Block Size of the currently supported ciphers. | |
| #define | PH_CRYPTOSYM_SW_KEY_BUFFER_SIZE 32U |
| Maximum Key buffer Size of the currently supported ciphers. | |
Compile switches used to find the optimum trade-off between performance, memory footprint and supported features.
| #define PH_CRYPTOSYM_SW_DES |
Enables DES support.
Defines that the DES algorithm is supported. The defines for general DES capabilities like block sizes etc. are not affected as they do not add to the memory footprint.
| #define PH_CRYPTOSYM_SW_AES |
Enables AES support.
Defines that the AES algorithm is supported. The defines for general AES capabilities like block sizes etc. are not affected as they do not add to the memory footprint.
| #define PH_CRYPTOSYM_SW_ONLINE_KEYSCHEDULING |
Enables online key scheduling.
This define enables for both AES and DES the online key scheduling. This means, that the round keys are not pre-calculated at key loading, but they are always calculated when a new block is going to be encrypted or decrypted.
The following advantages come out of enabling online key scheduling:
The following disadvantages come out of enabling online key scheduling:
On 8051 platforms in combination with the PH_CRYPTOSYM_SW_USE_8051_DATA_STORAGE enabling online key scheduling even gives better results on execution time if only 1 or 2 blocks are encrypted with a given key. In case of keys are used longer (which is most likely the standard case), it is faster to disable that feature. Also note, that e.g. for a MIFARE Plus (R) instance of the library, two crypto instances are required, and as a consequence online key scheduling can save 704(DES enabled)/(DES disabled)448 bytes of RAM.
| #define PH_CRYPTOSYM_SW_ONLINE_CMAC_SUBKEY_CALCULATION |
Enables online CMAC SubKey calculation.
This define enables for both AES and DES the online CMAC SubKey calculation. This means, that the CMAC SubKeys are not stored in the context of the individual instance of the crypto lib, but they are newly calculated for each MAC.
The following advantages come out of enabling online CMAC SubKey calculation:
The following disadvantages come out of online CMAC SubKey calculation:
| #define PH_CRYPTOSYM_SW_ROM_OPTIMIZATION |
Enables ROM optimizations in the AES algorithm.
This define removes some of the lookup tables in the AES implementation to save ROM space.
The following advantages come out of enabling ROM optimizations:
The following disadvantages come out of enabling ROM optimizations:
| #define PH_CRYTOSYM_SW_FAST_RAM |
Enables 8051 data storage specifier.
This define allows to specify any value for PH_CRYTOSYM_SW_FAST_RAM. It takes care, that the buffers are recopied correctly, and that most of the time consuming calculations are done on this fast memory. In case of PH_CRYPTOSYM_SW_ONLINE_KEYSCHEDULING is set, even the key scheduling can be performed on this fast memory. Fast RAM specifier - not set per default