Skip to content

New encrypted wallet file header:#10339

Draft
ecdsa wants to merge 6 commits into
masterfrom
new_file_headers
Draft

New encrypted wallet file header:#10339
ecdsa wants to merge 6 commits into
masterfrom
new_file_headers

Conversation

@ecdsa

@ecdsa ecdsa commented Dec 2, 2025

Copy link
Copy Markdown
Member
  • the file is encrypted with a master key
  • the master key is encrypted with one or several passwords
  • passwords can be added to or removed from the list
  • a hmac of the file is written at the beginning of the file
  • passwords can be checked/updated without having to read/write the whole file
  • the GUI assumes a single password
  • partial writes: encrypted blobs are appended at the end of the file each blob is prefixed by its length can recover from incomplete write: hmac is updated after appending

@ecdsa ecdsa force-pushed the new_file_headers branch 2 times, most recently from ac622ca to 63d679e Compare December 2, 2025 16:17
@ecdsa ecdsa added the topic-walletstorage 💾 not wallet itself but storage/db-related label Dec 2, 2025
@SomberNight

Copy link
Copy Markdown
Member

related #5999

ecdsa added 5 commits June 24, 2026 18:56
  - WalletDB no longer inherits from JsonDB, it uses a StoredDict
  - JsonDB inherits from BaseDB
  - FileStorage is only seen by JsonDB
  - calling JSonDB constructor creates the storage

note: this commit temporarily breaks DB upgrades
this restores DB upgrades.
(DB upgrades require not converting stored classes)
Add unit test of atomicity.
Use a write batch for DB upgrades.
@ecdsa ecdsa force-pushed the new_file_headers branch 9 times, most recently from 29c770b to b2ce981 Compare June 26, 2026 15:27
 - the file is encrypted with a master key
 - the master key is encrypted with one or several passwords
 - passwords can be added to or removed from the list
 - a hmac of the file is written at the beginning of the file
 - passwords can be checked/updated without having to read/write the whole file
 - the GUI assumes a single password
 - partial writes:
    encrypted blobs are appended at the end of the file
    each blob is prefixed by its length
    can recover from incomplete write: hmac is updated after appending
@ecdsa ecdsa force-pushed the new_file_headers branch from b2ce981 to 0744779 Compare June 26, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic-walletstorage 💾 not wallet itself but storage/db-related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants