Commit Graph

43 Commits (2dd22e3500213b6d40e77aef42775e67fc99a656)

Author SHA1 Message Date
David Garske 2dd22e3500
Merge pull request #103 from roberthdevries/add-support-for-wcGetErrorString
Add support for wcGetErrorString() including error codes.
2026-04-17 09:37:15 -07:00
Jeremiah Mackey 664e887f09 Fix hash copy semantics and add tests 2026-04-16 14:34:26 +00:00
Jeremiah Mackey 88bd75957d Add tests and fix build issues 2026-04-16 14:34:26 +00:00
Jeremiah Mackey cbdc388cc4 Fix low severity static analysis issues 2026-04-16 14:34:26 +00:00
Jeremiah Mackey c65ceaabd0 Fix resource leaks 2026-04-16 14:33:55 +00:00
David Garske 1ec10b3c0d
Merge pull request #102 from roberthdevries/fix-various-minor-issues-caught-by-ruff
Fix various minor issues caught by `ruff check` in default mode.
2026-04-15 15:00:53 -07:00
David Garske 0297859652
Merge pull request #90 from mjdemilliano/ml-dsa-sign-with-context
ML-DSA: Add optional context to signing and verification
2026-04-15 14:59:20 -07:00
Daniele Lacamera 90f21e1d13
Merge branch 'master' into ml-dsa-generate-from-seed 2026-04-15 06:56:56 +02:00
Daniele Lacamera 9ebe2fe266
Merge branch 'master' into ml-dsa-sign-with-context 2026-04-15 06:51:11 +02:00
Martijn de Milliano e36859cb9c ML-DSA: Support deterministic signing 2026-04-15 06:48:36 +02:00
Robert de Vries 4813648e74 Add support for wcGetErrorString() including error codes.
It was already used, but not compiled in.
A unit test is added.

As wcGetErrorString() always returns a string the error handling
in class _Hmac  has been removed.
2026-04-12 22:10:36 +02:00
Robert de Vries da0eb45df7 Fix various minor issues caught by `ruff check` in default mode.
Fixing these minor issues helps in adding more checks to fix-up
the code without being bothered by these issues.

Two minor issues are fixed:
- Mark unused variables with a leading underscore
- Use idiomatic boolean expressions
2026-04-11 18:38:09 +02:00
David Garske 6fbdf3d6d7
Merge pull request #99 from roberthdevries/fix-missing-format-argument
Fix missing format argument in exception message.
2026-04-10 10:06:24 -07:00
Robert de Vries 9fe81ec773 Fix missing format argument in exception message. 2026-04-09 20:26:42 +02:00
Robert de Vries 2f630a4353 Clean up import statements.
* Remove unused imports.
* Move import statements together at the top of the file.
2026-04-09 20:02:01 +02:00
Robert de Vries 01fcd2af6c Add support for nonce in random number generation. 2026-04-05 23:10:29 +02:00
Martijn de Milliano 1c034b20d8 ML-DSA: Support (re-)generating MlDsaPrivate from seed
As specified in FIPS 204, implementations can store the seed from
which the key can be deterministically generated.
2026-03-24 22:08:57 +01:00
Martijn de Milliano 9a10f58601 ML-DSA: Add optional context to signing and verification 2026-03-24 21:32:17 +01:00
JeremiahM37 3ca2548ec5 Move wc_RsaSSL_Sign/Verify declarations out of RSA_PSS block 2026-03-18 18:27:11 +00:00
JeremiahM37 48fe5aefe0 Fix re.search on list instead of string in FIPS version detection 2026-03-18 18:27:11 +00:00
JeremiahM37 6892321faf Fix CHACHA20_POLY1305 feature check ignoring HAVE_CHACHA 2026-03-18 18:27:11 +00:00
sebastian-carpenter 9172130c8e fixed 'small' ecc signatures so they do not have trailing 0x00 padding bytes 2026-03-06 14:26:44 -07:00
lealem47 427a1a33ce
Merge pull request #78 from mjdemilliano/move-rsa-only-cdefs
Move some cdef declarations for RSA to separate section
2025-12-11 11:06:25 -07:00
Martijn de Milliano f9f73550bd Make wc_PemToDer|wc_DerToPemEx depend only on ASN not KEYGEN
These functions are actually not tied to the KEYGEN feature.
2025-12-08 23:07:12 +01:00
Martijn de Milliano 4f37e78d2b Include wc_GetPkcs8TraditionalOffset also when RSA feature is selected
It's part of the ASN feature but since it's also used by the RSA
binding this function must also be part of the library when only
the RSA feature is selected.
2025-12-08 22:30:48 +01:00
Martijn de Milliano 6b241ca696 Move some cdef declarations for RSA to separate section
The definitions for the following functions are not always available
when wolfSSL is configured to only contain a minimum of functionality:
- wc_GetPkcs8TraditionalOffset (only with ASN, which is required for
      RSA)
- wc_PemToDer (only when KEYGEN is enabled)
- wc_DerToPemEx (only when KEYGEN is enabled)

This change allows for building the Python wrapper when ASN and RSA
are both disabled.
2025-11-24 12:32:59 +01:00
Martijn de Milliano e62464362b build_ffi.py: Fix header parsing of feature detection logic
`defines` was a string instead of a list of strings. This made it
impossible to build a wrapper with a configuration in which AES-CBC
is disabled, because `'#define NO_AES' in defines` matched also
when the header contains `#define NO_AES_CBC`. With `defines` being
a list the code actually does what you think it does.
2025-11-24 12:02:33 +01:00
lealem47 e9ebda0619
Merge pull request #73 from mjdemilliano/hdkf
Add HKDF support
2025-11-19 13:37:49 -07:00
Martijn de Milliano 523b36bf97 Add support for multiple associated data blocks 2025-11-12 14:39:48 +01:00
Martijn de Milliano 56e7814c6e Add AES-SIV support (single block only) 2025-11-12 14:39:05 +01:00
Martijn de Milliano d7041ea176 Add HKDF support 2025-11-12 11:37:18 +01:00
Lealem Amedie 5c7e1ee15f Detect availability of ML-KEM for USE_LOCAL_WOLFSSL 2025-11-06 13:28:21 -07:00
Lealem Amedie c6dd1eaf21 Prepare for v5.8.2 release 2025-07-24 12:31:54 -06:00
Koji Takeda 24993ad370 Use HAVE_DILITHIUM flag to judge ML-DSA enablement 2025-03-07 08:03:32 +09:00
Koji Takeda c59e5910d1 Fix details by hand 2025-03-03 16:14:07 +09:00
Devin AI b501989317 Support ML-DSA
Co-Authored-By: Koji Takeda <takeda@wolfssl.com>
2025-03-03 16:11:37 +09:00
Koji Takeda 2e2d9cd338 Remove the --enable-experimental configure option 2025-02-22 07:42:29 +09:00
Koji Takeda db90b836a2 Support ML-KEM 2025-02-21 17:04:40 +09:00
Jack Tjaden fd704f59dd Fix for jenkins test 2024-10-01 12:24:13 -06:00
Jack Tjaden b1a1dffbcf Added working test for chacha20poly1305 2024-09-26 13:22:12 -06:00
Jack Tjaden 6cbf8db220 Rough adding of chacha20poly1305 2024-09-13 14:23:14 -06:00
Lealem Amedie dc3a326d64 Add user settings path for scripts/user_settings_asm.sh during cmake 2023-04-19 12:52:59 +02:00
Hayden Roche 352219fc87 Make several improvements to the CFFI build process.
- Move _build_ffi.py to scripts/build_ffi.py. Do as little in the global
namespace of the script as possible by putting functionality into functions,
including a new main function.
- Improve feature detection by allowing user_settings.h in addition to
options.h. This is particularly useful on Windows.
- Add the windows directory. This contains subdirectories non_fips and
fips_ready, which each have a user_settings.h. The non_fips user_settings.h is
used by the build script to build on Windows with CMake, when not using
USE_LOCAL_WOLFSSL. The fips_ready user_settings.h is an example user_settings.h
that works with our FIPS Ready code and wolfcrypt-py.
- Improve Windows support. This commit modifies the way we build wolfSSL for
wolfcrypt-py on Windows. Instead of using CMake directly, we use it with
user_settings.h. This is typically how Windows users are building wolfSSL, and
it gets around some shortcoming of wolfSSL's CMake support (e.g. not all
required features are supported). Additionally, USE_LOCAL_WOLFSSL now works
properly on Windows. When using USE_LOCAL_WOLFSSL, it should point to a wolfSSL
source code directory. This works for FIPS bundles, too. Finally, for FIPS on
Windows, we only support DLL builds. The CFFI library (.pyd extension) requires
this DLL to work. build_ffi.py detects this scenario and copies the .dll into
the wolfcrypt package directory. I've modified setup.py to distribute the
.dll with the package.
- Add some missing FIPS gates. Testing against FIPS v2 triggered some errors.
Those are fixed in this commit.
2022-11-03 14:56:04 +01:00