-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIPS: add documentation on new FIPS mode
Signed-off-by: Pablo de Lara <[email protected]>
- Loading branch information
1 parent
4815f9a
commit faac8c3
Showing
4 changed files
with
73 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# FIPS Mode on ISA-L Crypto | ||
|
||
## Compilation | ||
|
||
FIPS mode is disabled in the library by default. | ||
In order to enable it, the library needs to be compiled as follows: | ||
|
||
- Using autotools: | ||
|
||
``` | ||
./autogen.sh | ||
./configure --enable-fips-mode | ||
make | ||
``` | ||
|
||
- Standard makefile: | ||
|
||
``` | ||
make -f Makefile.unx FIPS_MODE=y | ||
``` | ||
|
||
- Windows Makefile: | ||
|
||
``` | ||
make /f Makefile.nmake FIPS_MODE=y | ||
``` | ||
|
||
## Covered API by this mode | ||
|
||
Only the "isal_" prefixed API is in the scope of this mode | ||
(e.g. `isal_aes_cbc_enc_128()`). | ||
|
||
isal_crypto.h or isal_crypto_api.h must be included in the application/framework | ||
calling this API. | ||
|
||
After the first call on this API, crypto self tests will be run. | ||
If any of the tests fail, no crypto operation will be performed | ||
and the API will return ISAL_CRYPTO_ERR_SELF_TEST. | ||
Subsequent calls will return this error too. | ||
|
||
The self tests can also be run at the application level by | ||
calling explicitly `isal_self_tests()`. | ||
|
||
The validation of self tests is executed only once, either by invoking | ||
the `isal_self_tests()` function or by invoking a covered crypto function, | ||
such as `isal_aes_cbc_enc_128()`. After the tests have been run once, | ||
they will not be executed again, and subsequent API calls will use the previous test result. | ||
|
||
If an algorithm is not NIST approved (e.g. SM3), calling the | ||
crypto function will return ISAL_CRYPTO_ERR_FIPS_INVALID_ALGO. | ||
|
||
## Example of usage | ||
|
||
``` | ||
#include <isal_crypto_api.h> | ||
#include <aes_cbc.h> | ||
... | ||
int ret = isal_aes_cbc_enc_128(pt, iv, expkey_enc, ct, pt_len); | ||
if (ret != 0) | ||
exit(1); | ||
``` | ||
|
||
## Considerations | ||
|
||
- This library does not check for uniqueness on AES-GCM key/IV pair. | ||
- FIPS mode is supported from ISA-L Crypto version v2.25. | ||
- FIPS mode has only been tested on Intel x86 architecture. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters