vegaprotocol / vega

A Go implementation of the Vega Protocol, a protocol for creating and trading derivatives on a fully decentralised network.
https://vega.xyz
GNU Affero General Public License v3.0
38 stars 22 forks source link

Change the way we encrypt wallets locally #6876

Open ValentinTrinque opened 1 year ago

ValentinTrinque commented 1 year ago

The wallet is encrypted by using the passphrase directly. That passphrase may not have a high enough entropy to secure the wallet. You should use more appropriate mechanism for that.

Standard

Gold standard of KDF is Argon2id, but something like PBKDF2 are better than nothing

Format

MAGIC_BYTES || U16(version) || KDF_SETTINGS || CIPHERTEXT || AUTH_TAG || CHECKSUM

Then:

We have to account for the following features support:

ValentinTrinque commented 1 year ago

This will need careful review from @emilbayes