diff options
author | marha <marha@users.sourceforge.net> | 2015-02-22 21:39:56 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2015-02-22 21:39:56 +0100 |
commit | 462f18c7b25fe3e467f837647d07ab0a78aa8d2b (patch) | |
tree | fc8013c0a1bac05a1945846c1697e973f4c35013 /openssl/crypto/seed/seed_locl.h | |
parent | 36f711ee12b6dd5184198abed3aa551efb585587 (diff) | |
download | vcxsrv-462f18c7b25fe3e467f837647d07ab0a78aa8d2b.tar.gz vcxsrv-462f18c7b25fe3e467f837647d07ab0a78aa8d2b.tar.bz2 vcxsrv-462f18c7b25fe3e467f837647d07ab0a78aa8d2b.zip |
Merged origin/release (checked in because wanted to merge new stuff)
Diffstat (limited to 'openssl/crypto/seed/seed_locl.h')
-rw-r--r-- | openssl/crypto/seed/seed_locl.h | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/openssl/crypto/seed/seed_locl.h b/openssl/crypto/seed/seed_locl.h index fd456b642..96ec43022 100644 --- a/openssl/crypto/seed/seed_locl.h +++ b/openssl/crypto/seed/seed_locl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007 KISA(Korea Information Security Agency). All rights reserved. + * Copyright (c) 2007 KISA(Korea Information Security Agency). All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -24,61 +24,60 @@ * */ #ifndef HEADER_SEED_LOCL_H -#define HEADER_SEED_LOCL_H +# define HEADER_SEED_LOCL_H -#include "openssl/e_os2.h" -#include <openssl/seed.h> +# include "openssl/e_os2.h" +# include <openssl/seed.h> - -#ifdef SEED_LONG /* need 32-bit type */ +# ifdef SEED_LONG /* need 32-bit type */ typedef unsigned long seed_word; -#else +# else typedef unsigned int seed_word; -#endif +# endif #ifdef __cplusplus extern "C" { #endif -#define G_FUNC(v) \ +# define G_FUNC(v) \ SS[0][(unsigned char) (v) & 0xff] ^ SS[1][(unsigned char) ((v)>>8) & 0xff] ^ \ SS[2][(unsigned char)((v)>>16) & 0xff] ^ SS[3][(unsigned char)((v)>>24) & 0xff] -#define char2word(c, i) \ +# define char2word(c, i) \ (i) = ((((seed_word)(c)[0]) << 24) | (((seed_word)(c)[1]) << 16) | (((seed_word)(c)[2]) << 8) | ((seed_word)(c)[3])) -#define word2char(l, c) \ +# define word2char(l, c) \ *((c)+0) = (unsigned char)((l)>>24) & 0xff; \ *((c)+1) = (unsigned char)((l)>>16) & 0xff; \ *((c)+2) = (unsigned char)((l)>> 8) & 0xff; \ *((c)+3) = (unsigned char)((l)) & 0xff -#define KEYSCHEDULE_UPDATE0(T0, T1, X1, X2, X3, X4, KC) \ +# define KEYSCHEDULE_UPDATE0(T0, T1, X1, X2, X3, X4, KC) \ (T0) = (X3); \ (X3) = (((X3)<<8) ^ ((X4)>>24)) & 0xffffffff; \ (X4) = (((X4)<<8) ^ ((T0)>>24)) & 0xffffffff; \ (T0) = ((X1) + (X3) - (KC)) & 0xffffffff; \ (T1) = ((X2) + (KC) - (X4)) & 0xffffffff -#define KEYSCHEDULE_UPDATE1(T0, T1, X1, X2, X3, X4, KC) \ +# define KEYSCHEDULE_UPDATE1(T0, T1, X1, X2, X3, X4, KC) \ (T0) = (X1); \ (X1) = (((X1)>>8) ^ ((X2)<<24)) & 0xffffffff; \ (X2) = (((X2)>>8) ^ ((T0)<<24)) & 0xffffffff; \ (T0) = ((X1) + (X3) - (KC)) & 0xffffffff; \ (T1) = ((X2) + (KC) - (X4)) & 0xffffffff -#define KEYUPDATE_TEMP(T0, T1, K) \ +# define KEYUPDATE_TEMP(T0, T1, K) \ (K)[0] = G_FUNC((T0)); \ (K)[1] = G_FUNC((T1)) -#define XOR_SEEDBLOCK(DST, SRC) \ +# define XOR_SEEDBLOCK(DST, SRC) \ ((DST))[0] ^= ((SRC))[0]; \ ((DST))[1] ^= ((SRC))[1]; \ ((DST))[2] ^= ((SRC))[2]; \ ((DST))[3] ^= ((SRC))[3] -#define MOV_SEEDBLOCK(DST, SRC) \ +# define MOV_SEEDBLOCK(DST, SRC) \ ((DST))[0] = ((SRC))[0]; \ ((DST))[1] = ((SRC))[1]; \ ((DST))[2] = ((SRC))[2]; \ @@ -113,4 +112,4 @@ extern "C" { } #endif -#endif /* HEADER_SEED_LOCL_H */ +#endif /* HEADER_SEED_LOCL_H */ |