summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/seed/seed.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/seed/seed.c')
-rw-r--r--src/lib/libcrypto/seed/seed.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/libcrypto/seed/seed.c b/src/lib/libcrypto/seed/seed.c
index 2bc384a19f..3e675a8d75 100644
--- a/src/lib/libcrypto/seed/seed.c
+++ b/src/lib/libcrypto/seed/seed.c
@@ -32,9 +32,14 @@
32#include <memory.h> 32#include <memory.h>
33#endif 33#endif
34 34
35#include <openssl/crypto.h>
35#include <openssl/seed.h> 36#include <openssl/seed.h>
36#include "seed_locl.h" 37#include "seed_locl.h"
37 38
39#ifdef SS /* can get defined on Solaris by inclusion of <stdlib.h> */
40#undef SS
41#endif
42
38static const seed_word SS[4][256] = { { 43static const seed_word SS[4][256] = { {
39 0x2989a1a8, 0x05858184, 0x16c6d2d4, 0x13c3d3d0, 0x14445054, 0x1d0d111c, 0x2c8ca0ac, 0x25052124, 44 0x2989a1a8, 0x05858184, 0x16c6d2d4, 0x13c3d3d0, 0x14445054, 0x1d0d111c, 0x2c8ca0ac, 0x25052124,
40 0x1d4d515c, 0x03434340, 0x18081018, 0x1e0e121c, 0x11415150, 0x3cccf0fc, 0x0acac2c8, 0x23436360, 45 0x1d4d515c, 0x03434340, 0x18081018, 0x1e0e121c, 0x11415150, 0x3cccf0fc, 0x0acac2c8, 0x23436360,
@@ -192,8 +197,14 @@ static const seed_word KC[] = {
192 KC0, KC1, KC2, KC3, KC4, KC5, KC6, KC7, 197 KC0, KC1, KC2, KC3, KC4, KC5, KC6, KC7,
193 KC8, KC9, KC10, KC11, KC12, KC13, KC14, KC15 }; 198 KC8, KC9, KC10, KC11, KC12, KC13, KC14, KC15 };
194#endif 199#endif
195
196void SEED_set_key(const unsigned char rawkey[SEED_KEY_LENGTH], SEED_KEY_SCHEDULE *ks) 200void SEED_set_key(const unsigned char rawkey[SEED_KEY_LENGTH], SEED_KEY_SCHEDULE *ks)
201#ifdef OPENSSL_FIPS
202 {
203 fips_cipher_abort(SEED);
204 private_SEED_set_key(rawkey, ks);
205 }
206void private_SEED_set_key(const unsigned char rawkey[SEED_KEY_LENGTH], SEED_KEY_SCHEDULE *ks)
207#endif
197{ 208{
198 seed_word x1, x2, x3, x4; 209 seed_word x1, x2, x3, x4;
199 seed_word t0, t1; 210 seed_word t0, t1;