Commit 0f3ab9a3 authored by Andy Polyakov's avatar Andy Polyakov
Browse files

crypto/seed: add small-footprint path.



The space saving is >5x on x86_64 at ~40% performance penalty.

Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
parent fdf6f73e
Loading
Loading
Loading
Loading
+360 −481

File changed.

Preview size limit exceeded, changes collapsed.

+0 −4
Original line number Diff line number Diff line
@@ -40,10 +40,6 @@ typedef unsigned int seed_word;
extern "C" {
#endif

# 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)  \
        (i) = ((((seed_word)(c)[0]) << 24) | (((seed_word)(c)[1]) << 16) | (((seed_word)(c)[2]) << 8) | ((seed_word)(c)[3]))