EPIC-06b: PIN authentication provider (linux-hello-pin) #18

Closed
opened 2026-07-27 11:24:08 +02:00 by elegos · 0 comments
Owner

Summary

Implement the PIN authentication provider (linux-hello-pin) as a fallback authenticator.

Scope

  • argon2id hashing and verification (hash.rs)
  • Per-user PIN hash storage in SQLite (db.rs + migration_pin.sql)
  • Stateless PinProvider that receives the stored hash from the daemon (provider.rs)
  • Rate limiting is not in scope for this crate — enforced by the daemon

Trust score

PIN → 40 (lowest non-recovery score, per §2 Trust Model)

Acceptance criteria

  • hash_pin / verify_pin roundtrip correct for valid PINs
  • PINs < 4 or > 128 chars rejected at hash and verify time
  • Wrong PIN returns PinError::WrongPinAuthError::Failed
  • store_hash replaces any previous hash (one PIN per user)
  • All proptest tests pass
  • impl AuthProvider for PinProvider in place

Dependencies

EPIC-01 (core types)

LLD

docs/lld/pin-provider.md

## Summary Implement the PIN authentication provider (`linux-hello-pin`) as a fallback authenticator. ## Scope - argon2id hashing and verification (`hash.rs`) - Per-user PIN hash storage in SQLite (`db.rs` + `migration_pin.sql`) - Stateless `PinProvider` that receives the stored hash from the daemon (`provider.rs`) - Rate limiting is **not** in scope for this crate — enforced by the daemon ## Trust score PIN → 40 (lowest non-recovery score, per §2 Trust Model) ## Acceptance criteria - [ ] `hash_pin` / `verify_pin` roundtrip correct for valid PINs - [ ] PINs < 4 or > 128 chars rejected at hash and verify time - [ ] Wrong PIN returns `PinError::WrongPin` → `AuthError::Failed` - [ ] `store_hash` replaces any previous hash (one PIN per user) - [ ] All proptest tests pass - [ ] `impl AuthProvider for PinProvider` in place ## Dependencies EPIC-01 (core types) ## LLD `docs/lld/pin-provider.md`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
elegos/linux-hello#18
No description provided.