News for hackers. Stuff that matters.
Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by wolf550e on Saturday February 28, 2015 @10:05AM (#9123827)
>> The password will be hashed with the SHA256 algorithm, the mode for encryption is 256 Bit Rijndael/AES

SHA256 is not a KDF, AES-256 is not a block cipher mode. Where is the source code?

Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by steakejjs on Saturday February 28, 2015 @10:15AM (#9123854)
Wolf is 100% correct. These details make it sound like this product is insecure. We definitely don't want ecb mode or a weak kdf like 1 round of sha256 with no salt.

BUT before anyone lambasts this guy, it's good the author posted so mistakes can be learned from the feedback, that way others get exposed to the issues, and less mistakes are made in the future. In my opinion, there is too much hate for people who make mistakes when writing code, when in reality that's how you learn. Few people learn all the theory first and THEN how to build it, it's often learn to build then the theory.

Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by moe on Saturday February 28, 2015 @10:27AM (#9123889)
This is true for every kind of software except security things.

It's really hard for a novice to find something that will actually protect them in between all the "convenient cloud solutions" that an intern cobbled together in their lunch break using some javascript they found on github.

Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by erglkjahlkh on Saturday February 28, 2015 @11:10AM (#9124035)
I wish it were just interns... Example follows.

The Finnish security company F-Secure revealed a secure cloud service, called Younited (https://www.younited.com/). It did not catch on. The active user amounts stayed at near zero level so it was sold to a company called Synchronoss.

F-Secure initially hoped that their good reputation, and the fact that the servers are located in countries without draconian spying legislation would be enough. They seriously hoped to make a star product out of their secure cloud service.

Well, secure against whom? Simply installing the applications and completing registration process revealed instantly that the service is insecure. Yes, in compliance sense "everything is encrypted", but the keys are clearly held server side. The customer has absolutely no control over the key management and storage, meaning they are at F-Secure's mercy, and F-Secure can technically open everything for authorities.

Now the actually interesting part of the story: The problem isn't the implementation. The problem isn't that they marketed it as secure. The important alpha users on this product area are way too savvy, and stayed away. As per the standard innovation diffusion model, they did not drag other users in. Not marketing the service as secure would have yielded better results!

It's funny how even serious software security companies screw things up. Even when they are attempting for a strategic new product positioning, and even when at near clear blue sea situation.

Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by steakejjs on Saturday February 28, 2015 @10:31AM (#9123904)
No it is even true for security things BUT the authors need to have no problem taking a dose of humble pie and labeling the project as completely insecure.

I don't see anything wrong with writing security software that is insecure as long as you don't pretend it is secure....

Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by moe on Saturday February 28, 2015 @11:02AM (#9124016)
I don't see anything wrong with writing security software that is insecure as long as you don't pretend it is secure....

Except this one very much pretends to offer protection, apparently oblivious of the problems with their design.

They should point out very visibly that this is a tech-demo to promote a completely different product, and not an app that anyone should actually use.

Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by jszymborski on Saturday February 28, 2015 @01:12PM (#9124465)
Why not just use NaCl or libsodium... no need to muck about implementing things you don't fully understand.
Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by ReidZB on Saturday February 28, 2015 @10:14AM (#9123850)
I really dislike when companies say it their product encrypts with "256-bit encryption" or "AES-256". Like you said, that is an incomplete description of an encryption scheme. The choice of block cipher mode can immediately make or break my opinion of a product, and when developers omit what mode they've chosen, I lean toward break.
Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by higherpurpose on Saturday February 28, 2015 @11:00AM (#9124003)
At least it's not "military-grade encryption".
Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by dunham on Saturday February 28, 2015 @01:30PM (#9124510)
Heh, that reminds me of when the "Trillian" IM client advertised "128-bit blowfish" encryption, but used 128-bit DH to negotiate the key (this many years ago).
Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by pjc50 on Saturday February 28, 2015 @02:24PM (#9124695)
What's the standard for this kind of thing, PBKDF2 / AES-CBC / HMAC-256?

(I went and checked NaCl and it has its own primitives, http://nacl.cr.yp.to/secretbox.html)

Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by wolf550e on Saturday February 28, 2015 @03:56PM (#9125022)
The old best practice was RSA (with OAEP padding), AES CBC (with PKCS 7 padding), HMAC-SHA-2 (for TLS, AES GCM is better than AES CBC + HMAC, but I don't know if it's true in general). The new best practice seems to be something based on Curve25519 with SALSA/XSALSA/CHACHA + POLY1305.

CFRG has been trying for a year to come up with recommendation for TLS 1.3 on how to use 25519 and stronger curves in better primitives than ECDSA. ChaCha20+Poly1305 is getting more progress getting standardized, but still very slowly[0][1][2][3]. If you want to be sane then don't look into how sausages, laws and standards get made.

0 - https://tools.ietf.org/html/draft-agl-tls-chacha20poly1305-0...

1 - https://tools.ietf.org/html/draft-nir-cfrg-chacha20-poly1305...

2 - https://tools.ietf.org/html/draft-irtf-cfrg-chacha20-poly130...

3 - https://tools.ietf.org/html/draft-mavrogiannopoulos-chacha-t...

Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by jedisct1 on Saturday February 28, 2015 @04:14PM (#9125085)
Scrypt for key derivation, chacha20+poly1305 for authenticated secret-key encryption. In Javascript, https://github.com/jedisct1/libsodium.js provides them.
Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by placeybordeaux on Saturday February 28, 2015 @03:05PM (#9124837)
Looks like they are using CBC block cipher mode. Guess they updated the site since then.

This appears to be the source code: https://instantcryptor.com/js/main.js

Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by moe on Saturday February 28, 2015 @05:31PM (#9125305)

  var hash = crc.Crypto.Hash.SHA256.hash(password.value)
  crypter = new Crypt.Mode.Licobo(new Crypt.Rijndael256(hash))

And it looks like they didn't bother to use a KDF.

But I guess when your mode is "Crypt.Mode.Licobo" then that is the least of your problems...

Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by TillE on Saturday February 28, 2015 @11:50AM (#9124189)
PBKDF2 is still the gold standard for converting a password to an encryption key, right? bcrypt has some desirable properties, but it has a fixed output length of 192 bits.
Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by wolf550e on Saturday February 28, 2015 @02:24PM (#9124698)
scrypt is the gold standard, I think.
Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by licobo on Sunday March 01, 2015 @08:50AM (#9127018)
@all: thanks a lot for your feedback! It's good to see that so many people care about security. To quickly summarize your questions: We are using the secure CBC mode and have always used it ;) You can have a look on the source code directly on the website (because it's all client side JavaScript), but some parts of it are minified. We are working on a detailed description of the technology behind InstantCryptor and will publish it soon via Twitter (@cloudrail). If you are interested in the technology to easily add cloud storage into your application visit cloudrail.com to get a free copy.
Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by higherpurpose on Tuesday March 03, 2015 @04:00PM (#9140714)
It seems you have an authentication problem:

https://www.grc.com/sn/SN-497-Notes.pdf

There should be more details here after the show will be recorded (live now): http://twit.tv/show/security-now/497

I think using ChaCha20-Poly1305 instead of AES-CBC would solve that problem.

https://www.imperialviolet.org/2013/10/07/chacha20.html

Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by jjarmoc on Wednesday March 04, 2015 @11:23AM (#9145291)
I don't know that I'd necessary push for ChaCha20, but lack of ciphertext authentication is a clear problem. AES-GCM or even AES-CBC with an HMAC that's validated prior to decryption can provide the needed authenticity checks.
Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by jjarmoc on Tuesday March 03, 2015 @12:38PM (#9139110)
CBC mode is not inherently secure. Details matter and can often introduce catastrophic problems.
Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by sobel on Saturday February 28, 2015 @01:15PM (#9124476)
I've built a similar piece of javascript crypto: PasswordProtectMyFile.com. It's a single HTML page that can work with internet turned off. The ciphertext is another HTML page with all the javascript needed to decrypt itself.

It's open source: https://github.com/louissobel/ppmf

Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by licobo on Saturday February 28, 2015 @11:22AM (#9124082)
We are using CBC as block cipher mode. I totally understand that open sourcing the complete code is the only way for you to review it and trust it completely. We decided to write a detailed report about the encryption and how we use it and will publish the report soon via Twitter.
Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by tptacek on Saturday February 28, 2015 @11:44AM (#9124166)
CBC mode by itself is insecure.
Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by sarciszewski on Saturday February 28, 2015 @12:06PM (#9124258)
OP: You should listen to tptacek. He's forgotten more about crypto than some people have ever learned. :)
Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by diafygi on Saturday February 28, 2015 @11:36AM (#9124134)
"We decided to write a detailed report about the encryption and how we use it and will publish the report soon via Twitter."

That doesn't sound like releasing the source code...

Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by netheril96 on Saturday February 28, 2015 @10:07PM (#9125896)
How do you generate the initialization vector? CBC mode requires an unpredictable IV, which usually equals cryptographic random number.

> var hash = crc.Crypto.Hash.SHA256.hash(password.value),

> crypter = new Crypt.Mode.Licobo(new Crypt.Rijndael256(hash)),

From the code I cannot see any generation of IV, so I can only assume that the same IV is used every time. A predictable IV leads to many kinds of attacks. In particular, since the key is generated without salting, this means that a combination of the same key and IV will be used for multiple files, completely defeats the confidentiality.

And no integrity protection whatsoever? So vulnerable to bit flipping attacks?

Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by licobo on Saturday February 28, 2015 @11:33AM (#9124122)
via @cloudrail
Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by licobo on Saturday February 28, 2015 @09:21AM (#9123715)
A small side project to encrypt files for Dropbox and Google Drive. Encryption happens locally in the browser via JavaScript. The key never leaves the local computer. Happy for any feedback or comments ;)
Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by moe on Saturday February 28, 2015 @10:21AM (#9123880)
Happy for any feedback or comments

Don't put your crypto experiments online where they could harm someone who naively relies on them.

Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by sarciszewski on Saturday February 28, 2015 @10:35AM (#9123920)
Yeah, look what happened when someone leaked Ron Rivest's RC4 cipher. People still naively rely on it!
Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by mbq on Saturday February 28, 2015 @12:56PM (#9124405)
Even with proper algorithms, per-file encryption leaks quite a lot of meta-data, sizes and usage patterns; also the cloud provider can transparently delete, corrupt and revert files to previous versions.
Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by java-man on Saturday February 28, 2015 @02:57PM (#9124816)
I wrote a backup/archive tool [0] that uses authenticated encryption, scrypt, and local key management. The only thing it leaks [1] is the amount of new data added on each snapshot.

[0] http://goryachev.com/products/secure-archive

[1] hopefully

Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by java-man on Saturday February 28, 2015 @02:53PM (#9124799)
An encrypted archive with browsing, revision history, and search:

http://goryachev.com/products/secure-archive

Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by licobo on Saturday February 28, 2015 @10:04AM (#9123825)
And we do not store or even transfer your Dropbox or Google password on our servers. It runs locally in your browser. Feel free to double check this in the source code ;)
Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by wtbob on Saturday February 28, 2015 @10:42AM (#9123943)
That's the problem with in-browser crypto, though: you could change the source code at-will. You could even serve different versions of the source code to different people. You might even be compelled by your state to do so, even if you wished not to.

Better to deliver the end-user a piece of code he can examine once and trust going forward.

Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by ReidZB on Saturday February 28, 2015 @10:15AM (#9123852)
Can you link to the source code? In the 2-3 minutes I've spent searching, I can't find it.
Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by dreemkilker on Saturday February 28, 2015 @01:33PM (#9124525)
If it's all client side JavaScript, then the source code is the webpage.
Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by nodata on Saturday February 28, 2015 @02:55PM (#9124807)
http://syncthing.net/ open source and transit encrypted between computers you control.
Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by sarciszewski on Saturday February 28, 2015 @10:27AM (#9123892)
Two things:

1. Cryptor is usually the word used by criminals to describe payload obfuscation to evade antivirus detection.

2. Momma says closed-source crypto is the devil.

Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by ryanlol on Saturday February 28, 2015 @05:56PM (#9125364)
1. You're confusing "cryptor" with "crypter"

2. "Closed source" and javascript don't really work together.

Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by sarciszewski on Sunday March 01, 2015 @04:48AM (#9126556)
I've seen it spelled both ways. Usually on HackForums (a.k.a. the massive script kiddie honeypot).
Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by ryanlol on Sunday March 01, 2015 @10:33AM (#9127375)
site:hackforums.net cryptor About 1,790 results (0.32 seconds)

vs

site:hackforums.net crypter About 62,700 results (0.36 seconds)

Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by Grazester on Saturday February 28, 2015 @12:48PM (#9124374)
ooh. I made an app that encrypts files on Android written in Java and has a C# written client for Windows. I have released the java source code. I should post it here on HN to look at it and rip me a new one. What I am sketchy about is how does embedding an unencrypted salt used for the PBKDF2 in the file not potentially make guessing of the passphrase easier
Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by dreemkilker on Saturday February 28, 2015 @01:50PM (#9124576)
To answer your question about the the salt and the PBKDF2: salt ensures that the hash of my password is different from someone else's, even if we use the same password (or I use the same password on another site). Thus, if someone has the hashes, and wants to attack the system, then need to attack each password independently (they can't just run a password dictionary through the PKDF2 (or SHA256 in this case - very bad choice)) and then compare the results against all of the password hashes. They have to start with the salt (different for each user), and then run each password guess through the algorithm. Much slower. Much better.

Which brings us to PBKDF2 instead of SHA256: SHA256 is designed to be fast. That's bad when hashing passwords, because it makes offline dictionary-based attacks faster. Password Derivation functions are designed to be slow. That makes logging on very slightly slower, but makes offline attacks much, much slower.

However, doing the encryption in Javascript is a fatal problem: At any time, they can update (or be forced to update) the javascript to send the server my password when I use it, and the only way I can protect myself from this is to audit the code, EVERY TIME I USE IT.

Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by FlorianWendel on Sunday March 01, 2015 @03:31AM (#9126449)
Why do you consider unsalted SHA-256 a bad choice here? If neither the password nor its hash are stored and the hash is merely used as a key for the CBC, I don't see how anyone could construct rainbow tables for that. Care to explain?
Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by Inflatablewoman on Saturday February 28, 2015 @04:07PM (#9125067)
The point is that any salt, even a hard coded salt, would mean that an attacker would need to regenerate the rainbow tables using the known salt.
Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by StavrosK on Saturday February 28, 2015 @01:49PM (#9124573)
How are you going to guess the password given just the salt, not even the hash? Hell, even with the hash itself it's nowhere near easy.
Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by anacleto on Saturday February 28, 2015 @12:52PM (#9124387)
Nice points.
Re:Show HN: InstantCryptor – AES256 Encryption for Dropbox a... by anacleto on Saturday February 28, 2015 @12:52PM (#9124392)
This should be released as OpenSource.