Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
9829e9a
Disarm ChaCha when set_iv() rejects the nonce length (F-10069)
julek-wolfssl Sep 24, 2026
4e2297b
Validate ECC public keys with wc_ecc_check_key on import (F-8277)
julek-wolfssl Sep 24, 2026
eab7984
Size ECC private key DER buffer with wc_EccKeyDerSize (F-10070)
julek-wolfssl Sep 24, 2026
cf14611
Detect AES-CTR support before declaring wc_AesCtrEncrypt (F-11250)
julek-wolfssl Sep 24, 2026
f0aa5b4
Declare AES-CBC functions only when wolfSSL provides them (F-12224)
julek-wolfssl Sep 24, 2026
ff57e54
Gate streaming AES-GCM decryption on wolfSSL decrypt support (F-12225)
julek-wolfssl Sep 24, 2026
7adb4ef
Declare SHA-3 functions only for sizes wolfSSL provides (F-12226)
julek-wolfssl Sep 24, 2026
faa714b
Detect HKDF only when wolfSSL also provides HMAC (F-13020)
julek-wolfssl Sep 24, 2026
170eb25
Declare wc_PBKDF2 only when wolfSSL builds PBKDF2 with HMAC (F-12232)
julek-wolfssl Sep 24, 2026
fbbafcc
Detect PEM-to-DER and DER-to-PEM support separately (F-12233)
julek-wolfssl Sep 24, 2026
6d50144
Declare wc_GetPkcs8TraditionalOffset only with PKCS#8 support (F-12234)
julek-wolfssl Sep 24, 2026
8278bc0
Declare RNG functions only when wolfSSL builds its RNG (F-13021)
julek-wolfssl Sep 24, 2026
92637e0
Declare RSA operations only when wolfSSL builds them (F-12227)
julek-wolfssl Sep 24, 2026
ac0ad02
Declare ECC operations only when wolfSSL builds them (F-12228)
julek-wolfssl Sep 24, 2026
9f49dcb
Validate ECC private keys with wc_ecc_check_key on import
julek-wolfssl Sep 28, 2026
804e7b6
Declare Ed25519 operations only when wolfSSL builds them (F-12229)
julek-wolfssl Sep 24, 2026
b68ac46
Declare Ed448 operations only when wolfSSL builds them (F-12230)
julek-wolfssl Sep 24, 2026
f355ced
Declare ML-KEM operations only when wolfSSL builds them (F-12231)
julek-wolfssl Sep 24, 2026
ec92c44
Declare ML-DSA operations only when wolfSSL builds them (F-10071)
julek-wolfssl Sep 24, 2026
1605cd9
Detect ML-DSA no-context macros on the last line (F-13023)
julek-wolfssl Sep 28, 2026
67fcb87
Detect feature macros regardless of indentation or value (F-8281)
julek-wolfssl Sep 28, 2026
e400e17
Check the digest size in ECDSA sign() and verify() (F-8279)
julek-wolfssl Sep 24, 2026
d758f98
Check the digest size in ECDSA sign_raw() and verify_raw() (F-8280)
julek-wolfssl Sep 24, 2026
4ed8a9b
Build bundled wolfSSL with -fPIC on every Linux platform
julek-wolfssl Sep 25, 2026
4156293
Run CI on arm64 Linux too
julek-wolfssl Sep 25, 2026
6dc3958
Address review: create RSA RNG on first use
julek-wolfssl Sep 29, 2026
71e2799
Fix CI: restore patched cffi lib flags without monkeypatch
julek-wolfssl Nov 2, 2026
9ca00b0
Address review: return PEM/DER vectors in no-ASN builds
julek-wolfssl Nov 3, 2026
b12c916
Address review: test RSA verify without an RNG
julek-wolfssl Nov 3, 2026
48ecd5a
Address review: gate wc_CryptoInfo.rng on RNG support
julek-wolfssl Nov 6, 2026
ff92018
Address review: gate key DER functions on ASN
julek-wolfssl Nov 6, 2026
45bb337
Address review: gate wc_RsaKeyToPublicDer on certificate support
julek-wolfssl Nov 6, 2026
eb05d5f
Address review: detect features with the C preprocessor
julek-wolfssl Nov 6, 2026
8c3d7ec
Fix CI: do not require setuptools to preprocess the headers
julek-wolfssl Nov 9, 2026
f1ec757
Fix CI: add blank lines required by ruff
julek-wolfssl Nov 12, 2026
67588c8
Address review: validate ECC keys, fix detection and gate tests
julek-wolfssl Nov 17, 2026
1fc7aff
Fix CI: build the reduced wolfSSL configs without features they can't…
julek-wolfssl Nov 17, 2026
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
76 changes: 75 additions & 1 deletion .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ permissions:
jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, ubuntu-24.04-arm ]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v7
Expand Down Expand Up @@ -154,3 +159,72 @@ jobs:
env:
MALLOC_CHECK_: "3"
run: uv run --no-sync pytest tests

build-reduced:
# wolfSSL builds without optional features must build, import and pass.
strategy:
fail-fast: false
matrix:
include:
- name: no-asn
flags: --disable-asn --disable-rsa --disable-rsapss --disable-pkcs7
- name: no-rng-cryptocb
# wolfSSL needs the RNG for PKCS#7, AES-GCM streaming and key
# generation.
flags: >-
--disable-rng --disable-pkcs7 --disable-aesgcm-stream
--disable-keygen
--enable-cryptocb --enable-cryptocbutils=copy,free
- name: no-ecc-sign
# wolfSSL PKCS#7 needs ECC signing.
flags: --disable-pkcs7
cflags: -DNO_ECC_SIGN

name: build-reduced (${{ matrix.name }})
runs-on: ubuntu-latest
env:
USE_LOCAL_WOLFSSL: ${{ github.workspace }}/wolfssl-install

steps:
- uses: actions/checkout@v7
with:
submodules: recursive
- name: Set up Python 3.10
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
# Install a specific version of uv.
version: "0.11.26"
- name: Install build deps
run: |
sudo apt-get update
sudo apt-get install -y autoconf automake libtool
- name: Build wolfSSL
run: |
cd lib/wolfssl
./autogen.sh
./configure --enable-cryptonly --disable-shared --disable-crypttests \
--enable-aes --enable-aesgcm --enable-aessiv \
--enable-aesctr --enable-aesgcm-stream \
--enable-des3 --enable-chacha --enable-poly1305 \
--enable-sha --enable-sha384 --enable-sha512 --enable-sha3 \
--enable-hkdf --enable-rsa --enable-rsapss --enable-ecc \
--enable-ed25519 --enable-ed448 --enable-curve25519 \
--enable-keygen --enable-pwdbased --enable-pkcs7 \
--disable-md5 --disable-sha224 --disable-dh \
--disable-oldtls --disable-oldnames --disable-extended-master \
${{ matrix.flags }} \
CFLAGS="-fPIC ${{ matrix.cflags }}" \
--prefix=$GITHUB_WORKSPACE/wolfssl-install
make
make install
- name: Install wolfcrypt-py against the local wolfSSL
run: |
uv venv
uv pip install pytest
uv pip install -e .
- name: Run tests
run: uv run --no-sync pytest tests
13 changes: 13 additions & 0 deletions ChangeLog.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
wolfCrypt-py Unreleased
=======================

* Build against wolfSSL builds that leave out optional features. Methods for
operations the linked wolfSSL does not provide are not defined.
* ECC: `sign()` and `sign_raw()` raise `ValueError` when the input is not
`WC_MIN_DIGEST_SIZE` to `WC_MAX_DIGEST_SIZE` bytes long. `verify()` and
`verify_raw()` return `False` for such inputs.
* ECC: Key import checks the key with `wc_ecc_check_key()`, and that a private
key matches its public key. A key that fails is not kept. This makes a P-256
import take about 0.3 to 0.8 ms.


wolfCrypt-py Release 5.9.2 (Jul 16, 2026)
==========================================

Expand Down
5 changes: 3 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ should be set equal to the installation path for the wolfSSL library:

If building wolfcrypt-py against a local wolfSSL library, wolfcrypt-py
will attempt to do native feature detection to enable/disable wolfcrypt-py
features based on how native wolfSSL has been compiled. It uses the
<wolfssl/options.h> header to do feature detection.
features based on how native wolfSSL has been compiled. It runs the C
preprocessor over <wolfssl/options.h> and the wolfSSL headers to do feature
detection.

After this the local build can be installed from the locally built wheel in dist.

Expand Down
Loading
Loading