Skip to content

v2.0.1

Choose a tag to compare

@ErickShepherd ErickShepherd released this 08 Jul 23:21

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 (PYDLOCK magic + 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/run decrypt-and-execute subcommands (a security footgun).
  • encrypt/decrypt CLI aliases + a pydlock console entry point.
  • Packaging: pyproject.toml (hatchling), declared the cryptography dependency, 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 a str; passwords are now accepted as str or bytes. (2.0.0 was a pre-release validated on TestPyPI and never published to production PyPI.)