feat(backup): sealed backups + printable recovery sheet

'Save a backup' now writes a sealed .tanemaki file (AES-256-GCM under a
key HKDF-derived from the root seed; format TANEBK v1, open and stable).
Restoring on the same identity is silent; a copy sealed by another
identity asks for the printed recovery code (TANE1 base32, typo-tolerant)
and adopts that seed — recovering your bank recovers you. Legacy plain
exports still restore. Settings gains a recovery sheet (QR + code PDF).
BackupBox/RecoveryCode live in commons_core, pure Dart, TDD.
This commit is contained in:
vjrj 2026-07-09 22:32:13 +02:00
parent ba87bf2719
commit d6781870d9
19 changed files with 1016 additions and 81 deletions

View file

@ -288,6 +288,33 @@ class Translations$backup$en {
/// en: 'Something went wrong'
String get failed => 'Something went wrong';
/// en: 'Your recovery code'
String get recoveryTitle => 'Your recovery code';
/// en: 'Print it and keep it safe — it opens your copies on a new device'
String get recoverySubtitle => 'Print it and keep it safe — it opens your copies on a new device';
/// en: 'This code opens your saved copies and brings your bank back on any device. Keep two paper copies in safe places, like your best seed. Anyone holding it can read your copies, so share it with no one.'
String get recoveryIntro => 'This code opens your saved copies and brings your bank back on any device. Keep two paper copies in safe places, like your best seed. Anyone holding it can read your copies, so share it with no one.';
/// en: 'Copy'
String get recoveryCopy => 'Copy';
/// en: 'Save the sheet'
String get recoverySave => 'Save the sheet';
/// en: 'Tanemaki — your recovery sheet'
String get recoverySheetTitle => 'Tanemaki — your recovery sheet';
/// en: 'Enter your recovery code'
String get recoveryPromptTitle => 'Enter your recovery code';
/// en: 'This copy was saved with another code. Type the code from your recovery sheet to open it.'
String get recoveryPromptBody => 'This copy was saved with another code. Type the code from your recovery sheet to open it.';
/// en: 'That code doesn't open this copy'
String get recoveryWrongCode => 'That code doesn\'t open this copy';
}
// Path: about
@ -1504,6 +1531,15 @@ extension on Translations {
'backup.importCsvDone' => ({required Object count}) => 'Added ${count} entries',
'backup.importFailed' => 'This file could not be read as a Tanemaki copy',
'backup.failed' => 'Something went wrong',
'backup.recoveryTitle' => 'Your recovery code',
'backup.recoverySubtitle' => 'Print it and keep it safe — it opens your copies on a new device',
'backup.recoveryIntro' => 'This code opens your saved copies and brings your bank back on any device. Keep two paper copies in safe places, like your best seed. Anyone holding it can read your copies, so share it with no one.',
'backup.recoveryCopy' => 'Copy',
'backup.recoverySave' => 'Save the sheet',
'backup.recoverySheetTitle' => 'Tanemaki — your recovery sheet',
'backup.recoveryPromptTitle' => 'Enter your recovery code',
'backup.recoveryPromptBody' => 'This copy was saved with another code. Type the code from your recovery sheet to open it.',
'backup.recoveryWrongCode' => 'That code doesn\'t open this copy',
'about.title' => 'About',
'about.kanji' => '種まき',
'about.tagline' => 'A local-first, decentralized app for managing and sharing traditional seeds and seedlings.',