ChaCha8/12/20 and GEOM ELI tests

Alexey Ivanov savetherbtz at gmail.com
Wed Jan 14 05:25:46 UTC 2015


> On Jan 13, 2015, at 8:17 PM, Gleb Kurtsou <gleb at freebsd.org> wrote:
> 
> On (14/01/2015 05:21), rozhuk.im at gmail.com wrote:
>>> Maybe faster but a stream cipher is unusable for disk encryption - iv
>>> is derived from sector number and doesn't change. Being able to write a
>>> known plaintext and read resulting ciphertext allows you to recover the
>>> cipher stream and decrypt any past or future data stored on that
>>> sector.
>> 
>> Depends on the capabilities of the attacker.
>> 
>> To be able to continuously read encrypted sectors for data collection
>> is too much.
> 
> I disagree. It's the most basic attack scenario. Assuming attacker was
> able to get access to encrypted disk once, odds are high it may happen
> again.
Agreed:
In day to day life if anyone had an ability to read content off laptop’s hdd when it is hibernated - he would break the encryption.
In server world if one has access to two HDDs from the same raid1 from different points in time - he also will have the ability to decrypt data.

> 
> 
>> Ability to read encrypted sectors has a transmission network, for example when the container=disk is stored somewhere in the cloud.
>> 
>> In many cases, the attacker gets Encrypted disk along with other equipment, often in the off state.
>> Without encryption keys and the ability to write / read through the GELI.
>> 
>> I do not see any weaknesses stream ciphers in cases when the attacker is not able to access the disk when it is mounted in the GEOM GELI.
>> 
>> Another possibility is the use of ChaCha (without XTS) - encryption
>> swap file: there every time a new key is generated, besides the speed
>> is particularly important.
> 
> Stream cipher (or similarly functioning block cipher mode) should not be
> used for disk encryption. IMHO swap encryption hardly justifies adding
> insecure encryption mode to geli. Fast swap is certainly nice to have,
> but rather remains a snake oil, system will remain trashed due to
> swapping no matter how fast swap is.
Agreed again, if one really wants to add stream cipher he should then securely generate random IV and write it to disk along with the data (e.g. how g_eli_integrity.c does for HMAC, or even something simpler since one does not have a requirement of storing IV on the same sector as data)

> 
> 
>> These aspects of the application must necessarily be reflected in the documentation.
>> 
>> 
>> There are objections to add ChaCha and XChaCha (without XTS) in GEOM GELI?
> 
> I strongly object.
Yep, though having ChaCha as a replacement for arc4 in both userland[1][2] and kernel would be nice.

[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=182610
[2] http://marc.info/?l=openbsd-tech&m=141807224826859&w=2

> 
> Having XTS mode for a stream cipher in the first place looks really fishy..
> 
> Originally encryption is defined as:
> T = AES-ENC(key2, i) (*) alpha_j
> PP = P (*) T
> CC = AES-ENC(key1, PP)
> C = CC (*) T
> 
> In stream cipher case:
> T = CHACHA(key2, state2) (*) i (*) alpha_j
> PP = P (*) T
> CC = CHACHA(key1, state1) (*) PP
> C = CC (*) T
> 
> CC = CHACHA(key1, state1) (*) P (*) T
> C = CC (*) T
> 
> C = CHACHA(key1, state1) (*) P
> 
> It doesn't depend on i, j or key2. state1 should be the same as well.
> 
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-geom/attachments/20150113/ac8be6e0/attachment.sig>


More information about the freebsd-geom mailing list