Richard Levitte
894f33b81c
Add contrib/libtomcrypt.cmake, and write about it in doc/crypt.tex
...
contrib/libtomcrypt.cmake is a snippet that can be used by any CMake
based project that wants to link with libtomcrypt, no matter if it
was installed with libtomcrypt-config.cmake or libtomcrypt.pc.
Fixes #681
2025-02-18 21:27:38 +01:00
Steffen Jaeckel
cda7d42647
Improve ILP32 detection
...
This should fix https://github.com/DCIT/perl-CryptX/issues/117
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2025-02-17 15:12:53 +01:00
Steffen Jaeckel
b4d41d53bb
Ubuntu-20.04 is no longer
...
https://github.com/actions/runner-images/issues/11101
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2025-02-17 15:08:44 +01:00
Steffen Jaeckel
c93cc120f0
LTC_SOURCE ceased to exist
...
f55039bfeb removed all usage of
`LTC_SOURCE`, but I missed to remove it from the makefiles etc.
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2025-02-17 15:05:01 +01:00
Steffen Jaeckel
54f0456559
Merge pull request #682 from paperchalice/cmake
...
Check BCryptGenRandom correctly
2025-01-29 17:13:55 +01:00
paperchalice
ae7f26ed44
Check BCryptGenRandom correctly
2025-01-29 19:05:43 +08:00
Steffen Jaeckel
427e0551c0
Merge pull request #680 from levitte/tomcrypt_private-stdarg
2025-01-21 09:35:06 +01:00
Richard Levitte
2fd160eae9
Have src/headers/tomcrypt_private.h include stdarg.h
...
This ensures that va_list, which is used in that file, gets properly
declared.
As a consequence, the following pattern in other files can be reduced:
#include "tomcrypt_private.h"
#include <stdarg.h>
Fixes #679
2025-01-21 07:18:45 +01:00
Steffen Jaeckel
2e9f2b5e44
Merge pull request #319 from libtom/add/SIV
...
Add SIV
2025-01-09 13:36:02 +01:00
Steffen Jaeckel
ad2696f24f
Update SIV a bit
...
* Rename `siv_{en,de}crypt()` to `siv_{en,de}crypt_memory()`.
* The number of AAD components per SIV operation must not exceed 126.
* Init OMAC only once per SIV operation.
All OMAC operations start off with the same key. Instead of
re-initializing the OMAC context for each operation, init once and
store the context.
* Add SIV to timing demo.
* Add 1000-times-encrypt-then-decrypt test for SIV.
* Update docs.
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2025-01-01 17:05:36 +01:00
Steffen Jaeckel
8bdc093fae
Add omac_vprocess()
...
As a new private API.
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-12-28 19:11:32 +01:00
Steffen Jaeckel
197be81918
Re-factor SIV and add siv_memory()
...
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-12-19 16:17:34 +01:00
Steffen Jaeckel
f4df47b59b
Update makefiles
...
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-12-17 18:24:26 +01:00
Steffen Jaeckel
faa8cd71e5
add SIV
...
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-12-17 18:24:26 +01:00
Steffen Jaeckel
c900951dab
Fix c&p error [skip-ci]
...
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-12-17 18:24:16 +01:00
Steffen Jaeckel
a81dab9970
Merge pull request #678 from libtom/some-improvements
2024-12-11 18:24:46 +01:00
Steffen Jaeckel
f6e71dfced
Remove even more footers
...
Fixes 2400883060
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-12-11 12:10:02 +01:00
Steffen Jaeckel
87ff205c8b
Handle potential pkg-config failures
...
There are cases where we want to use an MPI provider, but the package is
not installed in the system, so `pkg-config` can't find it.
To solve this simply ignore the errors created and only print something
if the user asks us to by passing `V=1`.
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-12-11 11:57:08 +01:00
Steffen Jaeckel
54a16fb672
There are no broken demos anymore
...
... at least at compile time.
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-12-11 11:09:58 +01:00
Steffen Jaeckel
795e8e8cfe
Re-work some of the demos
...
* Add at least a `-h` option, sometimes more.
* Fix the exit codes of some of them.
* Make them all compile with `LTC_EASY`.
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-12-11 11:09:58 +01:00
Steffen Jaeckel
d96605b4b9
Fix build on x32
...
* `CONSTPTR()` must be 32bit.
* `CRYPT_HASH_OVERFLOW` test operates on `unsigned long`, which is only
32bit wide on x32.
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-12-11 11:09:58 +01:00
Steffen Jaeckel
e487f8400e
Introduce CRYPT_ERR_NUM and build-time check err_2_str[] size
...
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-12-11 11:09:58 +01:00
Steffen Jaeckel
507c66827f
Merge pull request #677 from libtom/some-improvements
...
Some improvements
2024-12-05 18:34:05 +01:00
Steffen Jaeckel
88dcebdbf5
Rework demos building and installation
...
* add `ltc` wrapper script for installed demos
* rework demos/CMakeLists.txt and add some more bells and whistles
* prefix installed demos with `ltc-`
Currently this makes the standard makefiles and CMake results diverge, but
we can fix that later if required.
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-12-05 17:23:12 +01:00
Steffen Jaeckel
a9bb1c1525
Use cmake-format to format CMake files
...
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-12-03 19:51:26 +01:00
Steffen Jaeckel
98415b8a38
Change ltcrypt back to crypt
...
This reverts 85dc39483f
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-12-03 19:51:22 +01:00
Steffen Jaeckel
9eef89c5a4
Cancel running GH action on update of PR branch
...
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-12-03 19:48:18 +01:00
Steffen Jaeckel
dc945f9697
Add LTC_PTHREAD to pkg-config file if enabled at build time
...
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-11-20 13:11:59 +01:00
Steffen Jaeckel
2400883060
Remove remaining footers
...
Fixes 24765c30c5
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-11-20 12:59:49 +01:00
Richard Levitte
6659f36ad6
Align demo/CMakeLists.txt a bit more with with makefile_include.mk
...
Now, they build the same executables.
2024-11-20 12:59:45 +01:00
Steffen Jaeckel
17642547e4
Merge pull request #676 from hughsie/hughsie/sbom
...
Add a SBOM file in CycloneDX format
2024-11-19 14:39:57 +01:00
Richard Hughes
55441f12d2
Add a SBOM file in CycloneDX format
...
Improve supply chain security by including a SBOM file with substituted values.
This will be used to construct a composite platform SBOM.
Signed-off-by: Richard Hughes <richard@hughsie.com>
2024-11-19 12:28:13 +00:00
Steffen Jaeckel
5d2b15472f
Merge pull request #667 from levitte/constify-math
...
Constify math descriptors
2024-11-09 09:56:08 +01:00
Steffen Jaeckel
1d07689581
Remove unnecessary casts in the tests
...
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-11-08 17:15:39 +01:00
Richard Levitte
1e31c38e61
Remove unnecessary casts in the demos
2024-11-08 17:15:39 +01:00
Richard Levitte
4b3c98a4e6
Remove unnecessary casts in the misc implementations
2024-11-08 17:15:39 +01:00
Richard Levitte
b98ef26112
Remove unnecessary casts in the Sober128 implementation
2024-11-08 17:15:39 +01:00
Richard Levitte
fc32d77845
Remove unnecessary casts in the ECC implementation
2024-11-08 17:15:39 +01:00
Richard Levitte
477d09fd01
Remove unnecessary casts in the DSA implementation
2024-11-08 17:15:39 +01:00
Richard Levitte
7d3e6b7066
Remove unnecessary casts in the RSA implementation
2024-11-08 17:15:39 +01:00
Richard Levitte
e95069924a
src/math/tfm_desc.c: Compensate for TFM before 0.14.0 (yet to be released)
...
TFM is notorious for not having a properly constified API. This is to appear
in its next release, which is tentatively set to 0.14.0.
2024-11-08 17:15:39 +01:00
Richard Levitte
88315ff8df
Constify all the functions in ltc_math_descriptor appropriately
...
This includes amending the documentation in doc/crypt.tex
This also includes removing unnecessary casts in src/math/*.c
2024-11-08 17:15:39 +01:00
Steffen Jaeckel
2dd6690edf
Merge pull request #674 from cmorty/pem_decode_filehandle
...
Add missing ifndef LTC_NO_FILE
2024-11-07 10:46:30 +01:00
Moritz Strübe
89d73ac405
Add missing ifndef LTC_NO_FILE
...
pem_decode_filehandle is deactiveted in the header, but not the module.
2024-11-06 15:35:29 +00:00
Steffen Jaeckel
d34f2130a6
Merge pull request #673 from cmorty/ltc_lrw_mode-macro
...
Add missing LTC_ prefix to LTC_LRW_MODE macro
2024-11-06 00:07:28 +01:00
Moritz Strübe
8daa79f85b
Add missing LTC_ prefix to LTC_LRW_MODE macro
...
This also fixes the implicit declaration of function ‘gcm_gf_mult’
warning in lrw_start.c.
2024-11-04 14:36:19 +00:00
Steffen Jaeckel
cbb01b3708
Merge pull request #672 from libtom/some-fixes
...
Some fixes
2024-10-14 19:30:11 +02:00
Steffen Jaeckel
5a1545a8ae
Ensure test buffers are always '\0' terminated
...
This caused spurious test failures.
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-10-12 14:04:49 +02:00
Steffen Jaeckel
ebfcff3027
Fix handling of trailing spaces when decoding PEM files
...
Reported via [0].
[0] https://github.com/DCIT/perl-CryptX/issues/110#issuecomment-2407279713
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-10-12 14:04:49 +02:00
Steffen Jaeckel
31a48d06bf
Const arrays should be const
...
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-10-12 14:04:49 +02:00