The block cipher registry for the C OAL. More...
Files | |
file | oal.h |
Header file for the C OAL functions, defines and data types. | |
Functions | |
boolean | DOFCipherRegistry_Register (DOFCipherAlgorithm algorithm, DOFCipherStrength strength, DOFCipher cipher) |
Register a block cipher with the library. | |
DOFCipher | DOFCipherRegistry_Get (DOFCipherAlgorithm algorithm, DOFCipherStrength strength) |
Retrieve a block cipher implementation from the library's registry. | |
The block cipher registry for the C OAL.
Required block cipher algorithms are usually compiled and pre-registered with the C OAL where available. For automatic pre-registration of a cipher, the cipher implementation file must contain a variable definition of the format:
const struct BlockCipher BlockCipher_<algorithm>_<strength_id>
Where <algorithm> is one of the DOFCipherAlgorithm identifiers without the DOFCIPHERALGORITHM_ prefix, and <strength_id> is one of the DOFCipherStrength identifiers without the DOFCIPHERSTRENGTH_ prefix. For example, to pre-register DOFCIPHERALGORITHM_AES with DOFCIPHERSTRENGTH_256, the following definition should exist:
const struct BlockCipher BlockCipher_AES_256 = { ... }