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
1 change: 1 addition & 0 deletions .ci/build_options.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ options=(
-DLTC_MECC_FP
-DLTC_NO_TABLES
-DLTC_NO_FAST
-DLTC_NO_STRUCT_PADDING
-DLTC_NO_ASM
-DLTC_NO_DEPRECATED_APIS
-DLTC_NO_ECC_TIMING_RESISTANT
Expand Down
4 changes: 4 additions & 0 deletions doc/crypt.tex
Original file line number Diff line number Diff line change
Expand Up @@ -9195,6 +9195,10 @@ \subsection{LTC\_CLEAN\_STACK}
When this functions is defined the functions that store key material on the stack will clean up afterwards.
Assumes that you have no memory paging with the stack.

\subsection{LTC\_NO\_STRUCT\_PADDING}
Per default the library adds padding to some structs, which are likely to be extended sometime in the future, in order
to provide ABI compatibility to previous versions. To trim down struct sizes where possible, define this macro.

\subsection{LTC\_TEST}
When this has been defined the various self--test functions (for ciphers, hashes, prngs, etc) are included in the build. This is the default configuration.
If LTC\_NO\_TEST has been defined, the testing routines will be compacted and only return CRYPT\_NOP.
Expand Down
3 changes: 3 additions & 0 deletions src/headers/tomcrypt_custom.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@
/* clean the stack of functions which put private information on stack */
/* #define LTC_CLEAN_STACK */

/* enable this in case you want to disable padding elements in structs */
/* #define LTC_NO_STRUCT_PADDING */

/* disable all file related functions */
/* #define LTC_NO_FILE */

Expand Down
4 changes: 3 additions & 1 deletion src/headers/tomcrypt_pk.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,10 @@ typedef struct ltc_rsa_op_parameters {
const unsigned char *lparam;
unsigned long lparamlen;
} crypt;
#ifndef LTC_NO_STRUCT_PADDING
/* let's make space for potential future extensions */
ulong64 dummy[8];
void* padding[8];
#endif
} u;
} ltc_rsa_op_parameters;

Expand Down
Loading