feat(crypto): KEY-13 KDF floors + cross-verified golden vectors + downgrade rejection (#15) #197
No reviewers
Labels
No labels
epic
phase-0
phase-1
phase-2
phase-3
phase-4
phase-5
phase-6
phase-7
phase-8
phase-9
priority/P0
priority/P1
priority/P2
type/backend
type/client
type/docs
type/ops
type/security
type/spike
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
primatekuntech/failsulit!197
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/key13-kdf-floors"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes the remaining scope of #15 (exit criteria: floor vectors pass; downgrade-rejection test exists). The OAuth state-signing half (IDA-10) already ships —
IdpStateServiceis asymmetric-signed viaIKeyStore, TTL 10 min, atomic single-use nonce consume — nothing to do there.rust
failsulit-cryptoArgon2Params::meets_key13_floor(tier).pis a validity check (≥ 1): parallelism only parallelizes memory access, it does not lower offline attack cost at fixed m/t (SRS wordingp = 1is the RFC 9106 recommended profile, not a minimum).bytes(range(16))salt) → these are the cross-client contract for the SEC-05/KEY-06 golden-vector suite (desktop native / future WASM / SDK must all derive identical keys).Argon2idStandard(64 MiB, p=4) conforms;Argon2idLow(19 MiB) is below EVERY KEY-13 floor — dormant tier (no wrap path consumes it), behavior unchanged here; filed as a follow-up for the iOS/mobile tier ladder decision.desktop
master_key_serviceargon2id;m=…;t=…;p=…entry and derive under it; unparseable or below-floor entries refuse to derive (KEY-13 downgrade rejection). Previously the stored params were informational only and the derivation always used hardcoded floor params.unlock_with_passphrasenow distinguishes wrong passphrase (ladder counts) from broken wrap state (refusal surfaces immediately) — a tampered params entry can no longer masquerade as an endless "incorrect passphrase" ladder; change/remove flows propagate the refusal too.server backstop
KeyFeature.ValidateKdfFloorenforces the published absolute floor (WASM tier: m ≥ 32768, t ≥ 3) on all three wrap-write paths (self upload/wraps, pairing approve, recovery rekey). Fields remain optional (pre-#15 rows legal); per-tier floors stay client-side per KEY-13.Verification
WrapKdfFloorTests(below-floor m/t → 400 + nothing stored, at-floor 32768/3 accepted, null accepted, pairing-approve below-floor → 400)Follow-ups filed separately
Argon2idLowtier vs KEY-13 native floor (mobile ladder reconciliation)