Commit Graph

151 Commits

Author SHA1 Message Date
Steffen Jaeckel
07bfe77cfb 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>
2024-02-18 17:03:02 +00:00
Ulrich Koschella
a96794c9c5 Fixed wrong sign in docu of ECC Extended Key Generation, Fixes #628 2024-02-18 17:02:10 +00:00
Steffen Jaeckel
33a26c4959 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>
2024-02-18 17:02:10 +00:00
Steffen Jaeckel
13fd324a3b add support for AES-NI instructions
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-02-18 17:02:10 +00:00
Steffen Jaeckel
5a33be0dbc 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>
2024-02-18 17:02:09 +00:00
Steffen Jaeckel
97d0f61491 port cmake integration changes from libtommath
... also enable building of tests.

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-02-18 17:02:09 +00:00
Steffen Jaeckel
57c90507ae 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>
2024-02-18 17:02:08 +00:00
Steffen Jaeckel
2af7e7e65d add hash Id to docs 2024-02-18 17:02:07 +00:00
Steffen Jaeckel
fdd96a7fbc add cipher Id to docs
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-02-18 17:02:07 +00:00
Steffen Jaeckel
4499b5cdb7 fix typo
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2024-02-18 17:02:07 +00:00
Cedric Neveux
4cd4761284 documentation: add new rsa generate key API
Add rsa_make_key_ubin_e api documentation.

Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com>
2024-02-18 17:02:06 +00:00
Steffen Jaeckel
b2da51b518 clarify LTC_PAD_PKCS7 2024-02-18 17:02:06 +00: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
Steffen Jaeckel
06a58ab519 update doc 2019-10-11 14:20:43 +02:00
Steffen Jaeckel
3da27d71a0 Improve comments&doc
[skip ci]
2019-06-10 03:28:42 +02:00
Steffen Jaeckel
fef07fd843 add documentation of Curve25519 API 2019-06-09 23:20:45 +02:00
Karel Miko
7d8567695b update doc - chacha20poly1305_memory + gcm_memory 2018-10-29 07:28:18 +01:00
Marcos Brito
be29591812
Fix RSA Encryption Example
RSA Encryption Example is missing a closing comment bracket */
2018-10-25 16:34:45 +02:00
Karel Miko
9c0d708523 fix typo pkcs7_depad > padding_depad [skip-ci] 2018-10-15 10:51:17 +02:00
Russ Williams
b4b50cc0c6 Initial commit of SSH+ECDSA signature format
Wrap signature format in #ifdef LTC_SSH
Update docs
Code review fixes
Replace strcmp/memcmp with XSTRCMP/XMEMCMP for check-source
Fix for check-defines
XSTRCMP/XMEMCMP != 0
GCC7.3 wants only literal strings for sprintf format
Code review changes
Rework SSH decoding and tests
Fix encoding and tests
COMPARE_TESTVECTOR macro
Single return point in ssh_decode_sequence_multi
Actually use XSTRNCPY rather than just defining it
More code review fixes
Code review tweaks
Ensure it's not possible to read past buffer end
Keep track of size remaining, not end pointer
2018-10-12 10:22:10 +01:00
Steffen Jaeckel
8fabca6171 merge duplicated tables into separate chapter
[skip ci]
2018-10-06 23:04:51 +02:00
Karel Miko
14b09138a9 doc update
[skip ci]
2018-10-06 23:04:51 +02:00
Russ Williams
88d9b6db26 Make ECC signature format explicit
Optionally return recovery ID from ecc_sign_hash()

Update documentation

Update tests for ECC recovery

Fix (v,r,s) signature format, regenerate recovery test

Fix over-freeing of private key

Code review fixes to docs

Rename LTC_ECCSIG_BLOCKCHAIN to LTC_ECCSIG_ETH to reflect original definition

Rename to LTC_ECCSIG_ETH27 to make clear it's using the Ethereum +27 convention

Code review changes - calculate recovery ID only if needed, type safety on signature format enum

Use enum for sigformat in docs, and add explanatory note for recid<0

Range checks on v, check RFC7518 signatures' length based on size of key. Fix for when order>prime.

Limit LET_ECCSIG_ETH27 to secp256k1 curve only
2018-09-29 21:07:41 +01:00
Russ Williams
76190521e3 Implementation of ecc_recover_key to obtain public key from hash+signature
Workaround for TFM missing sqrtmod_prime

Fix unused variable warnings with USE_TFM, make TomsFastMath a runtime check

Disable ecc_recover_key if no ecc_mul2add available

Wrap ecc_recover_key and its test in #ifdef LTC_ECC_SHAMIR

Fix unused variables when built without LTC_ECC_SHAMIR

Code review tweaks

Code review tweaks - remove sigformat, tidy up (de)allocation

Code review tweaks
2018-09-23 09:03:30 +01:00
buggywhip
a2b343b2d0 streams-add-single-call-crypt-functions
fix mixed declarations and code

add _memory chacha_ivctr32() test
2018-09-10 02:21:09 -07:00
buggywhip
380d1d2452 streams-make_state_names_consistent 2018-07-09 17:31:24 -07:00
Karel Miko
4f3bce103f move ecc_make_key_ex to Legacy Key Generation
[skip ci]
2018-07-06 13:42:54 +02:00
Karel Miko
b30c27066d new names: ecc_find_curve, ecc_set_curve 2018-07-06 13:42:38 +02:00
Steffen Jaeckel
415c19b8df re-work ECC docs a bit
[skip ci]
2018-07-06 13:42:38 +02:00
Karel Miko
57c884d50d ECC doc update
[skip ci]
2018-07-06 13:42:38 +02:00
Steffen Jaeckel
3fb0eea01b show in SCRYPT etc. that we're on develop 2018-07-02 23:25:20 +02:00
Steffen Jaeckel
215ec5f69d Merge tag 'v1.18.2' into develop
libtomcrypt v1.18.2
2018-07-02 23:23:47 +02:00
Steffen Jaeckel
54e6db588a Bump version 2018-07-01 12:51:54 +02:00
Steffen Jaeckel
06c0606da2 generalize caps argument of base16_encode()
probably we want to add more options in the future

I could think of support for some options of `xxd` resp. `hexdump`
2018-06-03 20:50:06 +02:00
Steffen Jaeckel
e31e757a86 fix build of crypt.pdf 2018-06-03 17:48:48 +02:00
Steffen Jaeckel
d752f90d18 fix Doxygen docs 2018-06-03 15:07:28 +02:00
buggywhip
8144209695 add XSalsa20 2018-05-31 11:58:21 -07:00
Steffen Jaeckel
c7a880f222 update docs 2018-04-09 23:30:27 +02:00
Steffen Jaeckel
89dffe6c7e add comment to Fortuna docs
(cherry picked from commit cccd1e3053)
2018-04-04 19:25:31 +02:00
Karel Miko
f0f1283dbb doc - add indexes for base64url_* 2018-03-27 21:06:31 +02:00
Karel Miko
ad8067eaf7 doc for base64_sane_decode 2018-03-27 21:06:30 +02:00
Karel Miko
b10bf8fa0d make base64_decode relaxed mode less relaxed 2018-03-27 21:06:30 +02:00
Steffen Jaeckel
efbf38adce update docs 2018-03-27 10:08:29 +02:00
Karel Miko
e73bb36f3f update doc - base64 & char* 2018-03-26 16:42:19 +02:00
Karel Miko
7a7b773b3c Revert "make base64_decode relaxed mode less relaxed"
This reverts commit e7117ea9df.
2018-03-25 19:41:43 +02:00