Implement Android TOTP and confirmed HOTP presentation (#107)
This commit is contained in:
1 parent
d466b170ab
commit
6a864a8d7f
26 files changed
+1938
-94
No files matched your search
@@ -0,0 +1,49 @@
|
||||
# Android one-time passwords
|
||||
|
||||
Issue [#107](https://git.rfc1437.de/hugo/IronStorage/issues/107) connects the TOTP
|
||||
destination to the storage-owned discovery catalog. Opening the list reads cached
|
||||
metadata without decrypting entries. Select a row, then Unlock to display its
|
||||
issuer, account, grouped code, countdown and progress. Refresh TOTP catalog is an
|
||||
explicit authenticated discovery action; the progress/search workflow belongs
|
||||
to [#110](https://git.rfc1437.de/hugo/IronStorage/issues/110).
|
||||
|
||||
The normal entry viewer and TOTP detail use the same code component and native
|
||||
viewer controller. Decryption, creation and editing reconcile the catalog in
|
||||
Rust. Only nonsecret row identities and revisions are restored after recreation.
|
||||
OTP parameters, codes and authentication secrets are never persisted by Kotlin.
|
||||
|
||||
Rust computes SHA1/SHA256/SHA512 codes, six/eight digits, custom periods, absolute
|
||||
validity boundaries, grouping and countdown. The composed code component owns a
|
||||
STARTED-lifecycle coroutine that submits OS clock facts without touching the
|
||||
authentication lease. Scrolling it out or leaving stops decryption/countdown ticks;
|
||||
an expiry-only native window check still erases held codes when hidden. Rust validates each
|
||||
returned window before publication, including delayed results and backward clock
|
||||
changes. Lock, background, expiry, entry changes and stale revisions remove codes
|
||||
and cancel presentation. Explicit copies use the existing sensitive clipboard
|
||||
adapter and Rust timeout/ownership checks.
|
||||
|
||||
HOTP in the normal entry viewer requires Generate next HOTP code and a separate
|
||||
counter confirmation. The existing pass-otp core increments and atomically commits
|
||||
the encrypted counter before returning its code. Refresh and Copy use that same
|
||||
committed counter without incrementing. Stale documents, open editors, failed Git
|
||||
commits and overflow cannot consume a counter. The TOTP discovery catalog remains
|
||||
specific to time-based entries. Android exposes no Watch sharing controls.
|
||||
|
||||
## Validation
|
||||
|
||||
Rust tests cover RFC 6238 algorithm vectors, six/eight digits, 30/60-second
|
||||
boundaries, cache agreement, polling without lease renewal, malformed URI
|
||||
diagnostics, stale revision revocation, HOTP confirmation, copy/refresh stability,
|
||||
commit rollback and counter overflow. Android's NativeOtpPresentationTest uses
|
||||
real encrypted stores with fake wall/lease clocks to verify catalog-only reads,
|
||||
boundary transitions, tick lease expiry, clipboard handoff expiry, queued user
|
||||
actions overtaking read-only observations, both HOTP generations and background
|
||||
revocation. TotpScreenTest covers explicit unlock, grouped code/countdown/copy,
|
||||
lock cleanup, HOTP confirm/cancel, tick cancellation on leaving and 300% text
|
||||
without clipped digits. Computer use inspects the same Compose
|
||||
components on an ARM64 emulator using disposable presentation fixtures.
|
||||
|
||||
All emulator installs preserve the retained app container. Production Keystore
|
||||
and biometric enrollment are unchanged by this story; the native controller tests
|
||||
provide deterministic OS capability callbacks. Supported release ABIs remain
|
||||
arm64-v8a and armeabi-v7a; physical devices and x86_64 are outside this milestone.
|
||||
@@ -31,7 +31,7 @@ Every issue linked here belongs to milestone 23.
|
||||
| OTP URI input, camera/image import, review before Save (OtpImportViewController; TOTP Add action) | mobile_entry::MobileEntryDraft::add_otp_image; document/otp/presentation | CameraX frames or Android photo picker bytes; Rust decode and field construction | #103/#106/#107; URI/image/scan parity, invalid/oversized input, cancel; no payload parsing in Kotlin |
|
||||
| Move/copy/delete entries and folders, destination browse, overwrite and dirty-editor handling (PasswordMutationCoordinator) | mobile_mutation::MobileMutationService/Plan/Request; mutation | Compose dialogs/destination picker | #108; revisions, destination conflicts, recipient reencryption and rollback |
|
||||
| TOTP discovery catalog, incremental progress, warm cache, refresh, cancel/resume, cached search (TotpListViewController) | mobile_totp discovery/catalog/operation; mobile_authentication cached/search APIs | Compose list/progress/search; private no-backup catalog | #90/#110; cold/warm/change/add/remove/corrupt/wrong-store/concurrent-change tests |
|
||||
| TOTP rows, large detail code, countdown/expiry, copying (TotpDetailViewController, TotpCodeView) | mobile_totp::MobileTotpPage/Detail; otp; mobile_authentication::{totp_detail,copy_totp_code} | Compose code/detail; OS clock facts, Rust timing | #107/#100; RFC vectors, boundary countdown, stale callback/relock and clipboard |
|
||||
| TOTP rows, large detail code, countdown/expiry, copying (TotpDetailViewController, TotpCodeView) | mobile_totp::MobileOtpCodePresentation; otp; mobile_authentication::{presented_otp_code,copy_presented_otp_code,advance_presented_hotp} | Compose code/detail; OS clock facts, Rust timing | #107/#100; [OTP behavior and evidence](otp.md), RFC vectors, boundary countdown, stale callback/relock and clipboard |
|
||||
| Repository/server identity, local-only/add-remote Settings, token replace/remove (PreferencesViewController, TokenUpdateViewController) | mobile_authentication::MobilePreferences; mobile_onboarding::replace_configured_application_token; config/secret_store | Compose Settings/facade | #104/#95; no token display; protected replacement/removal and offline operation |
|
||||
| Key identity/fingerprint, GPG recovery import and public/private QR export (KeyImportScannerViewController, KeyExportListViewController, KeyQrExportViewController) | mobile_key_transfer::{MobileKeyTransferService,MobileKeyTransferImport}; crypto/presentation | CameraX Preview/ImageAnalysis; animated Rust-provided matrices | #106/#104; multi-frame order/duplicates/interruption, bounded frames, private export authorization and camera denial |
|
||||
| Inactivity timeout, biometric enable/disable, Lock Now, appearance and Git commit name/email | mobile_authentication preference setters, git_identity; config | Compose Settings, BiometricPrompt, system/light/dark theme | #98/#104; persistent settings, validation, Keystore enrollment/recovery and lease revocation |
|
||||
|
||||
Reference in new issue
Block a user