diff --git a/rfc/0013_Duniter_Encrypted_Wallet_Import_Format.md b/rfc/0013_Duniter_Encrypted_Wallet_Import_Format.md index 6a07227453fe812cb08b89cbb53dc35732bb731f..7a2a396683c1663737e615a46554bfd594618333 100644 --- a/rfc/0013_Duniter_Encrypted_Wallet_Import_Format.md +++ b/rfc/0013_Duniter_Encrypted_Wallet_Import_Format.md @@ -15,9 +15,13 @@ License: CC-SA A wallet is a pair of asymmetric keys (a public key + a private key). -The purpose of this RFC is to define a standard, inter-operable and secure file format for any DUBP wallet. +The purpose of this RFC is to define a standard, inter-operable and secure format for any [DUBP] wallet. -[DUBP](https://git.duniter.org/nodes/common/doc/blob/master/rfc/0010_Duniter_Blockchain_Protocol_V12.md) only deals with public keys and signatures. +This RFC does not define a file format, it is agnostic of the way the wallet is stored on the disk. + +## DUBP + +[DUBP] only deals with public keys and signatures. A public key is always paired with a private key, which DUBP will never deal with. @@ -27,11 +31,9 @@ So currently a public key for DUBP is to be understood as an Ed25519 public key. ## DEWIF format -DEWIF is an inter-operable and secure file format for any DUBP wallet. +DEWIF is an inter-operable and secure format for any DUBP wallet. -The official extension is `.dewif`. - -DEWIF format is a text file containing a single base64 string. +DEWIF format is a base64 string. This base64 string encodes a sequence of bytes whose structure is defined below. ## dewif bytes structure @@ -57,7 +59,7 @@ v1 data (encrypted): |:--------------:|:-------------------:| | seed bytes | public key bytes | -The public key serves as a checksum. To check that the `.dewif` file is not corrupted, simply generate an ed25519 keypair with the seed and check that the obtained public key matches. +The public key serves as a checksum. To check that the DEWIF base64 string is not corrupted, simply generate an ed25519 keypair with the seed and check that the obtained public key matches. Symmetric encryption algorithm : aes256 @@ -98,7 +100,7 @@ v2 data (encrypted): |:---------------:|:--------------------:|:---------------:|:--------------------:| | seed bytes | public key bytes | seed bytes | public key bytes | -The public key serves as a checksum. To check that the `.dewif` file is not corrupted, simply generate an ed25519 keypair with the seed and check that the obtained public key matches. +The public key serves as a checksum. To check that the DEWIF base64 string is not corrupted, simply generate an ed25519 keypair with the seed and check that the obtained public key matches. Symmetric encryption algorithm : aes256 @@ -124,7 +126,7 @@ Encrypted data : |:--------------:|:-------------------:| | seed bytes | public key bytes | -The public key serves as a checksum. To check that the `.dewif` file is not corrupted, simply generate an ed25519 keypair with the seed and check that the obtained public key matches. +The public key serves as a checksum. To check that the DEWIF base64 string is not corrupted, simply generate an ed25519 keypair with the seed and check that the obtained public key matches. Symmetric encryption algorithm : aes256 @@ -157,3 +159,5 @@ p: 1 DEWIF base 64 string (with aes key `"toto titi tata"`): `AAAAAxAAAAEPdMuBFXF4C6GZPGsJDiPBbacpVKeaLoJwkDsuqLjkwof1c760Z5iVpnZlLt5XEFlEehbdtLllVhccf9OK6Zjn8A==` + +[DUBP]: https://git.duniter.org/nodes/common/doc/blob/master/rfc/0010_Duniter_Blockchain_Protocol_V12.md