You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by as...@apache.org on 2026/05/05 20:52:27 UTC
(tooling-agents) branch main updated: ASVS audit: 11.3.5.md (redacted) [source: apache/steve/v3 @ d0aa7e9]
This is an automated email from the ASF dual-hosted git repository.
asf-tooling pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-agents.git
The following commit(s) were added to refs/heads/main by this push:
new 349a2bc ASVS audit: 11.3.5.md (redacted) [source: apache/steve/v3 @ d0aa7e9]
349a2bc is described below
commit 349a2bc51b3ed3e593f76dea01d0f0afdde50416
Author: ASF Tooling Team <ro...@apache.org>
AuthorDate: Tue May 5 22:52:05 2026 +0200
ASVS audit: 11.3.5.md (redacted) [source: apache/steve/v3 @ d0aa7e9]
---
ASVS/reports/steve/v3/d0aa7e9/all/11.3.5.md | 73 +++++++++++++++++++++++++++++
1 file changed, 73 insertions(+)
diff --git a/ASVS/reports/steve/v3/d0aa7e9/all/11.3.5.md b/ASVS/reports/steve/v3/d0aa7e9/all/11.3.5.md
new file mode 100644
index 0000000..6243d8e
--- /dev/null
+++ b/ASVS/reports/steve/v3/d0aa7e9/all/11.3.5.md
@@ -0,0 +1,73 @@
+# Security Audit Report: ASVS 11.3.5
+
+## Executive Summary
+
+| Field | Value |
+|-------|-------|
+| **Repository** | apache/steve/v3 |
+| **Audit Date** | May 05, 2026 |
+| **Auditor** | Tooling Agents (bundled-pass mode) |
+| **ASVS Requirement** | ASVS 11.3.5 |
+| **Files Analyzed** | 6 relevant / 49 total |
+| **Files Skipped** | 12 |
+
+**Requirement description:** Verify that any combination of an encryption algorithm and a MAC algorithm is operating in encrypt-then-MAC mode.
+
+### Findings Overview
+
+| Severity | Count |
+|----------|-------|
+| 🔴 Critical | 0 |
+| 🟠High | 0 |
+| 🟡 Medium | 0 |
+| 🟢 Low | 0 |
+
+---
+
+## ASVS-11.3.5: Encrypt-then-MAC Mode
+
+### Findings for 11.3.5
+
+No findings detected.
+
+### Security Controls Inventory for 11.3.5
+
+| Control | Location | Coverage Status |
+|---------|----------|-----------------|
+| Fernet authenticated encryption | `crypto.py:create_vote()` line 72 | ✅ Fernet implements encrypt-then-MAC |
+| Fernet authenticated decryption | `crypto.py:decrypt_votestring()` line 79 | ✅ MAC verified before decryption |
+
+### Positive Patterns for 11.3.5
+
+1. **Fernet specification compliance**: Fernet computes `HMAC-SHA256(signing_key, Version ‖ Timestamp ‖ IV ‖ Ciphertext)`. The MAC covers the ciphertext (encrypt-then-MAC), which is the correct mode of operation. MAC verification occurs before any decryption attempt.
+2. **No custom MAC+cipher combinations**: The system does not implement any custom encrypt/MAC combinations that could violate this requirement — it relies entirely on the well-audited `cryptography` library's Fernet implementation.
+
+---
+
+
+
+## Cross-cutting Architecture Observations
+
+1. **Cryptographic Architecture is Well-Designed**: The multi-layered approach (election data → BLAKE2b → Argon2 → opened_key; then opened_key + identifiers → Argon2 → vote_token → HKDF → encryption key) provides defense in depth with appropriate separation of concerns.
+
+2. **Argon2 Variant Inconsistency**: The benchmark function uses `Type.ID` (Argon2id) while production uses `Type.D` (Argon2d). This appears to be an oversight rather than a deliberate design choice, as there's no documented rationale for choosing Argon2d.
+
+3. **Fernet as Transitional Algorithm**: The code explicitly marks Fernet as temporary (comments mention switching to XChaCha20-Poly1305). The HKDF `info` parameter is already set for XChaCha20, which could cause key equivalence issues during migration if not properly managed.
+
+4. **No Password Storage**: The system delegates authentication to external infrastructure (ASF/LDAP), meaning traditional password hashing requirements (11.4.2) have limited direct applicability. The Argon2 usage is for key derivation and anti-tamper rather than password verification.
+
+5. **Anti-Tamper Integrity**: The `opened_key` mechanism provides cryptographic assurance that election configuration hasn't been modified after opening — a strong integrity control binding election metadata, issues, and voter lists.
+
+## Cross-cutting Recommendations
+
+### Immediate (Critical/High Priority)
+1. **Switch Argon2 variant to Argon2id** (`Type.ID`): Single-line change in `_hash()` function, aligning production with benchmark code and OWASP recommendations. This affects all derived keys.
+
+### Short-term (Medium Priority)
+2. **Plan migration path for Fernet → XChaCha20-Poly1305**: Ensure the HKDF `info` parameter changes during migration to prevent key reuse across algorithms. Document the migration strategy for existing encrypted votes.
+3. **Review Argon2 parameters against current hardware**: Run `benchmark_argon2()` on production hardware to determine if `time_cost` can be increased (current value of 2 is the minimum recommended).
+
+### Long-term (Low Priority)
+4. **Consider BLAKE2b → SHA-512 substitution**: If strict NIST compliance is required, replace BLAKE2b with SHA-512 for the data reduction step. Functionally equivalent with no performance concern for the single-call use case.
+5. **Add cryptographic agility documentation**: Document the algorithm choices, migration strategy, and key derivation chain in a security design document to support future audits.
+
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org