[Owncloud] File encryption notes

Frank Karlitschek karlitschek at kde.org
Tue Nov 1 16:47:20 UTC 2011


Hi Marta,

thanks a lot for you input. Unfortunately I understand only half of what you are saying. ;-)
Because I´m not a crypto expert we decided to use an existing library which implements blowfish
http://pear.php.net/package/Crypt_Blowfish/redirected
All we have is a small wrapper library which cut´s the data in chunks and encrypts them separately.

Do you think this is a bad choice?

A hash to check if the file is not corrupt is definitely a good idea. We should do this.

Cheers
Frank


On 30.10.2011, at 21:20, Marta Rybczynska wrote:

> Hello all,
> I've looked into the in-development file encryption mechanism in Owncloud.
> I think it can see some improvements.
> 
> First, currently it is using ECB encryption mode. ECB is rarely used
> because it is not very secure: it always encrypts the same plaintext
> block into the same ciphertext. An attacker can try to modify such file
> by introducing a known block, can build dictionaries etc. Wikipedia
> has a nice explanation on the subject:   
> http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation
> 
> It would be better to use a more secure mode, for example the simple
> CTR (counter) mode. Even better would be to have also something that
> prevents file modification/corruption. Like a hash of the unencrypted file
> added to the stored, encrypted file. Then, at decryption, it would be easy
> to check if the file is in the right state.
> 
> What do you think?
> 
> Marta
> _______________________________________________
> Owncloud mailing list
> Owncloud at kde.org
> https://mail.kde.org/mailman/listinfo/owncloud

Frank Karlitschek
karlitschek at kde.org





More information about the Owncloud mailing list