|
Register a block cipher with the library.
Block cipher implementations may already be compiled and pre-registered with the library by default. However, if your library was not built with the cipher your application requires, this method allows an external block cipher to be registered and used. For security reasons, once a block cipher is registered, it cannot be replaced.
- Note
- Only the AES block cipher with 256-bit key strength is supported by the C OAL at this time. All uses of this cipher only require encryption (decryption support is not required).
- Parameters
-
algorithm | The recognized algorithm to be registered; refer to DOFCipherAlgorithm. |
strength | The security strength as defined by the OpenDof Project; refer to DOFCipherStrength. |
cipher | The block cipher implementation; refer to DOFCipher. |
- Return values
-
Non-zero | (TRUE) if the cipher was successfully added to the registry. |
- Exceptions
-
Zero | (FALSE) if the cipher could not be added. This may occur for a number of reasons, including:
- the algorithm is not recognized by the library; or
- the strength is not recognized by the library; or
- a cipher was already added for the given algorithm and strength; or
- the cipher implementation fails to meet the library's requirements for the given algorithm and strength (e.g., incorrect block size, excessive key state size, or missing required functionality).
|
|