Security Engineering
How Can an Encrypted Vault Recover Data Without Giving Its Developer the Keys?
An encrypted vault can recover data without developer-held decryption keys when the user retains a separate recovery secret and a usable encrypted backup. The secret unlocks protected key material; the backup supplies the actual records and files. IHP Technology implemented this separation in Krypt, its own encrypted vault product. The public iOS and Android listings retrieved on October 16, 2026 describe version 2.0.0's encrypted backup recovery improvements.
The difficult engineering begins after a key is accepted. Recovery must reject altered archives, distinguish database records from external files, and survive interruption while installing several kinds of state. This article examines the recovery implementation associated with Krypt's mobile Build 39 release and turns those decisions into a verification framework for teams building secure data products. Public availability, inspected source behavior, and recommended deployment checks are separate kinds of evidence.
Define the recovery authority before choosing the workflow
Start by asking who is allowed to regain access after a device disappears. In this design, possession of the matching Rescue Key supplies recovery authority. A support conversation, purchase receipt, or newly chosen PIN does not substitute for that secret. This makes recovery a local cryptographic operation rather than a request for the developer to release a master password.
The other requirement is data availability. A recovery secret cannot reconstruct passwords, documents, or photos that no longer exist in any retained backup. A Kit's QR code represents recovery material, not a copy of the vault. Product language must explain both dependencies together; describing a recovery code as a complete backup encourages a particularly costly misunderstanding.
The threat model also has limits. Someone who obtains the recovery secret and its matching backup may gain the ability to decrypt the contents. The printed or saved Kit therefore remains sensitive offline material. This architecture does not promise protection against every compromised endpoint, every physical attack, or every copy a user makes. OWASP recommends grounding storage encryption in an explicit threat model rather than treating an algorithm name as the whole security design.
Technical references
Separate the vault key from the ways a user unlocks it
Krypt's inspected recovery envelope uses a 256-bit vault master key and a separate 256-bit Rescue Key. Recovery metadata contains a Rescue Key-wrapped master key, its nonce, and a Rescue Key verifier. The application can use the matching recovery secret to unwrap the existing master key instead of decrypting and re-encrypting every stored item under a replacement PIN.
This distinction changes how backups should be described. A backup can contain encrypted or wrapped keys. The relevant question is whether an unauthorized party can obtain usable plaintext keys, not whether the archive contains any key-related fields at all. Saying that a backup contains no keys would obscure the mechanism that makes fresh-device recovery possible.
The enrollment envelope separately protects PIN-related metadata under the vault master key. In the reviewed source, that enrollment includes PIN-wrapped key material and associated verification information. Recovery first establishes the candidate master key and authenticates the selected backup before trusting enrollment metadata. OWASP's key management guidance is useful here because key storage, recovery, and lifecycle handling are architectural responsibilities beyond choosing a cipher.
Technical references
Authenticate the manifest rather than trusting a plausible filename
An archive called vault-backup.zip says little about its contents. Krypt's authenticated archive manifest records the format, version, purpose, vault identity, database digest and length, encrypted file inventory, and recovery metadata. The implementation authenticates that structured information using HMAC-SHA256 keyed by the vault master key, with a format-specific domain marker.
This is keyed authentication. Although release documentation uses signed-manifest terminology, the inspected mechanism is not an asymmetric digital signature with a developer public key. HMAC lets a holder of the relevant secret verify message integrity and authenticity under that shared key. It does not independently establish which human created the archive or turn a backup into third-party provenance evidence.
The order matters: recovery fields may be parsed to obtain a candidate key, but parsing is not acceptance. The candidate must authenticate the manifest, and the archive must satisfy the remaining validation before live installation. A readable JSON object, recognizable vault label, or successful initial unwrap is insufficient. RFC 2104 describes the HMAC construction; the application's additional work binds that construction to a specific vault, purpose, inventory, and recovery operation.
Technical references
Verify the exact archive and the database's file references
A valid database can still point to absent or unrelated encrypted files. Krypt's manifest verifier compares the archive's member names with the authenticated expected member set. It rejects missing members and unexpected extras, then opens the selected encrypted database to inspect the file inventory. File records have stable sync identities that connect database rows to archive members.
The verifier rejects duplicate sync identities and duplicate encrypted member names. It requires the database inventory and manifest inventory to agree, checks each member's length and SHA-256 digest, and validates supported encrypted file identity information. This prevents a collection of individually plausible blobs from being accepted as a coherent vault merely because they arrived in the same container.
These checks serve different purposes. An unkeyed digest can detect a byte change relative to a trusted expected value; an attacker who can replace both data and an unauthenticated digest can rewrite that comparison. Authenticating the manifest protects the expected values, while exact membership and database-reference checks protect completeness and association. Teams should test all three layers separately rather than using one successful database-open test as their recovery acceptance criterion.
Make database-only and complete recovery distinct contracts
A database-only backup and a complete bundle solve different recovery problems. Database records can describe file-backed content without containing the encrypted file bytes themselves. A complete recovery path must account for those bytes and their relationship to records. A product that silently treats every database backup as a complete vault backup can display familiar entries that fail when opened.
Krypt's reviewed complete-backup path stages encrypted files selected through the validated inventory, alongside the database and protected recovery enrollment. Its release documentation explicitly distinguishes complete bundles from database-only compatibility recovery. The distinction is especially important on a fresh device, where an old local file directory cannot accidentally hide omissions in the backup.
For a new secure product, document the recovery unit in the format specification and confirmation screen. State which item types are fully recoverable from each format and what must be preserved separately. As a deployment check, restore representative documents and media on a clean installation, open them, and compare their contents with the original fixtures. A record count can demonstrate that rows returned; it cannot demonstrate that every referenced attachment is usable.
Stage and validate before changing the active vault
Restoring directly over active storage makes validation failures destructive. Krypt's restore coordinator prepares a staged database and, when required, a staged encrypted file generation. It verifies staged inventory before the commit sequence changes the live database, file generation, or secure metadata. The backup service also provides a database verification callback for the selected recovered key.
Secure metadata needs the same discipline as file storage. The coordinator prepares metadata through a dedicated store, keeping the authenticated recovery values out of the plaintext restore journal. That journal records the operation and its progress rather than becoming another unprotected container of recovery secrets. Staging therefore covers both ordinary filesystem state and the metadata needed to unlock it.
Authenticated encryption is another necessary boundary. Krypt's enrollment envelope uses AES-GCM, whose authentication check protects the sealed enrollment data. NIST SP 800-38D specifies GCM's authenticated encryption operation; citing the standard does not establish certification of this application. Correct surrounding behavior still requires careful nonce management, error handling, and refusal to install state after failed authentication.
Technical references
Journal the database, files, and secure metadata together
Replacing a database is not one atomic action when encrypted files and platform secure storage also change. Krypt's coordinator records phases for preparation, validation, commit, database installation, file installation, metadata application, verification, and durability. Previous generations remain available until the operation reaches the boundary that permits final cleanup.
Startup recovery interprets the journal rather than assuming the last attempted write succeeded. In the inspected implementation, interruption before durability leads to restoration of the old generation. After durability, recovery verifies and finalizes the new generation. If rollback itself encounters a failure, the journal remains available for another startup attempt instead of being discarded as though cleanup had completed.
The source includes interruption tests across these boundaries, including partial secure metadata application and rollback retry. Those tests exercise the coordinator with controlled fixtures and injected failures. They are evidence for the implemented state machine, not proof that every operating system, filesystem, storage exhaustion condition, or store-distributed device behaves identically. Release verification should add representative device termination and restart journeys at the same boundaries.
Keep legacy compatibility narrow and explicitly acknowledged
Older backups create pressure to relax new checks. Krypt's Build 39 recovery instead restricts unsigned Build 38 compatibility to a separately acknowledged database-only migration for a built-in vault. Ordinary signed-in restore and merge reject unsigned backups. Unsigned complete bundles are rejected, and legacy custom-vault backups lacking authenticated custom-vault identity cannot use this migration path.
The compatibility flow proves the matching Rescue Key against the exact selected encrypted database and requires SQLCipher and SQLite integrity checks before accepting a newly chosen PIN. Its warning explains that the legacy filename, label, backup bytes, and source remain unauthenticated. Successful decryption and structural integrity do not retroactively provide an authenticated history for an old archive.
The release implementation also binds the legacy proof to one vault and one use. This keeps a successful check from becoming a reusable permission to import a different selection. For other products, the reusable lesson is to isolate migrations by format and capability, state their reduced assurances, and avoid allowing an acknowledged exception to disable verification for normal restores.
Use a failure matrix that checks preserved state
A recovery test should establish what remains after failure, not merely assert that an error appeared. The following matrix combines behavior present in the reviewed implementation with recommended acceptance checks. Run destructive fixtures against disposable vaults and record database contents, encrypted file inventory, and unlock behavior together.
| Injected condition | Expected recovery boundary | Evidence to capture |
|---|---|---|
| Wrong Rescue Key | Reject the candidate before installation | Original vault opens; database, files, and metadata remain unchanged |
| Changed manifest or database bytes | Authentication or digest validation rejects the backup | Failure identifies validation; no live generation is replaced |
| Missing, extra, or substituted encrypted member | Exact membership, inventory, identity, or digest checks reject the archive | Original attachments remain readable; no partial incoming set appears |
| Database-only backup selected | Respect that format's restricted recovery scope | Recovered records and unavailable file-backed content are distinguished |
| Unsigned Build 38 complete bundle | Reject; legacy exception is database-only and acknowledged | No downgrade of ordinary authenticated restore requirements |
| Process interruption before durable phase | Journal recovery restores the old generation | After restart, old database, file generation, and unlock metadata agree |
| Process interruption after durable phase | Verify and finish the new generation | After restart, new items open and pending cleanup completes |
| Secure metadata write or rollback failure | Preserve recovery journal until state can be reconciled | Restart retries recovery; incompatible generations are not accepted as success |
Scroll horizontally to read all table columns.
Tie engineering claims to the public release and actual proof
Krypt is an IHP-owned product, and its public App Store listing names IHP Technology LLC as developer. Both mobile storefront pages retrieved for this article describe version 2.0.0 recovery improvements. The implementation discussion is bounded to the Build 39 integration source and accompanying submission documentation; later repository changes are not treated as shipped features.
The practical deliverable for another secure application is a recovery contract covering authority, backup scope, authentication, staged installation, interruption recovery, and migration exceptions. Pair that contract with reproducible fixtures and platform evidence. A successful local test, a public release note, and a completed fresh-device restore each answer different questions. Keeping those claims precise makes recovery behavior easier for both users and engineering teams to trust.
Related services
- Security
Build and improve software with security-minded architecture, access controls, cloud hardening, monitoring, and compliance-aware engineering practices.
- Mobile Apps
Plan, design, and build mobile apps for iOS and Android with IHP Technology, including user experience, APIs, cloud infrastructure, and launch support.
- Custom Software
Build secure, scalable custom software with IHP Technology. We design, develop, launch, and support business-critical web and mobile applications.
Keep reading
- How Can You Verify the Right Release Is Running on Google Cloud Run?
A successful deployment command leaves important questions unanswered. Learn how to connect the reviewed source, container image, serving revision and public response.
