Skip to content

Commit 7e7eb69

Browse files
committed
Merge branch 'release/1.18.2'
2 parents e08fd86 + a015a8f commit 7e7eb69

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+385
-136
lines changed

changes

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
July 1st, 2018
2+
v1.18.2
3+
-- Fix Side Channel Based ECDSA Key Extraction (CVE-2018-12437) (PR #408)
4+
-- Fix potential stack overflow when DER flexi-decoding (CVE-2018-0739) (PR #373)
5+
-- Fix two-key 3DES (PR #390)
6+
-- Fix accelerated CTR mode (PR #359)
7+
-- Fix Fortuna PRNG (PR #363)
8+
-- Fix compilation on platforms where cc doesn't point to gcc (PR #382)
9+
-- Fix using the wrong environment variable LT instead of LIBTOOL (PR #392)
10+
-- Fix build on platforms where the compiler provides __WCHAR_MAX__ but wchar.h is not available (PR #390)
11+
-- Fix & re-factor crypt_list_all_sizes() and crypt_list_all_constants() (PR #414)
12+
-- Minor fixes (PR's #350 #351 #375 #377 #378 #379)
13+
114
January 22nd, 2018
215
v1.18.1
316
-- Fix wrong SHA3 blocksizes, thanks to Claus Fischer for reporting this via Mail (PR #329)

demos/constants.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,10 @@ int main(int argc, char **argv)
6565
/* get and print the length of the names (and values) list */
6666
if (crypt_list_all_constants(NULL, &names_list_len) != 0) exit(EXIT_FAILURE);
6767
/* get and print the names (and values) list */
68-
names_list = malloc(names_list_len);
68+
if ((names_list = malloc(names_list_len)) == NULL) exit(EXIT_FAILURE);
6969
if (crypt_list_all_constants(names_list, &names_list_len) != 0) exit(EXIT_FAILURE);
7070
printf("%s\n", names_list);
71+
free(names_list);
7172
}
7273
} else if (argc == 3) {
7374
if (strcmp(argv[1], "-s") == 0) {

demos/sizes.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ int main(int argc, char **argv)
4242
printf(" need to allocate %u bytes \n\n", sizes_list_len);
4343

4444
/* get and print the names (and sizes) list */
45-
sizes_list = malloc(sizes_list_len);
45+
if ((sizes_list = malloc(sizes_list_len)) == NULL) exit(EXIT_FAILURE);
4646
if (crypt_list_all_sizes(sizes_list, &sizes_list_len) != 0) exit(EXIT_FAILURE);
4747
printf(" supported sizes:\n\n%s\n\n", sizes_list);
48+
free(sizes_list);
4849
} else if (argc == 2) {
4950
if (strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0) {
5051
char* base = strdup(basename(argv[0]));
@@ -60,9 +61,10 @@ int main(int argc, char **argv)
6061
/* get and print the length of the names (and sizes) list */
6162
if (crypt_list_all_sizes(NULL, &sizes_list_len) != 0) exit(EXIT_FAILURE);
6263
/* get and print the names (and sizes) list */
63-
sizes_list = malloc(sizes_list_len);
64+
if ((sizes_list = malloc(sizes_list_len)) == NULL) exit(EXIT_FAILURE);
6465
if (crypt_list_all_sizes(sizes_list, &sizes_list_len) != 0) exit(EXIT_FAILURE);
6566
printf("%s\n", sizes_list);
67+
free(sizes_list);
6668
}
6769
} else if (argc == 3) {
6870
if (strcmp(argv[1], "-s") == 0) {

demos/timing.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ static void time_cipher_lrw(void)
466466
tally_results(1);
467467
}
468468
#else
469-
static void time_cipher_lrw(void) { fprintf(stderr, "NO LRW\n"); return 0; }
469+
static void time_cipher_lrw(void) { fprintf(stderr, "NO LRW\n"); }
470470
#endif
471471

472472

demos/tv_gen.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ void cipher_gen(void)
7878
printf("keysize error: %s\n", error_to_string(err));
7979
exit(EXIT_FAILURE);
8080
}
81-
if (kl == lastkl) break;
81+
if (kl == lastkl) continue;
8282
lastkl = kl;
8383
fprintf(out, "Key Size: %d bytes\n", kl);
8484

doc/Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = LibTomCrypt
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER=1.18.1
41+
PROJECT_NUMBER=1.18.2
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

doc/crypt.tex

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3666,11 +3666,15 @@ \subsubsection{Fortuna}
36663666
it has been fixed to those choices.
36673667

36683668
Fortuna is more secure than Yarrow in the sense that attackers who learn parts of the entropy being
3669-
added to the PRNG learn far less about the state than that of Yarrow. Without getting into to many
3669+
added to the PRNG learn far less about the state than that of Yarrow. Without getting into too many
36703670
details Fortuna has the ability to recover from state determination attacks where the attacker starts
36713671
to learn information from the PRNGs output about the internal state. Yarrow on the other hand, cannot
36723672
recover from that problem until new entropy is added to the pool and put to use through the ready() function.
36733673

3674+
For detailed information on how the algorithm works and what you have to do to maintain the secure state
3675+
get a copy of the book\footnote{Niels Ferguson and Bruce Schneier, Practical Cryptography. ISBN 0-471-22357-3.} or
3676+
read the paper online\footnote{\url{https://www.schneier.com/academic/paperfiles/fortuna.pdf} [Accessed on 7th Dec. 2017]}.
3677+
36743678
\subsubsection{RC4}
36753679

36763680
RC4 is an old stream cipher that can also double duty as a PRNG in a pinch. You key RC4 by

makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ $(1): $(call print-help,$(1),Builds the library and the '$(1)' demo) demos/$(1).
6969
ifneq ($V,1)
7070
@echo " * $${CC} $$@"
7171
endif
72-
$${silent} $$(CC) $$(LTC_CFLAGS) $$< $$(LIB_PRE) $$(LIBNAME) $$(LIB_POST) $$(EXTRALIBS) -o $(1)
72+
$${silent} $$(CC) $$< $$(LIB_PRE) $$(LIBNAME) $$(LIB_POST) $$(EXTRALIBS) -o $(1)
7373
endef
7474

7575
$(foreach demo, $(strip $(DEMOS)), $(eval $(call DEMO_template,$(demo))))

makefile.mingw

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ EXTRALIBS = -L../libtommath -ltommath
2727
#Compilation flags
2828
LTC_CFLAGS = -Isrc/headers -Itests -DLTC_SOURCE $(CFLAGS)
2929
LTC_LDFLAGS = $(LDFLAGS) $(EXTRALIBS)
30-
VERSION=1.18.1
30+
VERSION=1.18.2
3131

3232
#Libraries to be created
3333
LIBMAIN_S =libtomcrypt.a

makefile.msvc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ EXTRALIBS = ../libtommath/tommath.lib
2222
#Compilation flags
2323
LTC_CFLAGS = /nologo /Isrc/headers/ /Itests/ /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE /DLTC_SOURCE /W3 $(CFLAGS)
2424
LTC_LDFLAGS = advapi32.lib $(EXTRALIBS)
25-
VERSION=1.18.1
25+
VERSION=1.18.2
2626

2727
#Libraries to be created (this makefile builds only static libraries)
2828
LIBMAIN_S =tomcrypt.lib

0 commit comments

Comments
 (0)