Live data from Hacker News

Pwncloud – Bad crypto in the Owncloud encryption module

blog.hboeck.de

11–20 of 46 posts

Re: Pwncloud – Bad crypto in the Owncloud encryption module

#11
post #4

This is a really great writeup. But CTR+HMAC is, in fact, a composed authenticated encryption mode. If you have a working system with CTR+HMAC, I'd recommend against spending effort switching to GCM, which is actually harder to get right.

I thought AES-GCM was on its way out? Isn't poly1305-chacha20 what we should use now, given that it's quite a bit cheaper in terms of cost, and the keys are much smaller (32 bytes)?

Also, the code for chacha is easily available.

Re: Pwncloud – Bad crypto in the Owncloud encryption module

#12
post #11
post #4

This is a really great writeup. But CTR+HMAC is, in fact, a composed authenticated encryption mode. If you have a working system with CTR+HMAC, I'd recommend against spending effort switching to GCM, which is actually harder to get right.

I thought AES-GCM was on its way out? Isn't poly1305-chacha20 what we should use now, given that it's quite a bit cheaper in terms of cost, and the keys are much smaller (32 bytes)? Also, the code for chacha is easily available.

I definitely personally prefer ChaCha/Poly to GCM, but GCM is unfortunately quite popular right now; of the unencumbered AEADs blessed by NIST, it's very performant and thus widely implemented.

Re: Pwncloud – Bad crypto in the Owncloud encryption module

#13
post #5

Still recall running across a vendor that was hashing credit cards using MD5. Asked them why, and their response was that they were PCI compliant. Called the main PCI line, asked them if MD5 hash was an acceptable way to store credit cards securely, and the answer was yes.

How many bit of entropy are in a credit card? I ran the numbers a few years ago but don't remember now. Well within a very small rainbow table in any case.

Re: Pwncloud – Bad crypto in the Owncloud encryption module

#14
post #2

> "First it is important to understand what this encryption module is actually supposed to do and understand the threat scenario. The encryption provides no security against a malicious server operator, because the encryption happens on the server. The only scenario where this encryption helps is if one has a trusted server that is using an untrusted storage space." While it's a good finding that even in this specifi…

Well, you can use client side encryption with Owncloud as well. What makes dropbox special?

Re: Pwncloud – Bad crypto in the Owncloud encryption module

#16
post #6

So what is the implication of this? The major reason to use the crypto module is that my users can add their google drives to owncloud and its encrypted on there. Whats the recommended course of action?

If you want to go along with owncloud (and I don't know a proper alternative) there's not much you can do then upgrading to Owncloud 9 and hope that the fix was done right. In the meantime you could encourage your users to use their own client-side encryption while giving up the idea of an easy setup.

Im already running the newest version. I hope they approve on it in future versions. Client side crypto would be cool.

Re: Pwncloud – Bad crypto in the Owncloud encryption module

#18
post #11
post #4

This is a really great writeup. But CTR+HMAC is, in fact, a composed authenticated encryption mode. If you have a working system with CTR+HMAC, I'd recommend against spending effort switching to GCM, which is actually harder to get right.

I thought AES-GCM was on its way out? Isn't poly1305-chacha20 what we should use now, given that it's quite a bit cheaper in terms of cost, and the keys are much smaller (32 bytes)? Also, the code for chacha is easily available.

Also: Don't implement chacha20-poly1305 or AES-GCM yourself, unless you're a crypto expert.

You'll more than likely make a mistake.

Libsodium offers both (but AES-256-GCM is only available if you have hardware support for constant-time implementations).

    crypto_aead_chacha20poly1305_encrypt()
    crypto_aead_chacha20poly1305_decrypt()
    crypto_aead_aes256gcm_encrypt()
    crypto_aead_aes256gcm_decrypt()
https://github.com/jedisct1/libsodium

Re: Pwncloud – Bad crypto in the Owncloud encryption module

#19
post #13
post #5

Still recall running across a vendor that was hashing credit cards using MD5. Asked them why, and their response was that they were PCI compliant. Called the main PCI line, asked them if MD5 hash was an acceptable way to store credit cards securely, and the answer was yes.

How many bit of entropy are in a credit card? I ran the numbers a few years ago but don't remember now. Well within a very small rainbow table in any case.

You have 10^15 possible values from a 16-digit CC number (due to Luhn's algorithm). The first 6 are for the issuer/bank; if you know that, you have 10^9 or about 30 bits of possible values.

Re: Pwncloud – Bad crypto in the Owncloud encryption module

#20
post #5

Still recall running across a vendor that was hashing credit cards using MD5. Asked them why, and their response was that they were PCI compliant. Called the main PCI line, asked them if MD5 hash was an acceptable way to store credit cards securely, and the answer was yes.

Stores in our college had them being sent out in plain text. They wouldn't change to secure equipment and would occasionally plug the internet into the college servers where we watched them...
Post reply on HN