#include <cdk.h>
All public symbols are in the 'cdk' namespace, except for a few assembly language functions under Windows.
Functions typically return 0 on success.
Usage flow: ISC_CDK() // instantiate a new ISC_CDK object Test_XYZ() // run a specified level of as many on-demand tests as you require SelfTest() // or run groups of selftests (e.g., test all symetric ciphers) isOK() // or run all self-tests in level 0 Recommendations for strict FIPS 140-1 compliance: All methods in this class may be used by a FIPS 140-1 compliant application. There are no restrictions regarding the functions defined in this file.
Notes:
Primary Self-Test and Inspectors | |
| int | SelfTest (int level=0, char options[]="a") |
| Run one or more system self-tests at the specified level. | |
| bool | isOK () |
| Predicate used to test the hard error state and run all self-tests at level 0. | |
| static int | Version () |
| Get the CDK version number. | |
Public Member Functions | |
Constructor and Destructor | |
| ISC_CDK () | |
| Constructor. | |
| virtual | ~ISC_CDK () |
| Destructor. | |
On-Demand Self-Tests | |
All of these functions are called by SelfTest(). | |
| int | Test_CRC (int level) |
| Run the CRC-32 tests. | |
| int | Test_MD2 (int level) |
| Run the MD2 tests. | |
| int | Test_MD5 (int level) |
| Run the MD5 tests. | |
| int | Test_SHA1 (int level) |
| Run the SHA-1 tests. | |
| int | Test_SHA256 (int level) |
| Run the SHA-256 tests. | |
| int | Test_SHA384 (int level) |
| Run the SHA-384 tests. | |
| int | Test_SHA512 (int level) |
| Run the SHA-512 tests. | |
| int | Test_HMAC (int level) |
| Run the HMAC tests. | |
| int | Test_DES (int level) |
| Run the DES tests. | |
| int | Test_TDES (int level) |
| Run the TDES tests. | |
| int | Test_AES (int level) |
| Run the AES tests. | |
| int | Test_AES_Modes (int level) |
| Run the AES Modes tests. | |
| int | Test_RC2 (int level) |
| Run the RC2 tests. | |
| int | Test_RC4 (int level) |
| Run the RC4 tests. | |
| int | Test_EES (int level) |
| Run the EES tests. | |
| int | Test_DSA (int level) |
| Run the DSA tests. | |
| int | Test_ECDSA (int level) |
| Run the ECDSA tests for NIST curves over fields of characteristic p > 2. | |
| int | Test_ECDSA2 (int level) |
| Run the ECDSA tests for NIST curves over binary fields (characteristic 2). | |
| int | Test_RSASign (int level) |
| Run the RSA signature tests. | |
| int | Test_PRNG (int level) |
| Run the pseudorandom number generation tests. | |
| int | Test_PKCS12 (int level) |
| Run the PKCS#12 tests. | |
| int | Test_PWD_Generator (int level) |
| Test the CDK's FIPS 181 password generator. | |
| bool isOK | ( | ) | [inline] |
Predicate used to test the hard error state and run all self-tests at level 0.
| int SelfTest | ( | int | level = 0, |
|
| char | options[] = "a" | |||
| ) |
Run one or more system self-tests at the specified level.
| level | the run level: 0 or 1 | |
| options | a character string containing a combination of a, c, d, o and r |
Calling SelfTest() with no parameters runs all tests at level 0.
If a self-test fails, the CDK enters its hard error state and throws an assertion. This should cause the calling application to exit.
| int Test_AES | ( | int | level | ) |
Run the AES tests.
| level | the run level: 0 or 1 |
| int Test_AES_Modes | ( | int | level | ) |
Run the AES Modes tests.
| level | the run level: 0 or 1 |
| int Test_CRC | ( | int | level | ) |
Run the CRC-32 tests.
| level | the run level: 0 or 1 |
| int Test_DES | ( | int | level | ) |
Run the DES tests.
| level | the run level: 0 or 1 |
| int Test_DSA | ( | int | level | ) |
Run the DSA tests.
| level | the run level: 0 or 1 |
| int Test_ECDSA | ( | int | level | ) |
Run the ECDSA tests for NIST curves over fields of characteristic p > 2.
| level | the run level: 0 or 1 |
| int Test_ECDSA2 | ( | int | level | ) |
Run the ECDSA tests for NIST curves over binary fields (characteristic 2).
| level | the run level: 0 or 1 |
| int Test_EES | ( | int | level | ) |
Run the EES tests.
| level | the run level: 0 or 1 |
| int Test_HMAC | ( | int | level | ) |
Run the HMAC tests.
| level | the run level: 0 or 1 |
| int Test_MD2 | ( | int | level | ) |
Run the MD2 tests.
| level | the run level: 0 or 1 |
| int Test_MD5 | ( | int | level | ) |
Run the MD5 tests.
| level | the run level: 0 or 1 |
| int Test_PKCS12 | ( | int | level | ) |
Run the PKCS#12 tests.
| level | the run level: 0 or 1 |
| int Test_PRNG | ( | int | level | ) |
Run the pseudorandom number generation tests.
| level | the run level: 0 or 1 |
| int Test_PWD_Generator | ( | int | level | ) |
Test the CDK's FIPS 181 password generator.
| level | the run level: 0 or 1 |
| int Test_RC2 | ( | int | level | ) |
Run the RC2 tests.
| level | the run level: 0 or 1 |
| int Test_RC4 | ( | int | level | ) |
Run the RC4 tests.
| level | the run level: 0 or 1 |
| int Test_RSASign | ( | int | level | ) |
Run the RSA signature tests.
| level | the run level: 0 or 1 |
| int Test_SHA1 | ( | int | level | ) |
Run the SHA-1 tests.
| level | the run level: 0 or 1 |
| int Test_SHA256 | ( | int | level | ) |
Run the SHA-256 tests.
| level | the run level: 0 or 1 |
| int Test_SHA384 | ( | int | level | ) |
Run the SHA-384 tests.
| level | the run level: 0 or 1 |
| int Test_SHA512 | ( | int | level | ) |
Run the SHA-512 tests.
| level | the run level: 0 or 1 |
| int Test_TDES | ( | int | level | ) |
Run the TDES tests.
| level | the run level: 0 or 1 |
| static int Version | ( | ) | [inline, static] |
Get the CDK version number.
| ISC Cryptographic Development Kit - User's Guide | |
| Questions? E-mail ISC technical support | |
| Copyright© 2002-2006 Information Security Corp. All rights reserved. |