Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stream functions in separate files #453

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion helper.pl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ sub check_source {
$file !~ m|src/ciphers/.*\.c$| &&
$file !~ m|src/hashes/.*\.c$| &&
$file !~ m|src/math/.+_desc.c$| &&
$file !~ m|src/stream/sober128/sober128_stream.c$| &&
$l =~ /^static(\s+[a-zA-Z0-9_]+)+\s+([^_][a-zA-Z0-9_]+)\s*\(/) {
push @{$troubles->{staticfunc_name}}, "$lineno($2)";
}
Expand Down
84 changes: 80 additions & 4 deletions libtomcrypt_VS2008.vcproj
Original file line number Diff line number Diff line change
Expand Up @@ -2647,25 +2647,61 @@
Name="rabbit"
>
<File
RelativePath="src\stream\rabbit\rabbit.c"
RelativePath="src\stream\rabbit\rabbit_common.h"
>
</File>
<File
RelativePath="src\stream\rabbit\rabbit_crypt.c"
>
</File>
<File
RelativePath="src\stream\rabbit\rabbit_done.c"
>
</File>
<File
RelativePath="src\stream\rabbit\rabbit_keystream.c"
>
</File>
<File
RelativePath="src\stream\rabbit\rabbit_memory.c"
>
</File>
<File
RelativePath="src\stream\rabbit\rabbit_setiv.c"
>
</File>
<File
RelativePath="src\stream\rabbit\rabbit_setup.c"
>
</File>
<File
RelativePath="src\stream\rabbit\rabbit_test.c"
>
</File>
</Filter>
<Filter
Name="rc4"
>
<File
RelativePath="src\stream\rc4\rc4_stream.c"
RelativePath="src\stream\rc4\rc4_stream_crypt.c"
>
</File>
<File
RelativePath="src\stream\rc4\rc4_stream_done.c"
>
</File>
<File
RelativePath="src\stream\rc4\rc4_stream_keystream.c"
>
</File>
<File
RelativePath="src\stream\rc4\rc4_stream_memory.c"
>
</File>
<File
RelativePath="src\stream\rc4\rc4_stream_setup.c"
>
</File>
<File
RelativePath="src\stream\rc4\rc4_test.c"
>
Expand Down Expand Up @@ -2719,13 +2755,33 @@
Name="sober128"
>
<File
RelativePath="src\stream\sober128\sober128_stream.c"
RelativePath="src\stream\sober128\sober128_stream_common.h"
>
</File>
<File
RelativePath="src\stream\sober128\sober128_stream_crypt.c"
>
</File>
<File
RelativePath="src\stream\sober128\sober128_stream_done.c"
>
</File>
<File
RelativePath="src\stream\sober128\sober128_stream_keystream.c"
>
</File>
<File
RelativePath="src\stream\sober128\sober128_stream_memory.c"
>
</File>
<File
RelativePath="src\stream\sober128\sober128_stream_setiv.c"
>
</File>
<File
RelativePath="src\stream\sober128\sober128_stream_setup.c"
>
</File>
<File
RelativePath="src\stream\sober128\sober128_test.c"
>
Expand Down Expand Up @@ -2779,13 +2835,33 @@
Name="sosemanuk"
>
<File
RelativePath="src\stream\sosemanuk\sosemanuk.c"
RelativePath="src\stream\sosemanuk\sosemanuk_common.h"
>
</File>
<File
RelativePath="src\stream\sosemanuk\sosemanuk_crypt.c"
>
</File>
<File
RelativePath="src\stream\sosemanuk\sosemanuk_done.c"
>
</File>
<File
RelativePath="src\stream\sosemanuk\sosemanuk_keystream.c"
>
</File>
<File
RelativePath="src\stream\sosemanuk\sosemanuk_memory.c"
>
</File>
<File
RelativePath="src\stream\sosemanuk\sosemanuk_setiv.c"
>
</File>
<File
RelativePath="src\stream\sosemanuk\sosemanuk_setup.c"
>
</File>
<File
RelativePath="src\stream\sosemanuk\sosemanuk_test.c"
>
Expand Down
31 changes: 20 additions & 11 deletions makefile.mingw
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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

Expand Down
31 changes: 20 additions & 11 deletions makefile.msvc
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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

Expand Down
31 changes: 20 additions & 11 deletions makefile.unix
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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

Expand Down
31 changes: 20 additions & 11 deletions makefile_include.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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

Expand Down
Loading