Next: , Previous: , Up: Top  


EBlob format

Eblob is an encrypted blob (binary large object, in the terms of databases), holding any kind of symmetrically encrypted data with the passphrase used to derive the key. It is used to secure configuration files, holding valuable private keys, allowing them to be transferred safely everywhere.

In fact it uses two factors for securing the data:

Whole security depends on the passphrase itself. Pay attention that this is not the password. Password is a short string of high entropy (highly random) characters, but passphrase is (very) long string of low-entropy characters. Low-entropy text is much more easier to remember, and its length provides pretty enough entropy as a result.

Password strengthening function is applied to that passphrase to mitigate brute-force and dictionary attacks on it. Here, Balloon memory-hard password hashing function is used, together with BLAKE2b-256 hash. It has proven memory-hardness properties, very easy to implement, resistant to cache attacks and seems more secure than Argon2 (Password Hashing Competition winner).

Eblob is an XDR-encoded structure:

+-------+------------------+------------+
| MAGIC | S | T | P | SALT | BLOB | MAC |
+-------+------------------+------------+
XDR typeValue
Magic number8-byte, fixed length opaque dataN N C P B 0x00 0x00 0x01
S, T, Punsigned integerSpace cost, time cost and parallel jobs number
Salt32 bytes, fixed length opaque dataRandomly generated salt
Blobvariable length opaque dataEncrypted data itself
MAC32 bytes, fixed length opaque dataBLAKE2b-256 MAC of encrypted blob

Blob’s encryption is done using Twofish algorithm with 256-bit key in CTR mode of operation with zero initialization vector. balloon(BLAKE2b-256, S, T, P, salt, password) gives the main key, that is fed to HKDF-BLAKE2b-256 KDF. Actual encryption key for Twofish and authentication key for MAC are derived from that KDF.


Next: , Previous: , Up: Top