Sources/Vault/KeychainHelper.swift |
Device-bound key storage via kSecAttrAccessibleWhenUnlockedThisDeviceOnly, and the read path that refuses to conflate “no key yet” with “could not read the key” |
Sources/Vault/KeyDerivation.swift |
The one PBKDF2-HMAC-SHA256 implementation in the codebase, and the HKDF-SHA256 subkey derivation — including why a random 256-bit input is expanded rather than stretched |
Sources/Vault/VaultKeyBackup.swift |
Passphrase-wrapped key export and import — PBKDF2-SHA256 at 600,000 iterations then AES-GCM, written to an air-gapped .nudefndrkey file that is never uploaded |
Sources/Security/Authenticator.swift |
App Lock — the single grace rule (left while unlocked under 60 seconds ago, stamped once when the app goes from unlocked to locked), and Instant Lock voiding a Face ID already in progress |
Sources/Vault/PinAttemptThrottle.swift |
The PIN attempt delay — measured on a monotonic clock the date setting cannot move, kept in the Keychain across a reinstall, and an unreadable record counts as a lockout |
Sources/Vault/PanicPinStore.swift |
PIN credential storage — a salted PBKDF2-SHA256 hash at 310,000 iterations in the Keychain, ThisDeviceOnly, written in place and never as the PIN itself |
Sources/Camera/VaultCameraController.swift |
The vault camera’s capture session — the bytes go from AVCapturePhotoOutput to memory to the vault’s sealing path, and neither PHPhotoLibrary nor a temporary file appears anywhere in it |
Sources/Scanner/SensitiveContentService.swift |
The SensitiveContentAnalysis wrapper — on-device, no network calls, and how the app detects whether the system setting is switched on |
Sources/Scanner/DocumentDetectionService.swift |
On-device Documents & IDs detection via Apple Vision — no network calls; conservative structural checks (Luhn / IBAN mod-97 / passport MRZ) |
Sources/Models/SensitiveAsset.swift |
The scan result model — local only, no telemetry fields |
Sources/Purchases/PurchaseManager.swift |
The whole purchase path, written against Apple’s StoreKit 2 — product list, purchase, restore and entitlement checks, verified on the device. No third-party SDK, no account, no user identity |
Sources/Purchases/ProEntitlementCache.swift |
The locally cached Pro flag the UI reads, so a launch does not gate features on a network round-trip |
Sources/FAQ/FAQPages.swift |
The in-app FAQ — four self-contained pages in the app bundle (en, ja, th, zh), read from disk with no network code |
Sources/FAQ/FAQWebPage.swift |
The FAQ renderer — non-persistent data store, baseURL: nil; the FAQ carries no links and loads nothing; every navigation but its own page is refused |
Sources/Vault/VaultIntake.swift |
The path every photo takes into the vault, imported, captured, from the Lock Screen or from the share sheet — metadata removed by MetadataStrip, then sealed with ChaCha20-Poly1305 and written with complete file protection |
Sources/Privacy/MetadataStrip.swift |
The one metadata strip, shared by the vault and Clean & Share — GPS, EXIF, TIFF, IPTC, XMP and every camera maker’s notes removed with ImageIO, orientation kept, and a clean copy checked against an allow-list before it leaves the phone |
Sources/LockScreenCamera/LockedCaptureFormat.swift |
The Lock Screen camera’s sealed file — HPKE (X25519, HKDF-SHA256, ChaCha20-Poly1305) to a public key, the whole header as authenticated data, the capture time inside the ciphertext. The camera can seal but never open |
Sources/LockScreenCamera/LockedCaptureKeyring.swift |
The private keys that open captures — sealed with ChaCha20-Poly1305 under an HKDF subkey of the vault key, stored inside the vault, rotated every 30 days |
Sources/LockScreenCamera/LockedCaptureInbox.swift |
Waiting captures — read by header only, size-capped, kept out of device backups, and made unopenable once taken in |
Sources/ShareToVault/SharedVaultInbox.swift |
Save to Vault in the share sheet — each photo checked, sealed with HPKE to a public key, written whole with complete file protection and kept out of device backups |
Sources/Vault/VaultAlbumStore.swift |
Album names and photo labels — sealed with ChaCha20-Poly1305 under an HKDF subkey of the vault key, written atomically with complete file protection |
评论