User Story
As the security team,
I need offline authentication to be cryptographically secure,
So that cached credentials cannot be easily compromised.
Acceptance Criteria
Technical Details
Crypto Specifications
Password Hashing (Argon2id)
- Memory: 19 MiB (19456 KiB)
- Iterations: 2
- Parallelism: 1
- Output: 32 bytes
- OWASP recommended parameters
Key Derivation (PBKDF2-HMAC-SHA256)
- Iterations: 100,000
- Salt: 16 bytes (random per user)
- Output: 32 bytes (AES-256 key)
Encryption (AES-256-GCM)
- IV: 12 bytes (random per write)
- Auth tag: 16 bytes
- Already used by secret_store module
Security Mitigations
| Threat |
Mitigation |
| GPU/ASIC attacks |
Argon2id memory-hard |
| Cache theft |
Encrypted, unusable without password |
| Tampering |
GCM authentication tag |
| Stale creds |
Configurable expiration |
| Weak passwords |
Minimum length enforcement |
| File access |
0600 permissions, root only |
Limitations
- Compromised local password = access to cached data
- No immediate revocation (must wait for expiration)
- MFA not available offline
- Should use short expiration for sensitive data
Tests to Implement
- test_offline_cache.c
- Hash/verify password
- Encrypt/decrypt user data
- Expiration checking
- Tamper detection
- Invalid password rejection
Component
Repo: llng-pam-module (C)
Files: tests/test_offline_cache.c (new)
User Story
As the security team,
I need offline authentication to be cryptographically secure,
So that cached credentials cannot be easily compromised.
Acceptance Criteria
Technical Details
Crypto Specifications
Password Hashing (Argon2id)
Key Derivation (PBKDF2-HMAC-SHA256)
Encryption (AES-256-GCM)
Security Mitigations
Limitations
Tests to Implement
Component
Repo: llng-pam-module (C)
Files: tests/test_offline_cache.c (new)