diff --git a/libtomcrypt_VS2008.vcproj b/libtomcrypt_VS2008.vcproj
index 8bc1c62c9..190cef2b1 100644
--- a/libtomcrypt_VS2008.vcproj
+++ b/libtomcrypt_VS2008.vcproj
@@ -2647,25 +2647,61 @@
Name="rabbit"
>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -2719,13 +2755,33 @@
Name="sober128"
>
+
+
+
+
+
+
+
+
+
+
@@ -2779,13 +2835,33 @@
Name="sosemanuk"
>
+
+
+
+
+
+
+
+
+
+
diff --git a/makefile.mingw b/makefile.mingw
index 9d0a70f9d..ceb0bd503 100644
--- a/makefile.mingw
+++ b/makefile.mingw
@@ -203,16 +203,24 @@ src/prngs/rc4.o src/prngs/rng_get_bytes.o src/prngs/rng_make_prng.o src/prngs/so
src/prngs/sprng.o src/prngs/yarrow.o src/stream/chacha/chacha_crypt.o src/stream/chacha/chacha_done.o \
src/stream/chacha/chacha_ivctr32.o src/stream/chacha/chacha_ivctr64.o \
src/stream/chacha/chacha_keystream.o src/stream/chacha/chacha_memory.o \
-src/stream/chacha/chacha_setup.o src/stream/chacha/chacha_test.o src/stream/rabbit/rabbit.o \
-src/stream/rabbit/rabbit_memory.o src/stream/rc4/rc4_stream.o src/stream/rc4/rc4_stream_memory.o \
-src/stream/rc4/rc4_test.o src/stream/salsa20/salsa20_crypt.o src/stream/salsa20/salsa20_done.o \
-src/stream/salsa20/salsa20_ivctr64.o src/stream/salsa20/salsa20_keystream.o \
-src/stream/salsa20/salsa20_memory.o src/stream/salsa20/salsa20_setup.o \
-src/stream/salsa20/salsa20_test.o src/stream/salsa20/xsalsa20_memory.o \
-src/stream/salsa20/xsalsa20_setup.o src/stream/salsa20/xsalsa20_test.o \
-src/stream/sober128/sober128_stream.o src/stream/sober128/sober128_stream_memory.o \
-src/stream/sober128/sober128_test.o src/stream/sosemanuk/sosemanuk.o \
-src/stream/sosemanuk/sosemanuk_memory.o src/stream/sosemanuk/sosemanuk_test.o
+src/stream/chacha/chacha_setup.o src/stream/chacha/chacha_test.o src/stream/rabbit/rabbit_crypt.o \
+src/stream/rabbit/rabbit_done.o src/stream/rabbit/rabbit_keystream.o src/stream/rabbit/rabbit_memory.o \
+src/stream/rabbit/rabbit_setiv.o src/stream/rabbit/rabbit_setup.o src/stream/rabbit/rabbit_test.o \
+src/stream/rc4/rc4_stream_crypt.o src/stream/rc4/rc4_stream_done.o \
+src/stream/rc4/rc4_stream_keystream.o src/stream/rc4/rc4_stream_memory.o \
+src/stream/rc4/rc4_stream_setup.o src/stream/rc4/rc4_test.o src/stream/salsa20/salsa20_crypt.o \
+src/stream/salsa20/salsa20_done.o src/stream/salsa20/salsa20_ivctr64.o \
+src/stream/salsa20/salsa20_keystream.o src/stream/salsa20/salsa20_memory.o \
+src/stream/salsa20/salsa20_setup.o src/stream/salsa20/salsa20_test.o \
+src/stream/salsa20/xsalsa20_memory.o src/stream/salsa20/xsalsa20_setup.o \
+src/stream/salsa20/xsalsa20_test.o src/stream/sober128/sober128_stream_crypt.o \
+src/stream/sober128/sober128_stream_done.o src/stream/sober128/sober128_stream_keystream.o \
+src/stream/sober128/sober128_stream_memory.o src/stream/sober128/sober128_stream_setiv.o \
+src/stream/sober128/sober128_stream_setup.o src/stream/sober128/sober128_test.o \
+src/stream/sosemanuk/sosemanuk_crypt.o src/stream/sosemanuk/sosemanuk_done.o \
+src/stream/sosemanuk/sosemanuk_keystream.o src/stream/sosemanuk/sosemanuk_memory.o \
+src/stream/sosemanuk/sosemanuk_setiv.o src/stream/sosemanuk/sosemanuk_setup.o \
+src/stream/sosemanuk/sosemanuk_test.o
#List of test objects to compile
TOBJECTS=tests/base16_test.o tests/base32_test.o tests/base64_test.o tests/cipher_hash_test.o \
@@ -227,7 +235,8 @@ HEADERS_PUB=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tom
src/headers/tomcrypt_cipher.h src/headers/tomcrypt_custom.h src/headers/tomcrypt_hash.h \
src/headers/tomcrypt_mac.h src/headers/tomcrypt_macros.h src/headers/tomcrypt_math.h \
src/headers/tomcrypt_misc.h src/headers/tomcrypt_pk.h src/headers/tomcrypt_pkcs.h \
-src/headers/tomcrypt_prng.h
+src/headers/tomcrypt_prng.h src/stream/rabbit/rabbit_common.h \
+src/stream/sober128/sober128_stream_common.h src/stream/sosemanuk/sosemanuk_common.h
HEADERS=$(HEADERS_PUB) src/headers/tomcrypt_private.h
diff --git a/makefile.msvc b/makefile.msvc
index 6b2c10061..816de1001 100644
--- a/makefile.msvc
+++ b/makefile.msvc
@@ -196,16 +196,24 @@ src/prngs/rc4.obj src/prngs/rng_get_bytes.obj src/prngs/rng_make_prng.obj src/pr
src/prngs/sprng.obj src/prngs/yarrow.obj src/stream/chacha/chacha_crypt.obj src/stream/chacha/chacha_done.obj \
src/stream/chacha/chacha_ivctr32.obj src/stream/chacha/chacha_ivctr64.obj \
src/stream/chacha/chacha_keystream.obj src/stream/chacha/chacha_memory.obj \
-src/stream/chacha/chacha_setup.obj src/stream/chacha/chacha_test.obj src/stream/rabbit/rabbit.obj \
-src/stream/rabbit/rabbit_memory.obj src/stream/rc4/rc4_stream.obj src/stream/rc4/rc4_stream_memory.obj \
-src/stream/rc4/rc4_test.obj src/stream/salsa20/salsa20_crypt.obj src/stream/salsa20/salsa20_done.obj \
-src/stream/salsa20/salsa20_ivctr64.obj src/stream/salsa20/salsa20_keystream.obj \
-src/stream/salsa20/salsa20_memory.obj src/stream/salsa20/salsa20_setup.obj \
-src/stream/salsa20/salsa20_test.obj src/stream/salsa20/xsalsa20_memory.obj \
-src/stream/salsa20/xsalsa20_setup.obj src/stream/salsa20/xsalsa20_test.obj \
-src/stream/sober128/sober128_stream.obj src/stream/sober128/sober128_stream_memory.obj \
-src/stream/sober128/sober128_test.obj src/stream/sosemanuk/sosemanuk.obj \
-src/stream/sosemanuk/sosemanuk_memory.obj src/stream/sosemanuk/sosemanuk_test.obj
+src/stream/chacha/chacha_setup.obj src/stream/chacha/chacha_test.obj src/stream/rabbit/rabbit_crypt.obj \
+src/stream/rabbit/rabbit_done.obj src/stream/rabbit/rabbit_keystream.obj src/stream/rabbit/rabbit_memory.obj \
+src/stream/rabbit/rabbit_setiv.obj src/stream/rabbit/rabbit_setup.obj src/stream/rabbit/rabbit_test.obj \
+src/stream/rc4/rc4_stream_crypt.obj src/stream/rc4/rc4_stream_done.obj \
+src/stream/rc4/rc4_stream_keystream.obj src/stream/rc4/rc4_stream_memory.obj \
+src/stream/rc4/rc4_stream_setup.obj src/stream/rc4/rc4_test.obj src/stream/salsa20/salsa20_crypt.obj \
+src/stream/salsa20/salsa20_done.obj src/stream/salsa20/salsa20_ivctr64.obj \
+src/stream/salsa20/salsa20_keystream.obj src/stream/salsa20/salsa20_memory.obj \
+src/stream/salsa20/salsa20_setup.obj src/stream/salsa20/salsa20_test.obj \
+src/stream/salsa20/xsalsa20_memory.obj src/stream/salsa20/xsalsa20_setup.obj \
+src/stream/salsa20/xsalsa20_test.obj src/stream/sober128/sober128_stream_crypt.obj \
+src/stream/sober128/sober128_stream_done.obj src/stream/sober128/sober128_stream_keystream.obj \
+src/stream/sober128/sober128_stream_memory.obj src/stream/sober128/sober128_stream_setiv.obj \
+src/stream/sober128/sober128_stream_setup.obj src/stream/sober128/sober128_test.obj \
+src/stream/sosemanuk/sosemanuk_crypt.obj src/stream/sosemanuk/sosemanuk_done.obj \
+src/stream/sosemanuk/sosemanuk_keystream.obj src/stream/sosemanuk/sosemanuk_memory.obj \
+src/stream/sosemanuk/sosemanuk_setiv.obj src/stream/sosemanuk/sosemanuk_setup.obj \
+src/stream/sosemanuk/sosemanuk_test.obj
#List of test objects to compile
TOBJECTS=tests/base16_test.obj tests/base32_test.obj tests/base64_test.obj tests/cipher_hash_test.obj \
@@ -220,7 +228,8 @@ HEADERS_PUB=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tom
src/headers/tomcrypt_cipher.h src/headers/tomcrypt_custom.h src/headers/tomcrypt_hash.h \
src/headers/tomcrypt_mac.h src/headers/tomcrypt_macros.h src/headers/tomcrypt_math.h \
src/headers/tomcrypt_misc.h src/headers/tomcrypt_pk.h src/headers/tomcrypt_pkcs.h \
-src/headers/tomcrypt_prng.h
+src/headers/tomcrypt_prng.h src/stream/rabbit/rabbit_common.h \
+src/stream/sober128/sober128_stream_common.h src/stream/sosemanuk/sosemanuk_common.h
HEADERS=$(HEADERS_PUB) src/headers/tomcrypt_private.h
diff --git a/makefile.unix b/makefile.unix
index 20f9a0d9b..2d3b063bb 100644
--- a/makefile.unix
+++ b/makefile.unix
@@ -213,16 +213,24 @@ src/prngs/rc4.o src/prngs/rng_get_bytes.o src/prngs/rng_make_prng.o src/prngs/so
src/prngs/sprng.o src/prngs/yarrow.o src/stream/chacha/chacha_crypt.o src/stream/chacha/chacha_done.o \
src/stream/chacha/chacha_ivctr32.o src/stream/chacha/chacha_ivctr64.o \
src/stream/chacha/chacha_keystream.o src/stream/chacha/chacha_memory.o \
-src/stream/chacha/chacha_setup.o src/stream/chacha/chacha_test.o src/stream/rabbit/rabbit.o \
-src/stream/rabbit/rabbit_memory.o src/stream/rc4/rc4_stream.o src/stream/rc4/rc4_stream_memory.o \
-src/stream/rc4/rc4_test.o src/stream/salsa20/salsa20_crypt.o src/stream/salsa20/salsa20_done.o \
-src/stream/salsa20/salsa20_ivctr64.o src/stream/salsa20/salsa20_keystream.o \
-src/stream/salsa20/salsa20_memory.o src/stream/salsa20/salsa20_setup.o \
-src/stream/salsa20/salsa20_test.o src/stream/salsa20/xsalsa20_memory.o \
-src/stream/salsa20/xsalsa20_setup.o src/stream/salsa20/xsalsa20_test.o \
-src/stream/sober128/sober128_stream.o src/stream/sober128/sober128_stream_memory.o \
-src/stream/sober128/sober128_test.o src/stream/sosemanuk/sosemanuk.o \
-src/stream/sosemanuk/sosemanuk_memory.o src/stream/sosemanuk/sosemanuk_test.o
+src/stream/chacha/chacha_setup.o src/stream/chacha/chacha_test.o src/stream/rabbit/rabbit_crypt.o \
+src/stream/rabbit/rabbit_done.o src/stream/rabbit/rabbit_keystream.o src/stream/rabbit/rabbit_memory.o \
+src/stream/rabbit/rabbit_setiv.o src/stream/rabbit/rabbit_setup.o src/stream/rabbit/rabbit_test.o \
+src/stream/rc4/rc4_stream_crypt.o src/stream/rc4/rc4_stream_done.o \
+src/stream/rc4/rc4_stream_keystream.o src/stream/rc4/rc4_stream_memory.o \
+src/stream/rc4/rc4_stream_setup.o src/stream/rc4/rc4_test.o src/stream/salsa20/salsa20_crypt.o \
+src/stream/salsa20/salsa20_done.o src/stream/salsa20/salsa20_ivctr64.o \
+src/stream/salsa20/salsa20_keystream.o src/stream/salsa20/salsa20_memory.o \
+src/stream/salsa20/salsa20_setup.o src/stream/salsa20/salsa20_test.o \
+src/stream/salsa20/xsalsa20_memory.o src/stream/salsa20/xsalsa20_setup.o \
+src/stream/salsa20/xsalsa20_test.o src/stream/sober128/sober128_stream_crypt.o \
+src/stream/sober128/sober128_stream_done.o src/stream/sober128/sober128_stream_keystream.o \
+src/stream/sober128/sober128_stream_memory.o src/stream/sober128/sober128_stream_setiv.o \
+src/stream/sober128/sober128_stream_setup.o src/stream/sober128/sober128_test.o \
+src/stream/sosemanuk/sosemanuk_crypt.o src/stream/sosemanuk/sosemanuk_done.o \
+src/stream/sosemanuk/sosemanuk_keystream.o src/stream/sosemanuk/sosemanuk_memory.o \
+src/stream/sosemanuk/sosemanuk_setiv.o src/stream/sosemanuk/sosemanuk_setup.o \
+src/stream/sosemanuk/sosemanuk_test.o
#List of test objects to compile (all goes to libtomcrypt_prof.a)
TOBJECTS=tests/base16_test.o tests/base32_test.o tests/base64_test.o tests/cipher_hash_test.o \
@@ -237,7 +245,8 @@ HEADERS_PUB=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tom
src/headers/tomcrypt_cipher.h src/headers/tomcrypt_custom.h src/headers/tomcrypt_hash.h \
src/headers/tomcrypt_mac.h src/headers/tomcrypt_macros.h src/headers/tomcrypt_math.h \
src/headers/tomcrypt_misc.h src/headers/tomcrypt_pk.h src/headers/tomcrypt_pkcs.h \
-src/headers/tomcrypt_prng.h
+src/headers/tomcrypt_prng.h src/stream/rabbit/rabbit_common.h \
+src/stream/sober128/sober128_stream_common.h src/stream/sosemanuk/sosemanuk_common.h
HEADERS=$(HEADERS_PUB) src/headers/tomcrypt_private.h
diff --git a/makefile_include.mk b/makefile_include.mk
index 4bcec2206..e48badaa1 100644
--- a/makefile_include.mk
+++ b/makefile_include.mk
@@ -373,16 +373,24 @@ src/prngs/rc4.o src/prngs/rng_get_bytes.o src/prngs/rng_make_prng.o src/prngs/so
src/prngs/sprng.o src/prngs/yarrow.o src/stream/chacha/chacha_crypt.o src/stream/chacha/chacha_done.o \
src/stream/chacha/chacha_ivctr32.o src/stream/chacha/chacha_ivctr64.o \
src/stream/chacha/chacha_keystream.o src/stream/chacha/chacha_memory.o \
-src/stream/chacha/chacha_setup.o src/stream/chacha/chacha_test.o src/stream/rabbit/rabbit.o \
-src/stream/rabbit/rabbit_memory.o src/stream/rc4/rc4_stream.o src/stream/rc4/rc4_stream_memory.o \
-src/stream/rc4/rc4_test.o src/stream/salsa20/salsa20_crypt.o src/stream/salsa20/salsa20_done.o \
-src/stream/salsa20/salsa20_ivctr64.o src/stream/salsa20/salsa20_keystream.o \
-src/stream/salsa20/salsa20_memory.o src/stream/salsa20/salsa20_setup.o \
-src/stream/salsa20/salsa20_test.o src/stream/salsa20/xsalsa20_memory.o \
-src/stream/salsa20/xsalsa20_setup.o src/stream/salsa20/xsalsa20_test.o \
-src/stream/sober128/sober128_stream.o src/stream/sober128/sober128_stream_memory.o \
-src/stream/sober128/sober128_test.o src/stream/sosemanuk/sosemanuk.o \
-src/stream/sosemanuk/sosemanuk_memory.o src/stream/sosemanuk/sosemanuk_test.o
+src/stream/chacha/chacha_setup.o src/stream/chacha/chacha_test.o src/stream/rabbit/rabbit_crypt.o \
+src/stream/rabbit/rabbit_done.o src/stream/rabbit/rabbit_keystream.o src/stream/rabbit/rabbit_memory.o \
+src/stream/rabbit/rabbit_setiv.o src/stream/rabbit/rabbit_setup.o src/stream/rabbit/rabbit_test.o \
+src/stream/rc4/rc4_stream_crypt.o src/stream/rc4/rc4_stream_done.o \
+src/stream/rc4/rc4_stream_keystream.o src/stream/rc4/rc4_stream_memory.o \
+src/stream/rc4/rc4_stream_setup.o src/stream/rc4/rc4_test.o src/stream/salsa20/salsa20_crypt.o \
+src/stream/salsa20/salsa20_done.o src/stream/salsa20/salsa20_ivctr64.o \
+src/stream/salsa20/salsa20_keystream.o src/stream/salsa20/salsa20_memory.o \
+src/stream/salsa20/salsa20_setup.o src/stream/salsa20/salsa20_test.o \
+src/stream/salsa20/xsalsa20_memory.o src/stream/salsa20/xsalsa20_setup.o \
+src/stream/salsa20/xsalsa20_test.o src/stream/sober128/sober128_stream_crypt.o \
+src/stream/sober128/sober128_stream_done.o src/stream/sober128/sober128_stream_keystream.o \
+src/stream/sober128/sober128_stream_memory.o src/stream/sober128/sober128_stream_setiv.o \
+src/stream/sober128/sober128_stream_setup.o src/stream/sober128/sober128_test.o \
+src/stream/sosemanuk/sosemanuk_crypt.o src/stream/sosemanuk/sosemanuk_done.o \
+src/stream/sosemanuk/sosemanuk_keystream.o src/stream/sosemanuk/sosemanuk_memory.o \
+src/stream/sosemanuk/sosemanuk_setiv.o src/stream/sosemanuk/sosemanuk_setup.o \
+src/stream/sosemanuk/sosemanuk_test.o
# List of test objects to compile (all goes to libtomcrypt_prof.a)
TOBJECTS=tests/base16_test.o tests/base32_test.o tests/base64_test.o tests/cipher_hash_test.o \
@@ -397,7 +405,8 @@ HEADERS_PUB=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tom
src/headers/tomcrypt_cipher.h src/headers/tomcrypt_custom.h src/headers/tomcrypt_hash.h \
src/headers/tomcrypt_mac.h src/headers/tomcrypt_macros.h src/headers/tomcrypt_math.h \
src/headers/tomcrypt_misc.h src/headers/tomcrypt_pk.h src/headers/tomcrypt_pkcs.h \
-src/headers/tomcrypt_prng.h
+src/headers/tomcrypt_prng.h src/stream/rabbit/rabbit_common.h \
+src/stream/sober128/sober128_stream_common.h src/stream/sosemanuk/sosemanuk_common.h
HEADERS=$(HEADERS_PUB) src/headers/tomcrypt_private.h