Skip to content

OpenSSL Encrypt v1.4.0 -- Stable Release

Choose a tag to compare

@jahlives jahlives released this 03 Mar 16:21
· 813 commits to releases/1.4.x since this release

OpenSSL Encrypt v1.4.0 -- Stable Release

Release Date: 2026-03-03
Branch: releases/1.4.x
Tag: v1.4.0
Python: >= 3.9
License: Hippocratic License 3.0
Tests: 1636 passed, 7 skipped


Overview

v1.4.0 is a major stable release that delivers comprehensive security hardening, new cryptographic features, and infrastructure improvements built over the full development cycle (v1.4.0-alpha.1 through v1.4.0rc2). Highlights include:

  • 14 Dependabot security advisories resolved with defense-in-depth fixes
  • In-memory rekey -- plaintext never touches disk during re-encryption
  • Cascade encryption -- multi-layer defense using chained ciphers
  • Format Version 9/10/11 -- secure chained salt derivation, sequential XOR, and independent XOR key derivation modes
  • Parallel KDF processing -- up to 2.7x speedup on multi-core systems
  • Threefish-512/1024 post-quantum ciphers via Rust/Python integration
  • Server-side infrastructure -- keyserver, pepper storage, integrity verification, and telemetry with mTLS
  • Flutter GUI enhancements -- cascade UI, asymmetric encryption, remote plugins, FIDO2/WebAuthn
  • Flatpak CI/CD pipeline with automated build and publish

Security

Critical: Format Version 9 -- Secure Chained Salt Derivation

SECURITY ADVISORY 2026-01 (CVSSv3 8.1 HIGH)

  • Vulnerability (CWE-330): Format versions <= 8 used predictable salt derivation in multi-round KDF operations, allowing precomputation of all round salts from plaintext metadata. This enabled optimized rainbow table attacks against files encrypted with multiple KDF rounds.
  • Fix: Implemented secure chained salt derivation where each round uses the previous round's output as salt, forcing sequential computation and preventing precomputation attacks.
  • Affected components: All multi-round KDF configurations (Argon2, PBKDF2, Scrypt, Balloon, HKDF) and multi-round hash functions (BLAKE3, BLAKE2b, SHAKE-256).
  • Backward compatible: Files encrypted with format versions 3--8 can still be decrypted.
  • Auto-upgrade: New encryptions automatically use format version 9+.
  • Recommendation: Re-encrypt sensitive files that were encrypted with multi-round KDF and rounds > 1.

In-Memory Rekey (v1.4.0 final)

rekey_file() no longer writes decrypted plaintext to a temporary file on disk. Plaintext is passed directly as bytes to encrypt_file(), eliminating a filesystem race window where plaintext was briefly visible (even with 0o600 permissions) and potentially recoverable on journaling filesystems or SSDs with wear leveling.

Dependabot Advisory Fixes (v1.4.0rc1)

14 security advisories addressed with targeted fixes:

Advisory Fix
GHSA-vfgx-5q85-58q3 CSPRNG for steganography (replaced non-cryptographic random with HMAC-SHA256)
GHSA-j9mh-57cc-665x Added salt parameter to HKDF key derivation
GHSA-743f-89fg-x288 Standard PBKDF2 fallback for new encryptions
GHSA-mcjj-qw7m-j3cp Block pathlib/io sandbox bypass for file operations
GHSA-9pgj-v69p-q586 Synchronized import guard and AST analyzer blocked module lists
GHSA-8jpj-w975-rwv5 Sanitize plugin_id to prevent path traversal
GHSA-43r4-3hf9-m84q Fixed restore_hidden_modules() logging and thread safety
GHSA-c65f-x25w-62jv Changed CORS default from wildcard to empty list
GHSA-2592-7m3g-7fq6 Restricted default trusted proxies to localhost
GHSA-2vhw-q7vh-7xv2 Stopped leaking DB errors in readiness endpoint
GHSA-4rh7-jwg9-m28m Moved refresh token from query params to POST body
GHSA-8h88-gxp3-j7pg Verify key bundle signature on deserialization
GHSA-h45m-mgcp-q388 Pluggable backend for TOTP rate limiter
GHSA-j48q-4c78-rhf9 Validate .so file paths before loading

Additional security improvements:

Advisory Fix
GHSA-h3m5-p59h-x88p Added --password-file / --password-fd, deprecated --password
GHSA-425g-fjhq-5h92 Raise error when jsonschema unavailable instead of silently passing

8 additional Dependabot alerts resolved via dependency bumps.

Additional Security Measures

  • Input validation for salt, key size, and hash iterations in create_key_from_password
  • Enhanced error handling in secure memory operations
  • Comprehensive test coverage for salt derivation versions (v8 vs v9)

New Features

Cryptographic Features

In-Memory Encryption API

encrypt_file() now accepts bytes/bytearray as input_file and None as output_file, mirroring the pattern decrypt_file() already uses:

# Encrypt bytes, get bytes back (fully in-memory)
encrypted = encrypt_file(
    input_file=plaintext_bytes,
    output_file=None,
    password="secret",
    algorithm=EncryptionAlgorithm.AES_256_GCM,
)

# Decrypt back
plaintext = decrypt_file(
    input_file=encrypted_file_path,
    output_file=None,
    password="secret",
)
  • input_file accepts Union[str, bytes, bytearray]
  • output_file accepts Optional[str] (None returns bytes)
  • Returns Union[bool, bytes]
  • Clear ValidationError when auto-generated pepper is used with bytes input (use --pepper-name instead)
  • Integrity plugin gracefully skipped with warning when input is bytes

Cascade Encryption (Multi-Layer Defense)

Sequential encryption using multiple cipher algorithms with chained HKDF key derivation:

openssl-encrypt encrypt -i secret.txt \
    --cascade "aes-256-gcm,chacha20-poly1305,xcha-poly1305" \
    --password-file /path/to/password
  • Minimum 2 ciphers required, supports unlimited layers
  • Each layer adds entropy to the next layer's key derivation
  • Attacker must break ALL ciphers to decrypt data
  • Automatic cipher diversity validation
  • New metadata format v8 for cascade encryption support

Format Version 10: Sequential XOR Key Derivation

Chains hash/KDF algorithms sequentially, XOR-ing outputs for anti-parallelization. Each algorithm processes the output of the previous one, preventing parallel computation of all rounds.

Format Version 11: Independent XOR Key Derivation (Massey Composition)

openssl-encrypt encrypt -i secret.txt --independent-xor --password-file /path/to/password
  • Each hash/KDF algorithm processes the same original input independently
  • Outputs are XOR'd together for "strongest component" security
  • The derived key is at least as secure as the strongest constituent algorithm
  • Initial SHA-256 normalization for defense-in-depth

Parallel KDF Processing

openssl-encrypt encrypt -i secret.txt \
    --independent-xor --parallel-kdf --kdf-workers 8 \
    --password-file /path/to/password
  • Optional parallel execution using ProcessPoolExecutor
  • ~2.7x speedup with 8 algorithms on 8-core CPU
  • Queue-based progress aggregation with unified display
  • Parallel and sequential modes produce identical keys
  • Uses multiprocessing (not threading) for true CPU parallelism

Threefish Post-Quantum Ciphers

  • Threefish-512 (256-bit post-quantum security level)
  • Threefish-1024 (512-bit post-quantum security level)
  • Memory-hard construction resistant to quantum attacks
  • Native AEAD mode with embedded nonce in ciphertext
  • Maturin-based Rust/Python integration

Rekey Action

openssl-encrypt rekey -i encrypted.bin \
    --password oldpass --rekey-password newpass --force-password

Re-encrypt a file with a new password without exposing plaintext to disk. Decrypts to memory, then encrypts with the new password in a single operation.

Server Infrastructure

Post-Quantum Keyserver

FastAPI-based keyserver for public key distribution:

  • ML-DSA signature verification
  • Bearer token authentication
  • PostgreSQL backend with Docker deployment
  • Public key upload, search, and revocation endpoints

Pepper Storage Module (mTLS-Protected)

Secure remote pepper storage for password hardening:

  • 20 REST API endpoints for pepper management
  • Client-side encrypted pepper storage (server never sees plaintext)
  • TOTP 2FA with QR code generation
  • Deadman switch with configurable check-in intervals and grace periods
  • Panic wipe for emergency pepper deletion

Integrity Verification Module (mTLS-Protected)

Encrypted file metadata hash verification:

  • SHA-256 hash storage for encrypted file metadata
  • Tamper detection with comprehensive audit logging
  • Batch verification (up to 100 files per request)
  • Statistics tracking and verification history

Privacy-Preserving Telemetry

Opt-in anonymous telemetry infrastructure:

  • Plugin-based architecture with configurable data collection
  • Local SQLite buffering before upload
  • Full opt-out with data deletion
  • Activation: --telemetry flag, OPENSSL_ENCRYPT_TELEMETRY=1 env, or config

mTLS Authentication Infrastructure

Certificate-based authentication for pepper and integrity modules:

  • Self-signed CA requirement (public CAs explicitly rejected)
  • Proxy mode (Nginx terminates mTLS) and direct mTLS mode
  • Trusted proxy IP validation
  • Automated certificate management scripts (setup_ca.sh, create_client_cert.sh)

CLI Enhancements

  • --password-file / --password-fd for secure password input (deprecates --password)
  • --integrity / --verify-integrity for remote metadata hash verification
  • --cascade for multi-layer cipher encryption
  • --independent-xor for Massey composition key derivation
  • --parallel-kdf / --kdf-workers for parallel key derivation
  • --rekey action for password rotation
  • Pepper plugin CLI integration with TOTP 2FA support

Flutter GUI Enhancements

  • Cascade encryption configuration across all crypto tabs
  • Asymmetric encryption interface with identity management
  • Remote plugin configuration (pepper, integrity, keyserver)
  • FIDO2/WebAuthn support with YubiKey touch prompts
  • Algorithm picker with grouped display
  • Configuration profiles

Bug Fixes

  • Threefish implementation: Complete Threefish-512/1024 with HKDF key expansion, proper nonce sizes, and AEAD integration
  • Pepper plugin: Fixed critical scoping errors causing 100+ test failures
  • Integrity plugin: Fixed 409 Conflict on re-encryption, corrected file_id computation
  • YubiKey integration: Fixed notification display and touch prompt visibility
  • HSM plugin loading: Fixed dependency management and plugin initialization
  • BLAKE3 buffer compatibility: Fixed buffer sizing for backward compatibility with pre-BLAKE3 files
  • Metadata schema: Made 'mode' field optional in v7 schema for v1.3.4 compatibility
  • Scrypt salt handling: Fixed bytearray to bytes conversion
  • XChaCha20 nonce: Resolved SecureBytes slice handling
  • CLI argument parsing: Fixed --no-estimate flag compatibility with --progress
  • SAST rules: Relaxed AST security scan for built-in plugins
  • Test infrastructure: Fixed pytest-xdist enum serialization and salt derivation test calls

Infrastructure

Flatpak CI/CD

  • Automated flatpak-build with incremental caching
  • Manual flatpak-build:clean for testing without cache
  • flatpak-publish and flatpak-publish:clean for repository publishing
  • Branch-based flatpak naming from setup.py version
  • OSTree repository caching
  • Restricted to releases branches and tags
  • Backward-compatibility test files for v1.0.0, v1.0.3, and v1.1.0 formats

Dependencies

  • liboqs-python 0.12.0 (built from source for HQC support)
  • 8 Dependabot dependency bumps
  • isort 8.0.0 formatting applied across test files

Algorithm Registry

  • Comprehensive cryptographic algorithm registration and validation framework
  • Cipher, hash, KDF, and PQC registries with metadata
  • Runtime validation of algorithm availability

Deprecated

  • Format Version 8: Deprecated due to predictable salt derivation vulnerability. Read support maintained for backward compatibility. New encryptions use format version 9+. Deprecation warning issued when decrypting v8 files.
  • --password flag: Deprecated in favor of --password-file / --password-fd. Still functional but displays deprecation notice.

Compatibility

Backward Compatibility

  • Files encrypted with format versions 3--8 can be decrypted by v1.4.0
  • Files encrypted with v1.3.x (format version 7) are fully compatible
  • All existing CLI flags continue to work

Forward Compatibility

  • Files encrypted with v1.4.0 (format version 9+) require v1.4.0 or newer to decrypt
  • Format version 10 (sequential XOR) requires v1.4.0b7+
  • Format version 11 (independent XOR) requires v1.4.0b10+

Python Support

  • Python 3.9, 3.10, 3.11, 3.12, 3.13

Upgrade Instructions

From v1.3.x

pip install --upgrade openssl-encrypt

Or via Flatpak:

flatpak update com.opensslencrypt.OpenSSLEncrypt

Re-encrypt Sensitive Files

If you previously encrypted files with multi-round KDF (rounds > 1), consider re-encrypting them to use the secure chained salt derivation (format version 9):

openssl-encrypt rekey -i sensitive.enc \
    --password-file /path/to/password \
    --rekey-password-file /path/to/new_password

Verify Installation

openssl-encrypt-check-deps
openssl-encrypt --version

Full Changelog

For the complete list of changes across all pre-release versions (alpha, beta, rc), see CHANGELOG.md.

Pre-release versions included in this stable release:

Version Date Highlights
1.4.0-alpha.1 2025-12-31 Server infrastructure, cascade encryption, Threefish, plugins
1.4.0b7 2026-01-04 Format v10 sequential XOR, algorithm registry
1.4.0b8 2026-01-08 Format v9 security fix, Flatpak CI/CD, Flutter GUI
1.4.0b9 2026-01-09 Test infrastructure fixes, Threefish completion
1.4.0b10 2026-01-11 Format v11 independent XOR, parallel KDF
1.4.0rc1 2026-02-26 14 Dependabot fixes, dependency bumps
1.4.0rc2 2026-02-27 Rekey action, Flatpak compat tests, SAST fixes
1.4.0 2026-03-03 In-memory rekey, bytes API, stable release