Commit graph

183 commits

Author SHA1 Message Date
Karel Miko
458b392d01 Argon2 password hashing function (RFC 9106) 2026-04-12 14:48:32 +02:00
Steffen Jaeckel
cc53195945 Update docs.
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2026-04-09 15:40:07 +02:00
Steffen Jaeckel
63af5f6dc1 Update docs of ecc_free().
This fixes #710

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2026-02-04 11:30:24 +01:00
Marek Knápek
6832f3c106 Add KangarooTwelve XOF functions.
KangarooTwelve 128bits and KangarooTwelve 256 bits.

https://keccak.team/files/TurboSHAKE.pdf
https://www.rfc-editor.org/rfc/rfc9861.txt
https://datatracker.ietf.org/doc/html/rfc9861
2025-11-28 19:05:31 +01:00
Steffen Jaeckel
2c487a2e4b Update docs.
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2025-11-25 10:09:14 +01:00
Steffen Jaeckel
7f73f83853 Update docs
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2025-11-18 18:53:26 +01:00
Steffen Jaeckel
d8a62f3367 Create table of supported ECC curves programmatically
Related to #349

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2025-11-03 13:56:58 +01:00
Steffen Jaeckel
934bd7e0fe Remove init_{GMP,LTM,TFM}()
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2025-11-03 13:52:34 +01:00
Nicolas Mora
95a492a184 Make build of docs reproducible 2025-11-03 13:51:48 +01:00
Steffen Jaeckel
5e0d801c1d Clarify MPI providers a bit further
This closes #354

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2025-11-03 13:51:37 +01:00
Steffen Jaeckel
46fa363f2c Finish up RFC6979 ECDSA keygen
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2025-09-04 17:36:30 +02:00
Russ Williams
d376af52ca RFC6979: implementation, tests, docs 2025-09-04 17:36:30 +02:00
Steffen Jaeckel
46f33c6b5d Update ecc_recover_key() docs.
This also adds a note about the potential limitation of the signature
formats, depending on the tailoring.

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2025-03-02 12:09:24 +01:00
Steffen Jaeckel
bdffc3d53e Update docs.
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2025-03-02 12:09:24 +01:00
Steffen Jaeckel
47c721c164 Update doc formatting
* make PDF content copy&paste-able
* add new `\code{}` command

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2025-03-02 12:09:24 +01:00
Steffen Jaeckel
08b69be797 minor changes for amalgamation
* de-duplicate `struct oid_to_pbes`
* add makefile target
* add amalgamation to release
* fix `small` demo
* add header guards for `tomcrypt_private.h`
* update docs
* add CI job with amalgamated library

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2025-02-20 14:43:06 +01:00
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
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
2400883060 Remove remaining footers
Fixes 24765c30c5

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-11-20 12:59:49 +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
Richard Levitte
dd3b9e59e1 Fix PEM documentation 2024-09-20 11:24:19 +02:00
Chao Wei
6f15a45adc Add SM4 block cipher
SM4 (formerly SMS4)[1] is a block cipher used in the Chinese
National Standard for Wireless LAN WAPI (Wired Authentication
and Privacy Infrastructure).
--from wikipedia
2024-08-30 05:30:48 +02:00
Steffen Jaeckel
2594f3a7d2 Update docs
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-08-20 13:29:27 +02:00
Steffen Jaeckel
2613264cef We can now also decrypt PEM files encrypted in CFB1 and CFB8 mode
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-08-20 13:29:27 +02:00
Steffen Jaeckel
cf79facfb9 Add support for CFB1 and CFB8
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-08-20 13:29:27 +02:00
Steffen Jaeckel
478f43fc56 Add support for reading authorized_keys files
This also changes the requirements when calling `ecc_find_curve()` that
the `cu` argument can be NULL.

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-08-20 13:29:27 +02:00
Steffen Jaeckel
c0be0aa0bf Add support for more types of encrypted PEM files
1. ChaCha20, two-key 3DES and DES-X encrypted OpenSSL PEM files

2. AES-GCM and Chacha20+Poly1305 encrypted SSH keys

* OpenSSH uses a slightly different algorithm for its
  `chacha20-poly1305@openssh.com` than defined in the RFC.
  Therefore add an `openssh_compat` flag to
  `chacha20poly1305_state`.
* Add the option to give a 16byte IV and no counter, when calling
  `chacha20poly1305_memory()`
* Add support for DES-X

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-08-20 13:29:27 +02:00
Steffen Jaeckel
65e05bfa56 Update docs
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-08-20 13:29:27 +02:00
Steffen Jaeckel
661f5845fe distinguish between Ed25519 and X25519
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-08-20 13:29:27 +02:00
Steffen Jaeckel
39d4b089ac Update docs
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-08-20 13:29:27 +02:00
Steffen Jaeckel
8be96ac2f6 Update docs
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-02-26 15:51:54 +01:00
Steffen Jaeckel
d11758e700 Add support for Tiger2
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-02-26 15:51:54 +01:00
Steffen Jaeckel
63091c9e5c Add possibility to use different hash algorithms in RSAES-OAEP
The hash algorithms used in the MGF and to create the hash of the Label
must not forcibly be the same. This change allows to use different
algorithms.

Unfortunately this breaks the API if you use one of:
* `rsa_decrypt_key_ex()`
* `rsa_encrypt_key_ex()`
* `pkcs_1_oaep_decode()`
* `pkcs_1_oaep_encode()`

The `rsa_decrypt_key()` and `rsa_encrypt_key()` macros are still the same.

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2023-10-09 12:26:21 +02:00
Ulrich Koschella
7ddd4f7de2 Fixed wrong sign in docu of ECC Extended Key Generation, Fixes #628 2023-08-03 13:03:25 +02:00
Steffen Jaeckel
9e0a131b2c introduce separate aes_desc
`aes_desc` and `aes_enc_desc` now do auto-detection of the best suitable
AES implementation for the platform.

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2023-06-22 18:37:25 +02:00
Steffen Jaeckel
31c7f891aa add support for AES-NI instructions
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2023-06-22 18:37:25 +02:00
Steffen Jaeckel
e8e678e101 improve MPI providers section in documentation
.. also add a checkbox regarding MPI providers to the issue template

This closes #605

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2022-10-12 12:06:59 +02:00
Steffen Jaeckel
cdc1dbe6f5 port cmake integration changes from libtommath
... also enable building of tests.

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2022-10-05 14:49:54 +02:00
Steffen Jaeckel
9dec999564 re-factor some parts of the Ed25519ctx and Ed25519ph implementation
* The RFC doesn't limit the context to be a string.
  It talks about `octets` which means it could be any binary data.
* Move the context-preprocessing function out of tweetnacl.c
* Fix potential segfaults when Ed25519 signature verification fails and
  `LTC_CLEAN_STACK` is enabled.
* Fix all the warnings.
* Update documentation.

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2022-08-20 14:38:43 +02:00
Steffen Jaeckel
6552fbcfe2 add hash Id to docs 2022-03-17 14:26:44 +01:00
Steffen Jaeckel
c8e49539e6 add cipher Id to docs
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2022-02-11 16:12:27 +01:00
Steffen Jaeckel
1aac5b322a fix typo
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2022-02-10 16:15:14 +01:00
Cedric Neveux
75cfdaa490 documentation: add new rsa generate key API
Add rsa_make_key_ubin_e api documentation.

Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com>
2021-06-04 08:05:58 +02:00
Steffen Jaeckel
8f36c37acb clarify LTC_PAD_PKCS7 2021-04-10 13:02:39 +02:00
Steffen Jaeckel
c5d7bfb2cc manually fix the remaining leading _'s 2020-07-16 10:38:33 +02:00
Steffen Jaeckel
2d930616e0 Update docs
[skip ci]
2019-10-19 16:30:18 +02:00
Steffen Jaeckel
9b6bf32f88 use unsigned long for the length of a string 2019-10-13 14:05:41 +02:00
Steffen Jaeckel
27ec31d4f3 improve SSH decoding & doc 2019-10-13 14:05:41 +02:00
Steffen Jaeckel
d4233e9156 rename arguments 2019-10-12 14:31:38 +02:00
Steffen Jaeckel
9423f3b26d add bcrypt 2019-10-12 14:31:38 +02:00