v2.0.1
pydlock v2.0.1 — first published v2 release. A dead-simple password padlock for files: pydlock lock <file> / unlock, or from Python.
Breaking: new on-disk file format. Files locked by pydlock 1.x still decrypt transparently (re-locking upgrades them); the last 1.x release stays installable via pip install 'pydlock<2'.
New in v2
- Salted, memory-hard scrypt KDF (
n=32768, r=8, p=1) with a fresh per-file random salt, replacing the unsalted single-pass SHA-256. Cipher remains Fernet (AES-128-CBC + HMAC-SHA256); no custom crypto. - Self-identifying, versioned on-disk envelope (
PYDLOCKmagic + JSON header of KDF params + salt). Hardened against malicious headers: scrypt cost parameters are validated and bounded before use, so a crafted file can't force excessive memory/CPU on decrypt. - Transparent v1 legacy decryption — non-magic (v1) files are detected and decrypted with the old scheme, so nothing is stranded.
- Binary files no longer corrupted — raw-bytes I/O; executables round-trip losslessly.
- Crash-safe atomic writes.
- Removed the
python/rundecrypt-and-execute subcommands (a security footgun). encrypt/decryptCLI aliases + apydlockconsole entry point.- Packaging:
pyproject.toml(hatchling), declared thecryptographydependency, offline pytest suite, ruff, CI (Python 3.10–3.13), OIDC Trusted Publishing.
2.0.1
- Fix: the public
password=argument accepted bytes but crashed on astr; passwords are now accepted as str or bytes. (2.0.0 was a pre-release validated on TestPyPI and never published to production PyPI.)