diff options
author | Andy Polyakov <appro@openssl.org> | 2011-09-14 20:48:49 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2011-09-14 20:48:49 +0000 |
commit | 03e389cf049e4bbc2f6d0028dc320fb0583aad2c (patch) | |
tree | 61020185544c4ff9567d236e9c1ee3a74ee417c8 /fips | |
parent | 93256bf5d148f3b8fa02a410b4477c6c9ca20e65 (diff) |
Allow for dynamic base in Win64 FIPS module.
Diffstat (limited to 'fips')
-rw-r--r-- | fips/aes/fips_aes_selftest.c | 23 | ||||
-rw-r--r-- | fips/cmac/fips_cmac_selftest.c | 1 | ||||
-rw-r--r-- | fips/des/fips_des_selftest.c | 3 | ||||
-rw-r--r-- | fips/dsa/fips_dsa_selftest.c | 5 | ||||
-rw-r--r-- | fips/dsa/fips_dsatest.c | 2 | ||||
-rw-r--r-- | fips/ecdsa/fips_ecdsa_selftest.c | 8 | ||||
-rw-r--r-- | fips/fips.c | 1 | ||||
-rw-r--r-- | fips/fips_canister.c | 8 | ||||
-rw-r--r-- | fips/fips_post.c | 1 | ||||
-rw-r--r-- | fips/fipssyms.h | 7 | ||||
-rw-r--r-- | fips/hmac/fips_hmac_selftest.c | 3 | ||||
-rw-r--r-- | fips/rand/fips_drbg_ec.c | 6 | ||||
-rw-r--r-- | fips/rand/fips_drbg_selftest.h | 504 | ||||
-rw-r--r-- | fips/rand/fips_randtest.c | 18 | ||||
-rw-r--r-- | fips/rsa/fips_rsa_selftest.c | 10 | ||||
-rw-r--r-- | fips/rsa/fips_rsa_sign.c | 20 | ||||
-rw-r--r-- | fips/sha/fips_sha1_selftest.c | 1 |
17 files changed, 608 insertions, 13 deletions
diff --git a/fips/aes/fips_aes_selftest.c b/fips/aes/fips_aes_selftest.c index 8fdda3b578..c31a266d42 100644 --- a/fips/aes/fips_aes_selftest.c +++ b/fips/aes/fips_aes_selftest.c @@ -56,7 +56,8 @@ #include "fips_locl.h" #ifdef OPENSSL_FIPS -static struct +__fips_constseg +static const struct { const unsigned char key[16]; const unsigned char plaintext[16]; @@ -99,26 +100,32 @@ int FIPS_selftest_aes() /* AES-CCM test data from NIST public test vectors */ +__fips_constseg static const unsigned char ccm_key[] = { 0xce,0xb0,0x09,0xae,0xa4,0x45,0x44,0x51,0xfe,0xad,0xf0,0xe6, 0xb3,0x6f,0x45,0x55,0x5d,0xd0,0x47,0x23,0xba,0xa4,0x48,0xe8 }; +__fips_constseg static const unsigned char ccm_nonce[] = { 0x76,0x40,0x43,0xc4,0x94,0x60,0xb7 }; +__fips_constseg static const unsigned char ccm_adata[] = { 0x6e,0x80,0xdd,0x7f,0x1b,0xad,0xf3,0xa1,0xc9,0xab,0x25,0xc7, 0x5f,0x10,0xbd,0xe7,0x8c,0x23,0xfa,0x0e,0xb8,0xf9,0xaa,0xa5, 0x3a,0xde,0xfb,0xf4,0xcb,0xf7,0x8f,0xe4 }; +__fips_constseg static const unsigned char ccm_pt[] = { 0xc8,0xd2,0x75,0xf9,0x19,0xe1,0x7d,0x7f,0xe6,0x9c,0x2a,0x1f, 0x58,0x93,0x9d,0xfe,0x4d,0x40,0x37,0x91,0xb5,0xdf,0x13,0x10 }; +__fips_constseg static const unsigned char ccm_ct[] = { 0x8a,0x0f,0x3d,0x82,0x29,0xe4,0x8e,0x74,0x87,0xfd,0x95,0xa2, 0x8a,0xd3,0x92,0xc8,0x0b,0x36,0x81,0xd4,0xfb,0xc7,0xbb,0xfd }; +__fips_constseg static const unsigned char ccm_tag[] = { 0x2d,0xd6,0xef,0x1c,0x45,0xd4,0xcc,0xb7,0x23,0xdc,0x07,0x44, 0x14,0xdb,0x50,0x6d @@ -201,26 +208,32 @@ int FIPS_selftest_aes_ccm(void) /* AES-GCM test data from NIST public test vectors */ +__fips_constseg static const unsigned char gcm_key[] = { 0xee,0xbc,0x1f,0x57,0x48,0x7f,0x51,0x92,0x1c,0x04,0x65,0x66, 0x5f,0x8a,0xe6,0xd1,0x65,0x8b,0xb2,0x6d,0xe6,0xf8,0xa0,0x69, 0xa3,0x52,0x02,0x93,0xa5,0x72,0x07,0x8f }; +__fips_constseg static const unsigned char gcm_iv[] = { 0x99,0xaa,0x3e,0x68,0xed,0x81,0x73,0xa0,0xee,0xd0,0x66,0x84 }; +__fips_constseg static const unsigned char gcm_pt[] = { 0xf5,0x6e,0x87,0x05,0x5b,0xc3,0x2d,0x0e,0xeb,0x31,0xb2,0xea, 0xcc,0x2b,0xf2,0xa5 }; +__fips_constseg static const unsigned char gcm_aad[] = { 0x4d,0x23,0xc3,0xce,0xc3,0x34,0xb4,0x9b,0xdb,0x37,0x0c,0x43, 0x7f,0xec,0x78,0xde }; +__fips_constseg static const unsigned char gcm_ct[] = { 0xf7,0x26,0x44,0x13,0xa8,0x4c,0x0e,0x7c,0xd5,0x36,0x86,0x7e, 0xb9,0xf2,0x17,0x36 }; +__fips_constseg static const unsigned char gcm_tag[] = { 0x67,0xba,0x05,0x10,0x26,0x2a,0xe4,0x87,0xd7,0x37,0xee,0x62, 0x98,0xf7,0x7e,0x0c @@ -300,24 +313,29 @@ int FIPS_selftest_aes_gcm(void) } +__fips_constseg static const unsigned char XTS_128_key[] = { 0xa1,0xb9,0x0c,0xba,0x3f,0x06,0xac,0x35,0x3b,0x2c,0x34,0x38, 0x76,0x08,0x17,0x62,0x09,0x09,0x23,0x02,0x6e,0x91,0x77,0x18, 0x15,0xf2,0x9d,0xab,0x01,0x93,0x2f,0x2f }; +__fips_constseg static const unsigned char XTS_128_i[] = { 0x4f,0xae,0xf7,0x11,0x7c,0xda,0x59,0xc6,0x6e,0x4b,0x92,0x01, 0x3e,0x76,0x8a,0xd5 }; +__fips_constseg static const unsigned char XTS_128_pt[] = { 0xeb,0xab,0xce,0x95,0xb1,0x4d,0x3c,0x8d,0x6f,0xb3,0x50,0x39, 0x07,0x90,0x31,0x1c }; +__fips_constseg static const unsigned char XTS_128_ct[] = { 0x77,0x8a,0xe8,0xb4,0x3c,0xb9,0x8d,0x5a,0x82,0x50,0x81,0xd5, 0xbe,0x47,0x1c,0x63 }; +__fips_constseg static const unsigned char XTS_256_key[] = { 0x1e,0xa6,0x61,0xc5,0x8d,0x94,0x3a,0x0e,0x48,0x01,0xe4,0x2f, 0x4b,0x09,0x47,0x14,0x9e,0x7f,0x9f,0x8e,0x3e,0x68,0xd0,0xc7, @@ -326,15 +344,18 @@ static const unsigned char XTS_256_key[] = { 0xd6,0x19,0xb7,0xe2,0xb9,0x14,0x1e,0x58,0x31,0x8e,0xea,0x39, 0x2c,0xf4,0x1b,0x08 }; +__fips_constseg static const unsigned char XTS_256_i[] = { 0xad,0xf8,0xd9,0x26,0x27,0x46,0x4a,0xd2,0xf0,0x42,0x8e,0x84, 0xa9,0xf8,0x75,0x64 }; +__fips_constseg static const unsigned char XTS_256_pt[] = { 0x2e,0xed,0xea,0x52,0xcd,0x82,0x15,0xe1,0xac,0xc6,0x47,0xe8, 0x10,0xbb,0xc3,0x64,0x2e,0x87,0x28,0x7f,0x8d,0x2e,0x57,0xe3, 0x6c,0x0a,0x24,0xfb,0xc1,0x2a,0x20,0x2e }; +__fips_constseg static const unsigned char XTS_256_ct[] = { 0xcb,0xaa,0xd0,0xe2,0xf6,0xce,0xa3,0xf5,0x0b,0x37,0xf9,0x34, 0xd4,0x6a,0x9b,0x13,0x0b,0x9d,0x54,0xf0,0x7e,0x34,0xf3,0x6a, diff --git a/fips/cmac/fips_cmac_selftest.c b/fips/cmac/fips_cmac_selftest.c index 89a491d78f..8833d97227 100644 --- a/fips/cmac/fips_cmac_selftest.c +++ b/fips/cmac/fips_cmac_selftest.c @@ -64,6 +64,7 @@ typedef struct { } CMAC_KAT; /* from http://csrc.nist.gov/publications/nistpubs/800-38B/SP_800-38B.pdf */ +__fips_constseg static const CMAC_KAT vector[] = { { NID_aes_128_cbc, /* Count = 32 from CMACGenAES128.txt */ { 0x77,0xa7,0x7f,0xaf, 0x29,0x0c,0x1f,0xa3, diff --git a/fips/des/fips_des_selftest.c b/fips/des/fips_des_selftest.c index 9d027c9195..a014f6f33f 100644 --- a/fips/des/fips_des_selftest.c +++ b/fips/des/fips_des_selftest.c @@ -57,7 +57,8 @@ #ifdef OPENSSL_FIPS -static struct +__fips_constseg +static const struct { const unsigned char key[24]; const unsigned char plaintext[8]; diff --git a/fips/dsa/fips_dsa_selftest.c b/fips/dsa/fips_dsa_selftest.c index 9617ab14bc..131f304025 100644 --- a/fips/dsa/fips_dsa_selftest.c +++ b/fips/dsa/fips_dsa_selftest.c @@ -60,6 +60,7 @@ #ifdef OPENSSL_FIPS +__fips_constseg static const unsigned char dsa_test_2048_p[] = { 0xa8,0x53,0x78,0xd8,0xfd,0x3f,0x8d,0x72,0xec,0x74,0x18,0x08, 0x0d,0xa2,0x13,0x17,0xe4,0x3e,0xc4,0xb6,0x2b,0xa8,0xc8,0x62, @@ -84,11 +85,13 @@ static const unsigned char dsa_test_2048_p[] = { 0x2c,0x8d,0x74,0x69,0xdb,0x02,0xe2,0x4d,0x59,0x23,0x94,0xa7, 0xdb,0xa0,0x69,0xe9 }; +__fips_constseg static const unsigned char dsa_test_2048_q[] = { 0xd2,0x77,0x04,0x4e,0x50,0xf5,0xa4,0xe3,0xf5,0x10,0xa5,0x0a, 0x0b,0x84,0xfd,0xff,0xbc,0xa0,0x47,0xed,0x27,0x60,0x20,0x56, 0x74,0x41,0xa0,0xa5 }; +__fips_constseg static const unsigned char dsa_test_2048_g[] = { 0x13,0xd7,0x54,0xe2,0x1f,0xd2,0x41,0x65,0x5d,0xa8,0x91,0xc5, 0x22,0xa6,0x5a,0x72,0xa8,0x9b,0xdc,0x64,0xec,0x9b,0x54,0xa8, @@ -114,6 +117,7 @@ static const unsigned char dsa_test_2048_g[] = { 0xb3,0xc2,0xa9,0x66 }; +__fips_constseg static const unsigned char dsa_test_2048_pub_key[] = { 0x24,0x52,0xf3,0xcc,0xbe,0x9e,0xd5,0xca,0x7d,0xc7,0x4c,0x60, 0x2b,0x99,0x22,0x6e,0x8f,0x2f,0xab,0x38,0xe7,0xd7,0xdd,0xfb, @@ -138,6 +142,7 @@ static const unsigned char dsa_test_2048_pub_key[] = { 0x0a,0xcb,0x67,0x37,0x17,0xa0,0xd2,0xfb,0x3b,0x50,0xc8,0x93, 0xf7,0xda,0xb1,0x4f }; +__fips_constseg static const unsigned char dsa_test_2048_priv_key[] = { 0x0c,0x4b,0x30,0x89,0xd1,0xb8,0x62,0xcb,0x3c,0x43,0x64,0x91, 0xf0,0x91,0x54,0x70,0xc5,0x27,0x96,0xe3,0xac,0xbe,0xe8,0x00, diff --git a/fips/dsa/fips_dsatest.c b/fips/dsa/fips_dsatest.c index c5dd088fe5..64d52258eb 100644 --- a/fips/dsa/fips_dsatest.c +++ b/fips/dsa/fips_dsatest.c @@ -140,8 +140,10 @@ static unsigned char out_g[] = { }; +__fips_constseg static const unsigned char str1[]="12345678901234567890"; +__fips_constseg static const char rnd_seed[] = "string to make the random number generator think it has entropy"; int main(int argc, char **argv) diff --git a/fips/ecdsa/fips_ecdsa_selftest.c b/fips/ecdsa/fips_ecdsa_selftest.c index 03eadda3d7..7d1007e19d 100644 --- a/fips/ecdsa/fips_ecdsa_selftest.c +++ b/fips/ecdsa/fips_ecdsa_selftest.c @@ -65,18 +65,22 @@ #ifdef OPENSSL_FIPS +__fips_constseg static const char P_224_name[] = "ECDSA P-224"; +__fips_constseg static const unsigned char P_224_d[] = { 0x98,0x1f,0xb5,0xf1,0xfc,0x87,0x1d,0x7d,0xde,0x1e,0x01,0x64, 0x09,0x9b,0xe7,0x1b,0x9f,0xad,0x63,0xdd,0x33,0x01,0xd1,0x50, 0x80,0x93,0x50,0x30 }; +__fips_constseg static const unsigned char P_224_qx[] = { 0x95,0x47,0x99,0x44,0x29,0x8f,0x51,0x39,0xe2,0x53,0xec,0x79, 0xb0,0x4d,0xde,0x87,0x1a,0x76,0x54,0xd5,0x96,0xb8,0x7a,0x6d, 0xf4,0x1c,0x2c,0x87 }; +__fips_constseg static const unsigned char P_224_qy[] = { 0x91,0x5f,0xd5,0x31,0xdd,0x24,0xe5,0x78,0xd9,0x08,0x24,0x8a, 0x49,0x99,0xec,0x55,0xf2,0x82,0xb3,0xc4,0xb7,0x33,0x68,0xe4, @@ -85,18 +89,22 @@ static const unsigned char P_224_qy[] = { #ifndef OPENSSL_NO_EC2M +__fips_constseg static const char K_233_name[] = "ECDSA K-233"; +__fips_constseg static const unsigned char K_233_d[] = { 0x10,0x0a,0xe0,0xae,0xcf,0x1b,0xa4,0x55,0x1a,0xd4,0xc8,0x3f, 0xc3,0x7e,0xdc,0x97,0x40,0x2c,0x6a,0xc8,0xe2,0x50,0x09,0xf8, 0x1c,0x70,0x23,0xcb,0xde }; +__fips_constseg static const unsigned char K_233_qx[] = { 0x01,0xa6,0xbf,0x38,0x32,0xe2,0xd7,0x15,0x4a,0xc8,0xaa,0x1f, 0x9d,0xdb,0xb8,0x8f,0x9a,0x9b,0xc0,0xb4,0xc1,0xb6,0xa5,0x5c, 0x93,0xb9,0x8a,0x83,0x65,0xe9 }; +__fips_constseg static const unsigned char K_233_qy[] = { 0x01,0x81,0x3d,0xfe,0x38,0x56,0x8f,0x3c,0x23,0x29,0xc6,0x59, 0xcb,0xa5,0x90,0x86,0xd1,0x8c,0xd8,0xb0,0xf2,0xd4,0x35,0x2b, diff --git a/fips/fips.c b/fips/fips.c index 823a042f50..a8f0f0374d 100644 --- a/fips/fips.c +++ b/fips/fips.c @@ -145,6 +145,7 @@ void fips_set_selftest_fail(void) extern const void *FIPS_text_start(), *FIPS_text_end(); extern const unsigned char FIPS_rodata_start[], FIPS_rodata_end[]; unsigned char FIPS_signature [20] = { 0 }; +__fips_constseg static const char FIPS_hmac_key[]="etaonrishdlcupfm"; unsigned int FIPS_incore_fingerprint(unsigned char *sig,unsigned int len) diff --git a/fips/fips_canister.c b/fips/fips_canister.c index a1f8400479..a209172f43 100644 --- a/fips/fips_canister.c +++ b/fips/fips_canister.c @@ -56,6 +56,10 @@ static void *instruction_pointer_xlc(void); * reference points accordingly. In case you wonder, the values are * big-endian encoded variable names, just to prevent these arrays * from being merged by linker. */ +# if defined(_MSC_VER) && defined(_WIN64) +# pragma section("fipsro$a",read) + __declspec(allocate("fipsro$a")) +# endif const unsigned int FIPS_rodata_start[]= { 0x46495053, 0x5f726f64, 0x6174615f, 0x73746172 }; #else @@ -63,6 +67,10 @@ const unsigned int FIPS_rodata_start[]= # ifdef FIPS_REF_POINT_IS_CROSS_COMPILER_AWARE # define instruction_pointer FIPS_text_endX # endif +# if defined(_MSC_VER) && defined(_WIN64) +# pragma section("fipsro$c",read) + __declspec(allocate("fipsro$c")) +# endif const unsigned int FIPS_rodata_end[]= { 0x46495053, 0x5f726f64, 0x6174615f, 0x656e645b }; #endif diff --git a/fips/fips_post.c b/fips/fips_post.c index 286edfe64f..392bd5543b 100644 --- a/fips/fips_post.c +++ b/fips/fips_post.c @@ -209,6 +209,7 @@ int fips_pkey_signature_test(int id, EVP_PKEY *pkey, int ret = 0; unsigned char *sig = NULL; unsigned int siglen; + __fips_constseg static const unsigned char str1[]="12345678901234567890"; DSA_SIG *dsig = NULL; ECDSA_SIG *esig = NULL; diff --git a/fips/fipssyms.h b/fips/fipssyms.h index 09bda6b4ed..67753d8033 100644 --- a/fips/fipssyms.h +++ b/fips/fipssyms.h @@ -666,3 +666,10 @@ #define _sparcv9_vis1_instrument _fips_sparcv9_vis1_instrument #define bn_mul_mont_gather5 fips_bn_mul_mont_gather5 #define bn_scatter5 fips_bn_scatter5 + +#if defined(_MSC_VER) && defined(_WIN64) +# pragma section("fipsro$b",read) +# define __fips_constseg __declspec(allocate("fipsro$b")) +#else +# define __fips_constseg +#endif diff --git a/fips/hmac/fips_hmac_selftest.c b/fips/hmac/fips_hmac_selftest.c index bdccf96f94..e82bacf20f 100644 --- a/fips/hmac/fips_hmac_selftest.c +++ b/fips/hmac/fips_hmac_selftest.c @@ -63,15 +63,18 @@ typedef struct { /* from http://csrc.nist.gov/publications/fips/fips198/fips-198a.pdf */ /* "0123456789:;<=>?@ABC" */ +__fips_constseg const unsigned char hmac_kat_key[] = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43 }; /* "Sample #2" */ +__fips_constseg const unsigned char hmac_kat_data[] = { 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x23, 0x32 }; +__fips_constseg static const HMAC_KAT vector[] = { { NID_sha1, { 0x09,0x22,0xd3,0x40,0x5f,0xaa,0x3d,0x19, diff --git a/fips/rand/fips_drbg_ec.c b/fips/rand/fips_drbg_ec.c index ee6fe074ec..0b674199bb 100644 --- a/fips/rand/fips_drbg_ec.c +++ b/fips/rand/fips_drbg_ec.c @@ -392,23 +392,27 @@ static int drbg_ec_uninstantiate(DRBG_CTX *dctx) /* Q points from SP 800-90 A.1, P is generator */ +__fips_constseg static const unsigned char p_256_qx[] = { 0xc9,0x74,0x45,0xf4,0x5c,0xde,0xf9,0xf0,0xd3,0xe0,0x5e,0x1e, 0x58,0x5f,0xc2,0x97,0x23,0x5b,0x82,0xb5,0xbe,0x8f,0xf3,0xef, 0xca,0x67,0xc5,0x98,0x52,0x01,0x81,0x92 }; +__fips_constseg static const unsigned char p_256_qy[] = { 0xb2,0x8e,0xf5,0x57,0xba,0x31,0xdf,0xcb,0xdd,0x21,0xac,0x46, 0xe2,0xa9,0x1e,0x3c,0x30,0x4f,0x44,0xcb,0x87,0x05,0x8a,0xda, 0x2c,0xb8,0x15,0x15,0x1e,0x61,0x00,0x46 }; +__fips_constseg static const unsigned char p_384_qx[] = { 0x8e,0x72,0x2d,0xe3,0x12,0x5b,0xdd,0xb0,0x55,0x80,0x16,0x4b, 0xfe,0x20,0xb8,0xb4,0x32,0x21,0x6a,0x62,0x92,0x6c,0x57,0x50, 0x2c,0xee,0xde,0x31,0xc4,0x78,0x16,0xed,0xd1,0xe8,0x97,0x69, 0x12,0x41,0x79,0xd0,0xb6,0x95,0x10,0x64,0x28,0x81,0x50,0x65 }; +__fips_constseg static const unsigned char p_384_qy[] = { 0x02,0x3b,0x16,0x60,0xdd,0x70,0x1d,0x08,0x39,0xfd,0x45,0xee, 0xc3,0x6f,0x9e,0xe7,0xb3,0x2e,0x13,0xb3,0x15,0xdc,0x02,0x61, @@ -416,6 +420,7 @@ static const unsigned char p_384_qy[] = { 0xc5,0xe0,0x9b,0x05,0x67,0x4d,0xbb,0x7e,0x45,0xc8,0x03,0xdd }; +__fips_constseg static const unsigned char p_521_qx[] = { 0x01,0xb9,0xfa,0x3e,0x51,0x8d,0x68,0x3c,0x6b,0x65,0x76,0x36, 0x94,0xac,0x8e,0xfb,0xae,0xc6,0xfa,0xb4,0x4f,0x22,0x76,0x17, @@ -424,6 +429,7 @@ static const unsigned char p_521_qx[] = { 0x3b,0x24,0xc3,0xed,0xfa,0x0f,0x85,0xfe,0x24,0xd0,0xc8,0xc0, 0x15,0x91,0xf0,0xbe,0x6f,0x63 }; +__fips_constseg static const unsigned char p_521_qy[] = { 0x01,0xf3,0xbd,0xba,0x58,0x52,0x95,0xd9,0xa1,0x11,0x0d,0x1d, 0xf1,0xf9,0x43,0x0e,0xf8,0x44,0x2c,0x50,0x18,0x97,0x6f,0xf3, diff --git a/fips/rand/fips_drbg_selftest.h b/fips/rand/fips_drbg_selftest.h index 572f047ece..31e1961553 100644 --- a/fips/rand/fips_drbg_selftest.h +++ b/fips/rand/fips_drbg_selftest.h @@ -51,53 +51,62 @@ /* AES-128 use df PR */ +__fips_constseg static const unsigned char aes_128_use_df_pr_entropyinput[] = { 0x61,0x52,0x7c,0xe3,0x23,0x7d,0x0a,0x07,0x10,0x0c,0x50,0x33, 0xc8,0xdb,0xff,0x12 }; +__fips_constseg static const unsigned char aes_128_use_df_pr_nonce[] = { 0x51,0x0d,0x85,0x77,0xed,0x22,0x97,0x28 }; +__fips_constseg static const unsigned char aes_128_use_df_pr_personalizationstring[] = { 0x59,0x9f,0xbb,0xcd,0xd5,0x25,0x69,0xb5,0xcb,0xb5,0x03,0xfe, 0xd7,0xd7,0x01,0x67 }; +__fips_constseg static const unsigned char aes_128_use_df_pr_additionalinput[] = { 0xef,0x88,0x76,0x01,0xaf,0x3c,0xfe,0x8b,0xaf,0x26,0x06,0x9e, 0x9a,0x47,0x08,0x76 }; +__fips_constseg static const unsigned char aes_128_use_df_pr_entropyinputpr[] = { 0xe2,0x76,0xf9,0xf6,0x3a,0xba,0x10,0x9f,0xbf,0x47,0x0e,0x51, 0x09,0xfb,0xa3,0xb6 }; +__fips_constseg static const unsigned char aes_128_use_df_pr_int_returnedbits[] = { 0xd4,0x98,0x8a,0x46,0x80,0x4c,0xdb,0xa3,0x59,0x02,0x57,0x52, 0x66,0x1c,0xea,0x5b }; +__fips_constseg static const unsigned char aes_128_use_df_pr_additionalinput2[] = { 0x88,0x8c,0x91,0xd6,0xbe,0x56,0x6e,0x08,0x9a,0x62,0x2b,0x11, 0x3f,0x5e,0x31,0x06 }; +__fips_constseg static const unsigned char aes_128_use_df_pr_entropyinputpr2[] = { 0xc0,0x5c,0x6b,0x98,0x01,0x0d,0x58,0x18,0x51,0x18,0x96,0xae, 0xa7,0xe3,0xa8,0x67 }; +__fips_constseg static const unsigned char aes_128_use_df_pr_returnedbits[] = { 0xcf,0x01,0xac,0x22,0x31,0x06,0x8e,0xfc,0xce,0x56,0xea,0x24, @@ -106,53 +115,62 @@ static const unsigned char aes_128_use_df_pr_returnedbits[] = /* AES-128 use df No PR */ +__fips_constseg static const unsigned char aes_128_use_df_entropyinput[] = { 0x1f,0x8e,0x34,0x82,0x0c,0xb7,0xbe,0xc5,0x01,0x3e,0xd0,0xa3, 0x9d,0x7d,0x1c,0x9b }; +__fips_constseg static const unsigned char aes_128_use_df_nonce[] = { 0xd5,0x4d,0xbd,0x4a,0x93,0x7f,0xb8,0x96 }; +__fips_constseg static const unsigned char aes_128_use_df_personalizationstring[] = { 0xab,0xd6,0x3f,0x04,0xfe,0x27,0x6b,0x2d,0xd7,0xc3,0x1c,0xf3, 0x38,0x66,0xba,0x1b }; +__fips_constseg static const unsigned char aes_128_use_df_additionalinput[] = { 0xfe,0xf4,0x09,0xa8,0xb7,0x73,0x27,0x9c,0x5f,0xa7,0xea,0x46, 0xb5,0xe2,0xb2,0x41 }; +__fips_constseg static const unsigned char aes_128_use_df_int_returnedbits[] = { 0x42,0xe4,0x4e,0x7b,0x27,0xdd,0xcb,0xbc,0x0a,0xcf,0xa6,0x67, 0xe7,0x57,0x11,0xb4 }; +__fips_constseg static const unsigned char aes_128_use_df_entropyinputreseed[] = { 0x14,0x26,0x69,0xd9,0xf3,0x65,0x03,0xd6,0x6b,0xb9,0x44,0x0b, 0xc7,0xc4,0x9e,0x39 }; +__fips_constseg static const unsigned char aes_128_use_df_additionalinputreseed[] = { 0x55,0x2e,0x60,0x9a,0x05,0x72,0x8a,0xa8,0xef,0x22,0x81,0x5a, 0xc8,0x93,0xfa,0x84 }; +__fips_constseg static const unsigned char aes_128_use_df_additionalinput2[] = { 0x3c,0x40,0xc8,0xc4,0x16,0x0c,0x21,0xa4,0x37,0x2c,0x8f,0xa5, 0x06,0x0c,0x15,0x2c }; +__fips_constseg static const unsigned char aes_128_use_df_returnedbits[] = { 0xe1,0x3e,0x99,0x98,0x86,0x67,0x0b,0x63,0x7b,0xbe,0x3f,0x88, @@ -161,18 +179,21 @@ static const unsigned char aes_128_use_df_returnedbits[] = /* AES-192 use df PR */ +__fips_constseg static const unsigned char aes_192_use_df_pr_entropyinput[] = { 0x2b,0x4e,0x8b,0xe1,0xf1,0x34,0x80,0x56,0x81,0xf9,0x74,0xec, 0x17,0x44,0x2a,0xf1,0x14,0xb0,0xbf,0x97,0x39,0xb7,0x04,0x7d }; +__fips_constseg static const unsigned char aes_192_use_df_pr_nonce[] = { 0xd6,0x9d,0xeb,0x14,0x4e,0x6c,0x30,0x1e,0x39,0x55,0x73,0xd0, 0xd1,0x80,0x78,0xfa }; +__fips_constseg static const unsigned char aes_192_use_df_pr_personalizationstring[] = { 0xfc,0x43,0x4a,0xf8,0x9a,0x55,0xb3,0x53,0x83,0xe2,0x18,0x16, @@ -180,6 +201,7 @@ static const unsigned char aes_192_use_df_pr_personalizationstring[] = 0x7d,0x49,0xf0,0x41,0x9e,0x3d,0x99,0x04 }; +__fips_constseg static const unsigned char aes_192_use_df_pr_additionalinput[] = { 0x5e,0x9f,0x49,0x6f,0x21,0x8b,0x1d,0x32,0xd5,0x84,0x5c,0xac, @@ -187,18 +209,21 @@ static const unsigned char aes_192_use_df_pr_additionalinput[] = 0x69,0x10,0x0a,0x7e,0x81,0x57,0xb5,0x36 }; +__fips_constseg static const unsigned char aes_192_use_df_pr_entropyinputpr[] = { 0xd4,0x81,0x0c,0xd7,0x66,0x39,0xec,0x42,0x53,0x87,0x41,0xa5, 0x1e,0x7d,0x80,0x91,0x8e,0xbb,0xed,0xac,0x14,0x02,0x1a,0xd5 }; +__fips_constseg static const unsigned char aes_192_use_df_pr_int_returnedbits[] = { 0xdf,0x1d,0x39,0x45,0x7c,0x9b,0xc6,0x2b,0x7d,0x8c,0x93,0xe9, 0x19,0x30,0x6b,0x67 }; +__fips_constseg static const unsigned char aes_192_use_df_pr_additionalinput2[] = { 0x00,0x71,0x27,0x4e,0xd3,0x14,0xf1,0x20,0x7f,0x4a,0x41,0x32, @@ -206,12 +231,14 @@ static const unsigned char aes_192_use_df_pr_additionalinput2[] = 0x49,0x3d,0xde,0xe8,0xbc,0x93,0x91,0x99 }; +__fips_constseg static const unsigned char aes_192_use_df_pr_entropyinputpr2[] = { 0x90,0xee,0x76,0xa1,0x45,0x8d,0xb7,0x40,0xb0,0x11,0xbf,0xd0, 0x65,0xd7,0x3c,0x7c,0x4f,0x20,0x3f,0x4e,0x11,0x9d,0xb3,0x5e }; +__fips_constseg static const unsigned char aes_192_use_df_pr_returnedbits[] = { 0x24,0x3b,0x20,0xa4,0x37,0x66,0xba,0x72,0x39,0x3f,0xcf,0x3c, @@ -220,18 +247,21 @@ static const unsigned char aes_192_use_df_pr_returnedbits[] = /* AES-192 use df No PR */ +__fips_constseg static const unsigned char aes_192_use_df_entropyinput[] = { 0x8d,0x74,0xa4,0x50,0x1a,0x02,0x68,0x0c,0x2a,0x69,0xc4,0x82, 0x3b,0xbb,0xda,0x0e,0x7f,0x77,0xa3,0x17,0x78,0x57,0xb2,0x7b }; +__fips_constseg static const unsigned char aes_192_use_df_nonce[] = { 0x75,0xd5,0x1f,0xac,0xa4,0x8d,0x42,0x78,0xd7,0x69,0x86,0x9d, 0x77,0xd7,0x41,0x0e }; +__fips_constseg static const unsigned char aes_192_use_df_personalizationstring[] = { 0x4e,0x33,0x41,0x3c,0x9c,0xc2,0xd2,0x53,0xaf,0x90,0xea,0xcf, @@ -239,6 +269,7 @@ static const unsigned char aes_192_use_df_personalizationstring[] = 0x9c,0xd3,0xf8,0x30,0x9e,0xed,0x35,0x70 }; +__fips_constseg static const unsigned char aes_192_use_df_additionalinput[] = { 0x5d,0x8b,0x8c,0xc1,0xdf,0x0e,0x02,0x78,0xfb,0x19,0xb8,0x69, @@ -246,18 +277,21 @@ static const unsigned char aes_192_use_df_additionalinput[] = 0x28,0x3d,0x0c,0x9e,0x68,0xa8,0x45,0xd7 }; +__fips_constseg static const unsigned char aes_192_use_df_int_returnedbits[] = { 0xd5,0xe7,0x08,0xc5,0x19,0x99,0xd5,0x31,0x03,0x0a,0x74,0xb6, 0xb7,0xed,0xe9,0xea }; +__fips_constseg static const unsigned char aes_192_use_df_entropyinputreseed[] = { 0x9c,0x26,0xda,0xf1,0xac,0xd9,0x5a,0xd6,0xa8,0x65,0xf5,0x02, 0x8f,0xdc,0xa2,0x09,0x54,0xa6,0xe2,0xa4,0xde,0x32,0xe0,0x01 }; +__fips_constseg static const unsigned char aes_192_use_df_additionalinputreseed[] = { 0x9b,0x90,0xb0,0x3a,0x0e,0x3a,0x80,0x07,0x4a,0xf4,0xda,0x76, @@ -265,6 +299,7 @@ static const unsigned char aes_192_use_df_additionalinputreseed[] = 0xaf,0x88,0xdd,0x63,0x89,0x47,0x06,0x65 }; +__fips_constseg static const unsigned char aes_192_use_df_additionalinput2[] = { 0x3c,0x11,0x64,0x7a,0x96,0xf5,0xd8,0xb8,0xae,0xd6,0x70,0x4e, @@ -272,6 +307,7 @@ static const unsigned char aes_192_use_df_additionalinput2[] = 0x56,0xef,0xa3,0xf1,0x6b,0xa1,0xb1,0x77 }; +__fips_constseg static const unsigned char aes_192_use_df_returnedbits[] = { 0x0b,0xe2,0x56,0x03,0x1e,0xdb,0x2c,0x6d,0x7f,0x1b,0x15,0x58, @@ -280,6 +316,7 @@ static const unsigned char aes_192_use_df_returnedbits[] = /* AES-256 use df PR */ +__fips_constseg static const unsigned char aes_256_use_df_pr_entropyinput[] = { 0x61,0x68,0xfc,0x1a,0xf0,0xb5,0x95,0x6b,0x85,0x09,0x9b,0x74, @@ -287,12 +324,14 @@ static const unsigned char aes_256_use_df_pr_entropyinput[] = 0x96,0xab,0x2c,0xe4,0xc8,0x8f,0xdd,0x6a }; +__fips_constseg static const unsigned char aes_256_use_df_pr_nonce[] = { 0xad,0xd2,0xbb,0xba,0xb7,0x65,0x89,0xc3,0x21,0x6c,0x55,0x33, 0x2b,0x36,0xff,0xa4 }; +__fips_constseg static const unsigned char aes_256_use_df_pr_personalizationstring[] = { 0x6e,0xca,0xe7,0x20,0x72,0xd3,0x84,0x5a,0x32,0xd3,0x4b,0x24, @@ -300,6 +339,7 @@ static const unsigned char aes_256_use_df_pr_personalizationstring[] = 0x16,0x37,0x0b,0xd1,0x06,0x4f,0x68,0x6d }; +__fips_constseg static const unsigned char aes_256_use_df_pr_additionalinput[] = { 0x7e,0x08,0x4a,0xbb,0xe3,0x21,0x7c,0xc9,0x23,0xd2,0xf8,0xb0, @@ -307,6 +347,7 @@ static const unsigned char aes_256_use_df_pr_additionalinput[] = 0x7b,0xce,0x9b,0xd2,0x4a,0x76,0xb8,0xde }; +__fips_constseg static const unsigned char aes_256_use_df_pr_entropyinputpr[] = { 0x0b,0x23,0xaf,0xdf,0xf1,0x62,0xd7,0xd3,0x43,0x97,0xf8,0x77, @@ -314,12 +355,14 @@ static const unsigned char aes_256_use_df_pr_entropyinputpr[] = 0xbb,0x56,0x17,0x86,0x68,0x0e,0xba,0xa9 }; +__fips_constseg static const unsigned char aes_256_use_df_pr_int_returnedbits[] = { 0x31,0x8e,0xad,0xaf,0x40,0xeb,0x6b,0x74,0x31,0x46,0x80,0xc7, 0x17,0xab,0x3c,0x7a }; +__fips_constseg static const unsigned char aes_256_use_df_pr_additionalinput2[] = { 0x94,0x6b,0xc9,0x9f,0xab,0x8d,0xc5,0xec,0x71,0x88,0x1d,0x00, @@ -327,6 +370,7 @@ static const unsigned char aes_256_use_df_pr_additionalinput2[] = 0xc7,0x06,0x4e,0x99,0x04,0x28,0x29,0xc3 }; +__fips_constseg static const unsigned char aes_256_use_df_pr_entropyinputpr2[] = { 0xbf,0x6c,0x59,0x2a,0x0d,0x44,0x0f,0xae,0x9a,0x5e,0x03,0x73, @@ -334,6 +378,7 @@ static const unsigned char aes_256_use_df_pr_entropyinputpr2[] = 0xa4,0xdf,0x56,0xf4,0x06,0x07,0x9c,0x0f }; +__fips_constseg static const unsigned char aes_256_use_df_pr_returnedbits[] = { 0x22,0x4a,0xb4,0xb8,0xb6,0xee,0x7d,0xb1,0x9e,0xc9,0xf9,0xa0, @@ -342,6 +387,7 @@ static const unsigned char aes_256_use_df_pr_returnedbits[] = /* AES-256 use df No PR */ +__fips_constseg static const unsigned char aes_256_use_df_entropyinput[] = { 0xa5,0x3e,0x37,0x10,0x17,0x43,0x91,0x93,0x59,0x1e,0x47,0x50, @@ -349,12 +395,14 @@ static const unsigned char aes_256_use_df_entropyinput[] = 0xe0,0x02,0xd8,0x0f,0xdc,0x40,0x1a,0x47 }; +__fips_constseg static const unsigned char aes_256_use_df_nonce[] = { 0xa9,0x4d,0xa5,0x5a,0xfd,0xc5,0x0c,0xe5,0x1c,0x9a,0x3b,0x8a, 0x4c,0x44,0x84,0x40 }; +__fips_constseg static const unsigned char aes_256_use_df_personalizationstring[] = { 0x8b,0x52,0xa2,0x4a,0x93,0xc3,0x4e,0xa7,0x1e,0x1c,0xa7,0x05, @@ -362,6 +410,7 @@ static const unsigned char aes_256_use_df_personalizationstring[] = 0x37,0x84,0x5f,0xf1,0xc7,0xd5,0xf6,0xd2 }; +__fips_constseg static const unsigned char aes_256_use_df_additionalinput[] = { 0x20,0xf4,0x22,0xed,0xf8,0x5c,0xa1,0x6a,0x01,0xcf,0xbe,0x5f, @@ -369,12 +418,14 @@ static const unsigned char aes_256_use_df_additionalinput[] = 0xc7,0xb3,0x65,0x81,0x80,0x8d,0x0d,0x46 }; +__fips_constseg static const unsigned char aes_256_use_df_int_returnedbits[] = { 0x4e,0x44,0xfd,0xf3,0x9e,0x29,0xa2,0xb8,0x0f,0x5d,0x6c,0xe1, 0x28,0x0c,0x3b,0xc1 }; +__fips_constseg static const unsigned char aes_256_use_df_entropyinputreseed[] = { 0xdd,0x40,0xe5,0x98,0x7b,0x27,0x16,0x73,0x15,0x68,0xd2,0x76, @@ -382,6 +433,7 @@ static const unsigned char aes_256_use_df_entropyinputreseed[] = 0x42,0xdd,0xd4,0x67,0xc8,0x79,0xc8,0x1e }; +__fips_constseg static const unsigned char aes_256_use_df_additionalinputreseed[] = { 0x7f,0xd8,0x1f,0xbd,0x2a,0xb5,0x1c,0x11,0x5d,0x83,0x4e,0x99, @@ -389,6 +441,7 @@ static const unsigned char aes_256_use_df_additionalinputreseed[] = 0x93,0xfe,0x12,0x5e,0x5d,0x73,0xfb,0x75 }; +__fips_constseg static const unsigned char aes_256_use_df_additionalinput2[] = { 0xcd,0x2c,0xff,0x14,0x69,0x3e,0x4c,0x9e,0xfd,0xfe,0x26,0x0d, @@ -396,6 +449,7 @@ static const unsigned char aes_256_use_df_additionalinput2[] = 0x62,0x39,0x2c,0x3b,0x74,0xeb,0xc9,0x0d }; +__fips_constseg static const unsigned char aes_256_use_df_returnedbits[] = { 0x4f,0x78,0xbe,0xb9,0x4d,0x97,0x8c,0xe9,0xd0,0x97,0xfe,0xad, @@ -404,6 +458,7 @@ static const unsigned char aes_256_use_df_returnedbits[] = /* AES-128 no df PR */ +__fips_constseg static const unsigned char aes_128_no_df_pr_entropyinput[] = { 0x9a,0x25,0x65,0x10,0x67,0xd5,0xb6,0x6b,0x70,0xa1,0xb3,0xa4, @@ -411,11 +466,13 @@ static const unsigned char aes_128_no_df_pr_entropyinput[] = 0x31,0x6c,0x33,0x38,0x0b,0x00,0xb2,0x5a }; +__fips_constseg static const unsigned char aes_128_no_df_pr_nonce[] = { 0x78,0x47,0x6b,0xf7,0x90,0x8e,0x87,0xf1 }; +__fips_constseg static const unsigned char aes_128_no_df_pr_personalizationstring[] = { 0xf7,0x22,0x1d,0x3a,0xbe,0x1d,0xca,0x32,0x1b,0xbd,0x87,0x0c, @@ -423,6 +480,7 @@ static const unsigned char aes_128_no_df_pr_personalizationstring[] = 0x1c,0xfa,0x42,0x89,0xcc,0x6f,0xa0,0xa8 }; +__fips_constseg static const unsigned char aes_128_no_df_pr_additionalinput[] = { 0xc9,0xe0,0x80,0xbf,0x8c,0x45,0x58,0x39,0xff,0x00,0xab,0x02, @@ -430,6 +488,7 @@ static const unsigned char aes_128_no_df_pr_additionalinput[] = 0xb1,0xd9,0xcf,0x28,0xf6,0x8f,0x9b,0x12 }; +__fips_constseg static const unsigned char aes_128_no_df_pr_entropyinputpr[] = { 0x4c,0xa8,0xc5,0xf0,0x59,0x9e,0xa6,0x8d,0x26,0x53,0xd7,0x8a, @@ -437,12 +496,14 @@ static const unsigned char aes_128_no_df_pr_entropyinputpr[] = 0xe7,0x1d,0x74,0x99,0x00,0x9d,0x31,0x3e }; +__fips_constseg static const unsigned char aes_128_no_df_pr_int_returnedbits[] = { 0xe2,0xac,0x20,0xf0,0x80,0xe7,0xbc,0x7e,0x9c,0x7b,0x65,0x71, 0xaf,0x19,0x32,0x16 }; +__fips_constseg static const unsigned char aes_128_no_df_pr_additionalinput2[] = { 0x32,0x7f,0x38,0x8b,0x73,0x0a,0x78,0x83,0xdc,0x30,0xbe,0x9f, @@ -450,6 +511,7 @@ static const unsigned char aes_128_no_df_pr_additionalinput2[] = 0x51,0x54,0x7d,0x38,0x23,0x3a,0x52,0x50 }; +__fips_constseg static const unsigned char aes_128_no_df_pr_entropyinputpr2[] = { 0x18,0x61,0x53,0x56,0xed,0xed,0xd7,0x20,0xfb,0x71,0x04,0x7a, @@ -457,6 +519,7 @@ static const unsigned char aes_128_no_df_pr_entropyinputpr2[] = 0xe9,0x46,0x95,0x02,0x48,0x01,0x78,0xf9 }; +__fips_constseg static const unsigned char aes_128_no_df_pr_returnedbits[] = { 0x29,0xc8,0x1b,0x15,0xb1,0xd1,0xc2,0xf6,0x71,0x86,0x68,0x33, @@ -465,6 +528,7 @@ static const unsigned char aes_128_no_df_pr_returnedbits[] = /* AES-128 no df No PR */ +__fips_const |