Commit Graph

15 Commits (a59a4f8b965c8ad42c6af95c80fc3873e77cd0cc)

Author SHA1 Message Date
sebastian-carpenter a59a4f8b96 update license to GPLv3 2026-07-09 18:24:23 +02:00
David Garske 1cb9b5d6c1
Merge pull request #133 from roberthdevries/pipeline-use-uv-and-ruff
Change workflow to using uv and ruff.
2026-07-08 12:26:11 -07:00
Robert de Vries 3078cd5b69 Change workflow to using uv and ruff.
uv is used to manage virtual environments and building wheels and
source distributions.
This replaces tox.
ruff is used to do static checking.
README is updated to reflect this change.
2026-07-06 22:29:31 +02:00
Robert de Vries 7f82b412e3 Address more review comments. 2026-07-06 22:02:48 +02:00
Robert de Vries 747243cc50 Address more review comments.
Tests are now also type checked as this helps verifying the correctness
of the type annotations.
2026-07-06 22:02:48 +02:00
Robert de Vries 2081edd6d7 Add typing information to ciphers.py
This has some fallout in random.py to simplify checks.
Also one test is slightly adapted to produced the desired failure.
2026-07-06 22:02:48 +02:00
Robert de Vries d1ac3d5f37 Add typing: asn, exceptions, hashes, hkdf, pwdbased, utils. 2026-07-06 22:02:46 +02:00
David Garske 257151a82c
Merge pull request #127 from roberthdevries/enable-more-ruff-checks
Enable more ruff rules requiring only minor or no fixes.
2026-07-06 08:19:19 -07:00
Robert de Vries ba7f942657 Reinstate the possibility to run coverage tests using make cov. 2026-07-05 16:35:30 +02:00
Robert de Vries fe648f183b Remove obsolete boiler plate comment from the ruff example configuration. 2026-07-04 16:54:59 +02:00
Robert de Vries 7edbd3e45c Enable more ruff rules requiring only minor or no fixes.
Extra rules:
All E pycodestyle error rules
C4   flake8-comprehensions
DTZ  flake8-datetimez
EXE  flake8-executable
FA   flake8-future-annotations
INT  flake8-gettext
ISC  flake8-implicit-str-concat
ICN  flake8-import-conventions
LOG  flake8-logging
G    flake8-logging-format
RSE  flake8-raise
SLOT flake8-slots
TID  flake8-tidy-imports
TC   flake8-type-checking
FLY  flynt
PERF Perflint
W    pycodestyle warnings
FURB refurb

Ignore E501:  line too long
2026-07-04 16:54:56 +02:00
sebastian-carpenter dbb21f3a99 modify version bounds for dependencies
* Remove bound for maximum version
 * Synchronize minimum version for cffi to 1.17
2026-06-24 12:07:02 -06:00
Andrew Hutchings ef4195f99a Address Fenrir findings
F-3340: AesGcmStream.final decrypt path passed len(authTag) straight to
wc_AesGcmDecryptFinal, letting a caller truncate the verification window
(forgery probability ~2^-32 instead of 2^-128 for a 4-byte tag against a
16-byte configuration). Reject len(authTag) != self._tag_bytes and pass
self._tag_bytes to wolfSSL, mirroring ChaCha20Poly1305.decrypt. Added
test_decrypt_rejects_wrong_tag_length. Also fixed test_encrypt_short_tag
which was relying on the bug (decrypt side defaulted to tag_bytes=16
against a 12-byte tag).

F-3089: Declare label as const byte* in the wc_RsaPublicEncrypt_ex and
wc_RsaPrivateDecrypt_ex cdefs so CFFI can accept Python bytes without
exposing a writable pointer into immutable memory. wolfSSL does not
modify label.

F-3090: Declare nonce as const byte* in the wc_InitRngNonce and
wc_InitRngNonce_ex cdefs for the same reason.

F-1983, F-1984: Add minimum + upper bounds to requirements/{prod,test,
docs}.txt so a hijacked release of cffi, tox, pytest, types-cffi,
Sphinx, or sphinx_rtd_theme does not get pulled silently on the next
pip install. setup.txt resolves transitively via prod.txt.
2026-05-12 13:15:35 +01:00
Robert de Vries 3ae2756759 Fix errors in pyproject.toml sections for ruff.
Also add entry in ChangeLog mentioning that older Python versions
are no longer supported.
2026-04-28 20:22:25 +02:00
Robert de Vries 4dbd4951ea Convert python project configuration to pyproject.toml.
Modern python projects standardize on pyproject.toml to reduce
the number of configuration files required for all tools.
2026-04-27 16:17:15 +02:00