Skip to content
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
909 changes: 905 additions & 4 deletions doc/crypt.tex

Large diffs are not rendered by default.

84 changes: 84 additions & 0 deletions libtomcrypt_VS2008.vcproj
Original file line number Diff line number Diff line change
Expand Up @@ -1055,6 +1055,10 @@
RelativePath="src\headers\tomcrypt_pkcs.h"
>
</File>
<File
RelativePath="src\headers\tomcrypt_pqc.h"
>
</File>
<File
RelativePath="src\headers\tomcrypt_private.h"
>
Expand Down Expand Up @@ -1391,6 +1395,10 @@
RelativePath="src\misc\adler32.c"
>
</File>
<File
RelativePath="src\misc\algname_match.c"
>
</File>
<File
RelativePath="src\misc\burn_stack.c"
>
Expand Down Expand Up @@ -2920,6 +2928,82 @@
</File>
</Filter>
</Filter>
<Filter
Name="pqc"
>
<Filter
Name="mldsa"
>
<File
RelativePath="src\pqc\mldsa\mldsa.c"
>
</File>
<File
RelativePath="src\pqc\mldsa\mldsa_export.c"
>
</File>
<File
RelativePath="src\pqc\mldsa\mldsa_import.c"
>
</File>
<File
RelativePath="src\pqc\mldsa\mldsa_import_pkcs8.c"
>
</File>
<File
RelativePath="src\pqc\mldsa\mldsa_import_x509.c"
>
</File>
</Filter>
<Filter
Name="mlkem"
>
<File
RelativePath="src\pqc\mlkem\mlkem.c"
>
</File>
<File
RelativePath="src\pqc\mlkem\mlkem_export.c"
>
</File>
<File
RelativePath="src\pqc\mlkem\mlkem_import.c"
>
</File>
<File
RelativePath="src\pqc\mlkem\mlkem_import_pkcs8.c"
>
</File>
<File
RelativePath="src\pqc\mlkem\mlkem_import_x509.c"
>
</File>
</Filter>
<Filter
Name="slhdsa"
>
<File
RelativePath="src\pqc\slhdsa\slhdsa.c"
>
</File>
<File
RelativePath="src\pqc\slhdsa\slhdsa_export.c"
>
</File>
<File
RelativePath="src\pqc\slhdsa\slhdsa_import.c"
>
</File>
<File
RelativePath="src\pqc\slhdsa\slhdsa_import_pkcs8.c"
>
</File>
<File
RelativePath="src\pqc\slhdsa\slhdsa_import_x509.c"
>
</File>
</Filter>
</Filter>
<Filter
Name="prngs"
>
Expand Down
32 changes: 19 additions & 13 deletions makefile.mingw
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ src/mac/xcbc/xcbc_file.o src/mac/xcbc/xcbc_init.o src/mac/xcbc/xcbc_memory.o \
src/mac/xcbc/xcbc_memory_multi.o src/mac/xcbc/xcbc_process.o src/mac/xcbc/xcbc_test.o \
src/math/fp/ltc_ecc_fp_mulmod.o src/math/gmp_desc.o src/math/ltm_desc.o src/math/multi.o \
src/math/radix_to_bin.o src/math/rand_bn.o src/math/rand_prime.o src/math/tfm_desc.o src/misc/adler32.o \
src/misc/argon2/argon2.o src/misc/base16/base16_decode.o src/misc/base16/base16_encode.o \
src/misc/base32/base32_decode.o src/misc/base32/base32_encode.o src/misc/base64/base64_decode.o \
src/misc/base64/base64_encode.o src/misc/bcrypt/bcrypt.o src/misc/burn_stack.o \
src/misc/compare_testvector.o src/misc/copy_or_zeromem.o src/misc/crc32.o src/misc/crypt/crypt.o \
src/misc/crypt/crypt_argchk.o src/misc/crypt/crypt_cipher_descriptor.o \
src/misc/algname_match.o src/misc/argon2/argon2.o src/misc/base16/base16_decode.o \
src/misc/base16/base16_encode.o src/misc/base32/base32_decode.o src/misc/base32/base32_encode.o \
src/misc/base64/base64_decode.o src/misc/base64/base64_encode.o src/misc/bcrypt/bcrypt.o \
src/misc/burn_stack.o src/misc/compare_testvector.o src/misc/copy_or_zeromem.o src/misc/crc32.o \
src/misc/crypt/crypt.o src/misc/crypt/crypt_argchk.o src/misc/crypt/crypt_cipher_descriptor.o \
src/misc/crypt/crypt_cipher_is_valid.o src/misc/crypt/crypt_constants.o \
src/misc/crypt/crypt_find_cipher.o src/misc/crypt/crypt_find_cipher_any.o \
src/misc/crypt/crypt_find_cipher_id.o src/misc/crypt/crypt_find_hash.o \
Expand Down Expand Up @@ -225,10 +225,15 @@ src/pk/x25519/x25519_import.o src/pk/x25519/x25519_import_pkcs8.o src/pk/x25519/
src/pk/x25519/x25519_import_x509.o src/pk/x25519/x25519_make_key.o \
src/pk/x25519/x25519_shared_secret.o src/pk/x448/x448_export.o src/pk/x448/x448_import.o \
src/pk/x448/x448_import_pkcs8.o src/pk/x448/x448_import_raw.o src/pk/x448/x448_import_x509.o \
src/pk/x448/x448_make_key.o src/pk/x448/x448_shared_secret.o src/prngs/chacha20.o src/prngs/fortuna.o \
src/prngs/rc4.o src/prngs/rng_get_bytes.o src/prngs/rng_make_prng.o src/prngs/sober128.o \
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/pk/x448/x448_make_key.o src/pk/x448/x448_shared_secret.o src/pqc/mldsa/mldsa.o \
src/pqc/mldsa/mldsa_export.o src/pqc/mldsa/mldsa_import.o src/pqc/mldsa/mldsa_import_pkcs8.o \
src/pqc/mldsa/mldsa_import_x509.o src/pqc/mlkem/mlkem.o src/pqc/mlkem/mlkem_export.o \
src/pqc/mlkem/mlkem_import.o src/pqc/mlkem/mlkem_import_pkcs8.o src/pqc/mlkem/mlkem_import_x509.o \
src/pqc/slhdsa/slhdsa.o src/pqc/slhdsa/slhdsa_export.o src/pqc/slhdsa/slhdsa_import.o \
src/pqc/slhdsa/slhdsa_import_pkcs8.o src/pqc/slhdsa/slhdsa_import_x509.o src/prngs/chacha20.o \
src/prngs/fortuna.o src/prngs/rc4.o src/prngs/rng_get_bytes.o src/prngs/rng_make_prng.o \
src/prngs/sober128.o 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/chacha/xchacha20_memory.o \
src/stream/chacha/xchacha20_setup.o src/stream/chacha/xchacha20_test.o src/stream/rabbit/rabbit.o \
Expand All @@ -249,16 +254,17 @@ tests/dh_test.o tests/dsa_test.o tests/ecc_test.o tests/ed25519_test.o tests/ed4
tests/file_test.o tests/mac_test.o tests/misc_test.o tests/modes_test.o tests/mpi_test.o \
tests/multi_test.o tests/no_null_termination_check_test.o tests/no_prng.o tests/padding_test.o \
tests/pem_test.o tests/pk_oid_test.o tests/pkcs_1_eme_test.o tests/pkcs_1_emsa_test.o \
tests/pkcs_1_oaep_test.o tests/pkcs_1_pss_test.o tests/pkcs_1_test.o tests/prng_test.o \
tests/rotate_test.o tests/rsa_test.o tests/scrypt_test.o tests/siv_wycheproof_test.o tests/ssh_test.o \
tests/store_test.o tests/test.o tests/x25519_test.o tests/x448_test.o
tests/pkcs_1_oaep_test.o tests/pkcs_1_pss_test.o tests/pkcs_1_test.o tests/pqc_mldsa_test.o \
tests/pqc_mlkem_test.o tests/pqc_slhdsa_test.o tests/prng_test.o tests/rotate_test.o tests/rsa_test.o \
tests/scrypt_test.o tests/siv_wycheproof_test.o tests/ssh_test.o tests/store_test.o tests/test.o \
tests/x25519_test.o tests/x448_test.o

#The following headers will be installed by "make install"
HEADERS_PUB=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cfg.h \
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_pqc.h src/headers/tomcrypt_prng.h

HEADERS=$(HEADERS_PUB) src/headers/tomcrypt_private.h

Expand Down
32 changes: 19 additions & 13 deletions makefile.msvc
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ src/mac/xcbc/xcbc_file.obj src/mac/xcbc/xcbc_init.obj src/mac/xcbc/xcbc_memory.o
src/mac/xcbc/xcbc_memory_multi.obj src/mac/xcbc/xcbc_process.obj src/mac/xcbc/xcbc_test.obj \
src/math/fp/ltc_ecc_fp_mulmod.obj src/math/gmp_desc.obj src/math/ltm_desc.obj src/math/multi.obj \
src/math/radix_to_bin.obj src/math/rand_bn.obj src/math/rand_prime.obj src/math/tfm_desc.obj src/misc/adler32.obj \
src/misc/argon2/argon2.obj src/misc/base16/base16_decode.obj src/misc/base16/base16_encode.obj \
src/misc/base32/base32_decode.obj src/misc/base32/base32_encode.obj src/misc/base64/base64_decode.obj \
src/misc/base64/base64_encode.obj src/misc/bcrypt/bcrypt.obj src/misc/burn_stack.obj \
src/misc/compare_testvector.obj src/misc/copy_or_zeromem.obj src/misc/crc32.obj src/misc/crypt/crypt.obj \
src/misc/crypt/crypt_argchk.obj src/misc/crypt/crypt_cipher_descriptor.obj \
src/misc/algname_match.obj src/misc/argon2/argon2.obj src/misc/base16/base16_decode.obj \
src/misc/base16/base16_encode.obj src/misc/base32/base32_decode.obj src/misc/base32/base32_encode.obj \
src/misc/base64/base64_decode.obj src/misc/base64/base64_encode.obj src/misc/bcrypt/bcrypt.obj \
src/misc/burn_stack.obj src/misc/compare_testvector.obj src/misc/copy_or_zeromem.obj src/misc/crc32.obj \
src/misc/crypt/crypt.obj src/misc/crypt/crypt_argchk.obj src/misc/crypt/crypt_cipher_descriptor.obj \
src/misc/crypt/crypt_cipher_is_valid.obj src/misc/crypt/crypt_constants.obj \
src/misc/crypt/crypt_find_cipher.obj src/misc/crypt/crypt_find_cipher_any.obj \
src/misc/crypt/crypt_find_cipher_id.obj src/misc/crypt/crypt_find_hash.obj \
Expand Down Expand Up @@ -218,10 +218,15 @@ src/pk/x25519/x25519_import.obj src/pk/x25519/x25519_import_pkcs8.obj src/pk/x25
src/pk/x25519/x25519_import_x509.obj src/pk/x25519/x25519_make_key.obj \
src/pk/x25519/x25519_shared_secret.obj src/pk/x448/x448_export.obj src/pk/x448/x448_import.obj \
src/pk/x448/x448_import_pkcs8.obj src/pk/x448/x448_import_raw.obj src/pk/x448/x448_import_x509.obj \
src/pk/x448/x448_make_key.obj src/pk/x448/x448_shared_secret.obj src/prngs/chacha20.obj src/prngs/fortuna.obj \
src/prngs/rc4.obj src/prngs/rng_get_bytes.obj src/prngs/rng_make_prng.obj src/prngs/sober128.obj \
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/pk/x448/x448_make_key.obj src/pk/x448/x448_shared_secret.obj src/pqc/mldsa/mldsa.obj \
src/pqc/mldsa/mldsa_export.obj src/pqc/mldsa/mldsa_import.obj src/pqc/mldsa/mldsa_import_pkcs8.obj \
src/pqc/mldsa/mldsa_import_x509.obj src/pqc/mlkem/mlkem.obj src/pqc/mlkem/mlkem_export.obj \
src/pqc/mlkem/mlkem_import.obj src/pqc/mlkem/mlkem_import_pkcs8.obj src/pqc/mlkem/mlkem_import_x509.obj \
src/pqc/slhdsa/slhdsa.obj src/pqc/slhdsa/slhdsa_export.obj src/pqc/slhdsa/slhdsa_import.obj \
src/pqc/slhdsa/slhdsa_import_pkcs8.obj src/pqc/slhdsa/slhdsa_import_x509.obj src/prngs/chacha20.obj \
src/prngs/fortuna.obj src/prngs/rc4.obj src/prngs/rng_get_bytes.obj src/prngs/rng_make_prng.obj \
src/prngs/sober128.obj 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/chacha/xchacha20_memory.obj \
src/stream/chacha/xchacha20_setup.obj src/stream/chacha/xchacha20_test.obj src/stream/rabbit/rabbit.obj \
Expand All @@ -242,16 +247,17 @@ tests/dh_test.obj tests/dsa_test.obj tests/ecc_test.obj tests/ed25519_test.obj t
tests/file_test.obj tests/mac_test.obj tests/misc_test.obj tests/modes_test.obj tests/mpi_test.obj \
tests/multi_test.obj tests/no_null_termination_check_test.obj tests/no_prng.obj tests/padding_test.obj \
tests/pem_test.obj tests/pk_oid_test.obj tests/pkcs_1_eme_test.obj tests/pkcs_1_emsa_test.obj \
tests/pkcs_1_oaep_test.obj tests/pkcs_1_pss_test.obj tests/pkcs_1_test.obj tests/prng_test.obj \
tests/rotate_test.obj tests/rsa_test.obj tests/scrypt_test.obj tests/siv_wycheproof_test.obj tests/ssh_test.obj \
tests/store_test.obj tests/test.obj tests/x25519_test.obj tests/x448_test.obj
tests/pkcs_1_oaep_test.obj tests/pkcs_1_pss_test.obj tests/pkcs_1_test.obj tests/pqc_mldsa_test.obj \
tests/pqc_mlkem_test.obj tests/pqc_slhdsa_test.obj tests/prng_test.obj tests/rotate_test.obj tests/rsa_test.obj \
tests/scrypt_test.obj tests/siv_wycheproof_test.obj tests/ssh_test.obj tests/store_test.obj tests/test.obj \
tests/x25519_test.obj tests/x448_test.obj

#The following headers will be installed by "make install"
HEADERS_PUB=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cfg.h \
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_pqc.h src/headers/tomcrypt_prng.h

HEADERS=$(HEADERS_PUB) src/headers/tomcrypt_private.h

Expand Down
32 changes: 19 additions & 13 deletions makefile.unix
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ src/mac/xcbc/xcbc_file.o src/mac/xcbc/xcbc_init.o src/mac/xcbc/xcbc_memory.o \
src/mac/xcbc/xcbc_memory_multi.o src/mac/xcbc/xcbc_process.o src/mac/xcbc/xcbc_test.o \
src/math/fp/ltc_ecc_fp_mulmod.o src/math/gmp_desc.o src/math/ltm_desc.o src/math/multi.o \
src/math/radix_to_bin.o src/math/rand_bn.o src/math/rand_prime.o src/math/tfm_desc.o src/misc/adler32.o \
src/misc/argon2/argon2.o src/misc/base16/base16_decode.o src/misc/base16/base16_encode.o \
src/misc/base32/base32_decode.o src/misc/base32/base32_encode.o src/misc/base64/base64_decode.o \
src/misc/base64/base64_encode.o src/misc/bcrypt/bcrypt.o src/misc/burn_stack.o \
src/misc/compare_testvector.o src/misc/copy_or_zeromem.o src/misc/crc32.o src/misc/crypt/crypt.o \
src/misc/crypt/crypt_argchk.o src/misc/crypt/crypt_cipher_descriptor.o \
src/misc/algname_match.o src/misc/argon2/argon2.o src/misc/base16/base16_decode.o \
src/misc/base16/base16_encode.o src/misc/base32/base32_decode.o src/misc/base32/base32_encode.o \
src/misc/base64/base64_decode.o src/misc/base64/base64_encode.o src/misc/bcrypt/bcrypt.o \
src/misc/burn_stack.o src/misc/compare_testvector.o src/misc/copy_or_zeromem.o src/misc/crc32.o \
src/misc/crypt/crypt.o src/misc/crypt/crypt_argchk.o src/misc/crypt/crypt_cipher_descriptor.o \
src/misc/crypt/crypt_cipher_is_valid.o src/misc/crypt/crypt_constants.o \
src/misc/crypt/crypt_find_cipher.o src/misc/crypt/crypt_find_cipher_any.o \
src/misc/crypt/crypt_find_cipher_id.o src/misc/crypt/crypt_find_hash.o \
Expand Down Expand Up @@ -239,10 +239,15 @@ src/pk/x25519/x25519_import.o src/pk/x25519/x25519_import_pkcs8.o src/pk/x25519/
src/pk/x25519/x25519_import_x509.o src/pk/x25519/x25519_make_key.o \
src/pk/x25519/x25519_shared_secret.o src/pk/x448/x448_export.o src/pk/x448/x448_import.o \
src/pk/x448/x448_import_pkcs8.o src/pk/x448/x448_import_raw.o src/pk/x448/x448_import_x509.o \
src/pk/x448/x448_make_key.o src/pk/x448/x448_shared_secret.o src/prngs/chacha20.o src/prngs/fortuna.o \
src/prngs/rc4.o src/prngs/rng_get_bytes.o src/prngs/rng_make_prng.o src/prngs/sober128.o \
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/pk/x448/x448_make_key.o src/pk/x448/x448_shared_secret.o src/pqc/mldsa/mldsa.o \
src/pqc/mldsa/mldsa_export.o src/pqc/mldsa/mldsa_import.o src/pqc/mldsa/mldsa_import_pkcs8.o \
src/pqc/mldsa/mldsa_import_x509.o src/pqc/mlkem/mlkem.o src/pqc/mlkem/mlkem_export.o \
src/pqc/mlkem/mlkem_import.o src/pqc/mlkem/mlkem_import_pkcs8.o src/pqc/mlkem/mlkem_import_x509.o \
src/pqc/slhdsa/slhdsa.o src/pqc/slhdsa/slhdsa_export.o src/pqc/slhdsa/slhdsa_import.o \
src/pqc/slhdsa/slhdsa_import_pkcs8.o src/pqc/slhdsa/slhdsa_import_x509.o src/prngs/chacha20.o \
src/prngs/fortuna.o src/prngs/rc4.o src/prngs/rng_get_bytes.o src/prngs/rng_make_prng.o \
src/prngs/sober128.o 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/chacha/xchacha20_memory.o \
src/stream/chacha/xchacha20_setup.o src/stream/chacha/xchacha20_test.o src/stream/rabbit/rabbit.o \
Expand All @@ -263,16 +268,17 @@ tests/dh_test.o tests/dsa_test.o tests/ecc_test.o tests/ed25519_test.o tests/ed4
tests/file_test.o tests/mac_test.o tests/misc_test.o tests/modes_test.o tests/mpi_test.o \
tests/multi_test.o tests/no_null_termination_check_test.o tests/no_prng.o tests/padding_test.o \
tests/pem_test.o tests/pk_oid_test.o tests/pkcs_1_eme_test.o tests/pkcs_1_emsa_test.o \
tests/pkcs_1_oaep_test.o tests/pkcs_1_pss_test.o tests/pkcs_1_test.o tests/prng_test.o \
tests/rotate_test.o tests/rsa_test.o tests/scrypt_test.o tests/siv_wycheproof_test.o tests/ssh_test.o \
tests/store_test.o tests/test.o tests/x25519_test.o tests/x448_test.o
tests/pkcs_1_oaep_test.o tests/pkcs_1_pss_test.o tests/pkcs_1_test.o tests/pqc_mldsa_test.o \
tests/pqc_mlkem_test.o tests/pqc_slhdsa_test.o tests/prng_test.o tests/rotate_test.o tests/rsa_test.o \
tests/scrypt_test.o tests/siv_wycheproof_test.o tests/ssh_test.o tests/store_test.o tests/test.o \
tests/x25519_test.o tests/x448_test.o

#The following headers will be installed by "make install"
HEADERS_PUB=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cfg.h \
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_pqc.h src/headers/tomcrypt_prng.h

HEADERS=$(HEADERS_PUB) src/headers/tomcrypt_private.h

Expand Down
Loading
Loading