Live data from Hacker News

MiniLock – File encryption software that does more with less

minilock.io

1–10 of 85 posts

Re: MiniLock – File encryption software that does more with less

#3
post #2

[deleted]

Generally, one would use a Hybrid Encryption scheme: http://en.wikipedia.org/wiki/Hybrid_cryptosystem

The file would be encrypted using a symmetric encryption scheme (like AES), and then the key for decrypting it would be encrypted to each recipient. Adding an extra recipient then just involves encrypting the 128 or 256 bit key, which should be negligible increase in size.

Re: MiniLock – File encryption software that does more with less

#4
post #2

[deleted]

I would use a secret key to encrypt the file, then encrypt the decryption key with each of the keys of those recipients, and add each (user ID, encrypted decryption key) to the file.

Reading the linked page, that's exactly what they do (with a nonce to thwart various (differential, known plaintext, etc.) attacks)

The header itself is a stringified JSON object which contains information necessary for the recipients to decrypt the file. The JSON object has the following format:

  {
    senderID: Sender's miniLock ID,
    fileInfo: {
        (One copy of the below object for every recipient.)
        Unique nonce for decrypting this object (Base64): {
            fileKey: Key for file decryption (Base64),
            fileName: The file's original filename (String),
            fileNonce: Nonce for file decryption (Base64),
        }
        (Encrypted with shared secret derived from the sender’s
         private key and recipient's public key.
         Stored as Base64 string.)
    }
  }
Note that in the above header, fileName is padded with the 0x00 byte until it reaches 256 bytes in length. This is done in order to prevent the discovery of the fileName length purely by analyzing an encrypted miniLock file’s header.

Re: MiniLock – File encryption software that does more with less

#5
Existing research strongly suggests that deriving asymmetric keys from human-provided seeds (i.e. passphrases) and nothing else is strongly inadvisable.

This is because it is possible to attack large numbers of passphrases at once, and it is possible to harvest large numbers of targets from public databases of public keys.

Additionally, entropy estimation tools generally are not good at accounting for the fact that human behavior results in non-obvious biases and patterns in passphrase selection.

To see an example of this model failing on a large scale, look at the number of Bitcoin "brain wallets" that have been hacked, despite having apparently strong keys.

Re: MiniLock – File encryption software that does more with less

#7
post #6

Small UX nitpick. You can't select the miniLock ID by double-clicking it. I think it was one of the reasons bitcoin used Base58 encoding.

Indeed, Base58 encoding would be preferable. I filed an issue https://github.com/kaepora/miniLock/issues/3

Re: MiniLock – File encryption software that does more with less

#8
This is a bad cryptosystem which will result in people being fucked. Take it offline. A serious known weakness of zxcvbn is that it will grossly overestimate the entropy of things like quotes, lines from songs, lines from movies, etc.

"the quick brown fox jumps over the lazy dog" has 111 bits of entropy according to zxcvbn.

Re: MiniLock – File encryption software that does more with less

#9

This is a bad cryptosystem which will result in people being fucked. Take it offline. A serious known weakness of zxcvbn is that it will grossly overestimate the entropy of things like quotes, lines from songs, lines from movies, etc. "the quick brown fox jumps over the lazy dog" has 111 bits of entropy according to zxcvbn.

It is in a "a feedback period", exactly so they can get the feedback like you just gave. So get off your high horse about taking things down.

Re: MiniLock – File encryption software that does more with less

#10
Perhaps I'm missing something obvious, but I don't understand. What's so great about not having to store the key pair on disk? After all, this is a file encryption software. Its job is to store data on disk. In fact, it already adds a bunch of headers to every encrypted file. Why not just grab 128 random bits from /dev/urandom, make it the private key, encrypt it with the passphrase as all the other programs do, and stick the encrypted key in the header? It will only add a few dozen bytes to the header, which is peanuts.
Post reply on HN