News for hackers. Stuff that matters.
Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by xtanx on Saturday September 02, 2017 @08:49AM (#15155707)
"Investigators said content stored on the encrypted hard drive matched file hashes for known child pornography content."

If the disk is encrypted how can they match file hashes? Do they encrypt known CP files with the FileVault key and then compare? If so, isn't that enough to convict him?

Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by geofft on Saturday September 02, 2017 @09:05AM (#15155771)
Some Googling finds http://caselaw.findlaw.com/us-3rd-circuit/1853477.html , which says there's both an internal hard disk and an external hard disk, and the external one is the one at issue:

> The Forensic examination also disclosed that Doe had downloaded thousands of files known by their “hash” values to be child pornography.[3] The files, however, were not on the Mac Pro, but instead had been stored on the encrypted external hard drives. Accordingly, the files themselves could not be accessed.

If he's downloading them or storing them by some content-addressable system (torrents, something rsync-like that generates hashes before syncing them, etc.), I can easily believe that there's forensic evidence on the internal hard drive that the files were copied, including the hash of the plaintext, but the files themselves aren't present in plaintext.

Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by wyager on Saturday September 02, 2017 @11:03AM (#15156304)
Ding ding ding. This is the answer. I know OS X also stores hashes of at least some downloads for the purpose of checking certificates on downloaded apps and disk images.

This is clearly enough evidence to convict the guy, so I imagine they're holding him for some political reason (like generating jurisprudence for violating the 5th amendment in the future).

Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by geofft on Saturday September 02, 2017 @08:36PM (#15159043)
I vaguely suspect they're holding him because they expect to get either a stronger conviction or more evidence for other cases from the contents of the external drive (e.g., maybe he's producing child porn or knows people who do).
Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by stephengillie on Saturday September 02, 2017 @08:54AM (#15155726)
Something doesn't add up in this story. Encryption and hashing are different processes with different algorithms - SHA vs MD5. For example, IPSec VPNs hash a packet with MD5 to prevent tampering, then encrypt the hash with SHA256 to prevent viewing. (Because the message could be modified while encrypted, were it not also hashed.)

Isn't the point of encryption that it doesn't create a reliable hash - that 2 identical files will appear different while encrypted, as part of the larger encrypted drive?

Or are encrypted-hash collisions possible when small files are encrypted individually?

Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by Neverbolt on Saturday September 02, 2017 @09:13AM (#15155805)
There are several misconceptions in this comment, first and foremost that SHA is encryption, which it is not. It is a hashing algorithm, not unlike MD5, though "stronger".

Secondly, when you have two files that are exactly the same and encrypt both with the same key, method and parameters then both will have the same hash. ( Though I could imagine Apple doing stuff with padding, and other parameters to make this not happen)

Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by chatmasta on Saturday September 02, 2017 @09:22AM (#15155836)
Right... so for the authorities to "compare" the hash of an encrypted file with that of a known original, they would need to encrypt the original with the same private key used to encrypt the encrypted file. If they had that private key, wouldn't it be sufficient to unlock the drive? They wouldn't need his cooperation to decrypt the drive if they had a private key. So it seems like a catch-22 compelling him to decrypt the drive based on a hash collision.
Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by weinzierl on Saturday September 02, 2017 @10:28AM (#15156123)
Exactly, but the original quote doesn't say that they compared decrypted content with known hashes. It doesn't say anything about how they learned about the "content stored on the encrypted hard drive".

"Investigators said content stored on the encrypted hard drive matched file hashes for known child pornography content."

I read it like this: They figured out that the disk had some incriminating files, as I described in another comment of this thread. To make this work hashes are of no use, they need the original files. For various reasons they might not want to admit that they are in possession of the original files, hence the cryptic and vague phrasing.

Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by foldr on Saturday September 02, 2017 @10:48AM (#15156222)
If they're in possession of the original files they can just look at the files to see what they contain.
Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by weinzierl on Saturday September 02, 2017 @12:27PM (#15156812)
Sure. My point was more that they might possibly not want to openly admit that they are in the possession of the original files.

I'm sure law enforcement has lists with hashes of incriminating files, but I'm not sure if they are allowed to keep the original files. Even if they are, maybe they just want to avoid public discussion about it.

Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by foldr on Saturday September 02, 2017 @01:38PM (#15157229)
It's logically impossible for them to have the hashes of the files without having had the files at some point. If they no longer have the files, you might just as well take their word for it as to the content of the files as take their word for it what the hashes of the files are.
Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by beisner on Saturday September 02, 2017 @11:09AM (#15156334)
There could be a hash collision, which might be enough to provide reasonable doubt for a jury.
Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by johncolanduoni on Saturday September 02, 2017 @12:07PM (#15156681)
The chances of a hash collision are drastically lower than the false positive rate of a DNA test, and US courts have accepted the latter for a long time.
Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by foldr on Saturday September 02, 2017 @01:37PM (#15157221)
No, I mean if they have the image files, they can look at the images. It would be irrelevant what the image hashes to.
Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by hndamien on Saturday September 02, 2017 @09:25AM (#15155849)
With the same key is a very important distinction there.
Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by wyager on Saturday September 02, 2017 @10:55AM (#15156257)
All modern encryption schemes inject randomness into the encryption process (via an initialization vector) so no, there is no way to check if two encrypted files are the same file. The investigators' claim doesn't make sense.
Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by Xorlev on Saturday September 02, 2017 @11:08AM (#15156325)
This. The padding changes as well. You have to work hard to produce the same ciphertext from a given plaintext.

The claim is bogus.

Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by djsumdog on Saturday September 02, 2017 @09:33AM (#15155887)
I would assume they have evidence, maybe via a warrant to his ISP, that showed the transfer of files with hashes of known illegal content. They might have evidence content was transferred to a computer on an account in his name, but they most likely do not have evidence of his actual possession of illegal content.
Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by icebraining on Saturday September 02, 2017 @10:44AM (#15156196)
How would the ISP have such hashes? Are they hashing and recording every file one downloads? And the sources of this illegal content weren't even using HTTPS, let alone Tor?
Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by dozzie on Saturday September 02, 2017 @09:34AM (#15155897)
> Encryption and hashing are different processes with different algorithms - SHA vs MD5. For example, IPSec VPNs hash a packet with MD5 to prevent tampering, then encrypt the hash with SHA256 to prevent viewing.

You do realize that MD5, SHA-1, and SHA-256 are all hashing algorithms? I highly doubt you meant a cipher built from a hash function (easy to do with Feistel net, though nobody does that), especially that IPsec doesn't define any such thing, from what I remember.

Given that you apparently don't understand how encryption and hashing work and relate to each other, you're not in a position to question the technical aspects of the story.

Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by campuscodi on Saturday September 02, 2017 @10:49AM (#15156230)
Article was updated with the following link to sustain the source of the information: https://arstechnica.com/wp-content/uploads/2017/03/rawlsopin...
Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by keehun on Saturday September 02, 2017 @11:02AM (#15156302)
Great source. Here's the relevant bits:

  Agents  from  the  Department  of  Homeland  Security then  applied
  for  a  federal  search  warrant  to  examine  the seized  devices.
  Doe  voluntarily  provided  the  password  for the Apple iPhone 5S,
  but refused to provide the passwords  to  decrypt  the  Apple  Mac  Pro
  computer  or  the external  hard  drives.  Despite  Doe’s  refusal,
  forensic  analysts  discovered  the password to decrypt the Mac Pro
  Computer, but could not decrypt the external hard drives.
  Forensic examination of the
  Mac  Pro  revealed  an  image  of  a  pubescent  girl  in  a  sexually
  provocative  position  and  logs  showing  that  the  Mac  Pro  had
  been   used   to   visit   sites   with   titles   common   in   child
  exploitation, such as "toddler_cp," "lolicam," "tor-childporn," and  “pthc.”
  The  Forensic  examination  also disclosed that Doe had downloaded thousands
  of files known by  their  “hash” values  to  be  child  pornography.
  The  files, however,  were  not  on  the  Mac  Pro,  but  instead  had  been
  stored  on  the  encrypted  external  hard  drives. Accordingly,
  the files themselves could not be accessed.
So it looks like they got the hashes from logs/forensic evidence collected from an decrypted Mac Pro.
Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by infinisil on Saturday September 02, 2017 @08:54AM (#15155724)
> Do they encrypt known CP files with the FileVault key and then compare?

This shouldn't work because if they had the key (which should be encrypted with the password) then they could also just decrypt the rest.

Somebody on IRC said that maybe the encrypted filesystem saves hashes of the files unencrypted, but not sure if Apple's FileVault does this.

Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by Pywarrior on Saturday September 02, 2017 @08:57AM (#15155738)
Storing hashes of unencrypted files, would that allow FileVault to verify it was decrypted without error?
Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by poizan42 on Saturday September 02, 2017 @09:02AM (#15155758)
The correct order is hash then encrypt, exactly so you can't do that. Now I don't know if FileVault is doing this correctly, but hopefully it does.

Edit: So two people have downvoted me without explanation. Is what I'm saying wrong?

Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by slaymaker1907 on Saturday September 02, 2017 @12:32PM (#15156854)
You could also hash, encrypt, then hash again if you wanted extra integrity without decrypting. This is technically done with HTTPS through the TCP hash.
Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by mdekkers on Saturday September 02, 2017 @12:14PM (#15156723)
two people have downvoted me without explanation

Sadly, that is the new normal for HN (and, I'll be downvoted for saying something like this)

Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by maaaats on Saturday September 02, 2017 @10:02AM (#15156008)
You can't unhash, so you could never retrieve the original file again.
Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by poizan42 on Saturday September 02, 2017 @10:04AM (#15156020)
What do you mean? You obviously store the encrypted file together with the encrypted hash.
Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by maaaats on Saturday September 02, 2017 @10:08AM (#15156044)
Then I guess me and the downvoters thought you meant hashing the files for encryption :)
Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by ja27 on Saturday September 02, 2017 @09:16AM (#15155816)
My understanding is that they know the file hashes and path they were written to from logs of the tool he used to download them.
Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by lafay on Saturday September 02, 2017 @10:49AM (#15156225)
Yes, this. Whatever was used to share or transfer the files generated a cleartext log with MD5 hashes, which was written somewhere other than the encrypted volume.
Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by ivanbakel on Saturday September 02, 2017 @08:58AM (#15155743)
Hashes might not fall under being "beyond reasonable doubt" - I'd be interested to see the legal history, if any, of them being used in convictions. There'll always be the argument of the pigeonhole principle.

On a similar note, I wonder if this will spur interest in a kind of file-doping program to confuse hashes of drive contents. A few pixels won't make a difference if you're planning on just viewing some images.

Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by sjy on Saturday September 02, 2017 @11:36AM (#15156494)
Whether a person's guilt has been proven beyond reasonable doubt is a question of fact for the judge or jury deciding a particular case, and not something that can be determined by precedent. But given that people are regularly convicted of historical sex offences based solely on the credible testimony of the victim, it is difficult to imagine that a judge or jury would find a person not guilty of possessing a particular file solely on the basis of the pigeonhole principle.
Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by kakarot on Saturday September 02, 2017 @09:46AM (#15155937)
I wonder if the same kind of error-tolerant fingerprinting used in technology like Shazam (recognizing songs from ambient recordings) could be generalized to combat such a doping program.

You might have to do more than change a few pixels here and a unicode character or meta tag there. I even suspect things like color grading and, say, something like batching multiple images or text files together into one file, could be accounted for.

Not to mention, such a doping program would preferably alter files in an imperceptible (aka, less mutated) fashion.

I am a bit of an audiophile with my music and go to great lengths to rip high-quality, lossless, perfectly-encoded tracks for the sake of historical preservation. I imagine some pedophiles feel the same way about their data and the thought of tampering with the data's original state is abhorrent.

Even a colorshift or one or two changed pixels might make it worthless in their eyes, much like a bad rip with barely perceptible clicks or an altered noise floor is worthless to me.

Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by shpx on Saturday September 02, 2017 @10:29AM (#15156130)
https://en.wikipedia.org/wiki/PhotoDNA

They usually aren't using SHA (maybe they are in this specific case).

Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by kakarot on Saturday September 02, 2017 @11:02AM (#15156300)
Oh cool, I'd heard of PhotoDNA but I didn't know the details behind it. Thanks!

"It works by converting the image to black and white, re-sizing it, breaking it into a grid, and looking at intensity gradients or edges."

Pretty cool piece of technology. Seems like it covers the obvious bases. I imagine it also ignores meta tags as part of the hashing process, and operates directly on the pixel information.

Perhaps one way to circumvent detection without making perceptual modifications (which would have to be somewhat significant to thwart the above method) could be a program that losslessly converts all of your images' pixel data to a generated file type only understandable by a program with a specific key in memory, which either directly displays the image or creates temporary files that could be used by a regular image viewer? The files could possibly be signed by more than one party for extra protection. I know it sounds just like encryption but I'm thinking of something a little different. Sort of a singular encrypted file that can be securely transferred to any file system.

Sounds like a fun and challenging project but I'd hate for it to be so successful that it leads to child pornographers getting off the hook.

"In December 2016, Facebook, Twitter, Google and Microsoft announced plans to use PhotoDNA to tackle extremist content such as terrorist recruitment videos or violent terrorist imagery."

Dear lord, that is a stupendously slippery slope.

Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by geofft on Saturday September 02, 2017 @09:06AM (#15155777)
I think they're also looking for other files, whose hashes they don't have forensic evidence of, to secure a stronger conviction (e.g., they might suspect him of producing child pornography and not just downloading it, and so they're looking for files whose hashes they don't already know).
Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by cmiles74 on Saturday September 02, 2017 @09:18AM (#15155824)
I was thinking perhaps the hash is from something like BitTorrent, where they have a list of hashes that actually identifies components of the file. Then they see that the data for a particular series of matching hashes looks like they were saved to an external drive.
Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by nashashmi on Saturday September 02, 2017 @09:00AM (#15155750)
Depends on the kind of encryption used. If the encryption is convergent encryption, the hash ID stays.
Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by weinzierl on Saturday September 02, 2017 @09:29AM (#15155868)
> If the disk is encrypted how can they match file hashes?

This is an attack, which contemporary block based FDE doesn't really protect you well from. Bitlocker, FileFault, TrueCrypt, VeraCrypt basically operate on one disk block at at time and this means they cannot hide data patterns well. Or as Thomas Ptacek put it in his article "You Don't Want XTS" [1]

>It’s ECB-like. It can’t do a perfect job of providing privacy.

This is also why Thomas Ptacek and others are advocating that FDE is not a complete replacement for file based encryption.

> But that’s the big problem: sector-level encryption sucks. It’s messy, provides fewer security guarantees than conventional message encryption, and makes tradeoffs tailored to the challenges of encrypting disk sectors.

> Sector-level crypto is last-resort crypto.[1]

The Wikipedia article about ECB[2] (which is not used in current FDE) has a dramatic example where the image of the Linux penguin is clearly recognizable in the ciphertext.

[1] https://sockpuppet.org/blog/2014/04/30/you-dont-want-xts/

[2] https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation

Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by wyager on Saturday September 02, 2017 @10:58AM (#15156272)
This is 100% wrong. XTS-mode AES absolutely protects you from known-plaintext attacks like the investigators apparently claim to have pulled off. I suspect we don't have the full description.
Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by weinzierl on Saturday September 02, 2017 @12:12PM (#15156712)
> XTS-mode AES absolutely protects you from known-plaintext attacks like the investigators apparently claim to have pulled off.

1. I didn't claim XTS-mode AES is vulnerable to known-plaintext attacks.

2. I don't believe the investigators claim to have pulled off a known-plaintext attack. What is your source for this?

Re:Man Who Refused to Decrypt Hard Drives Still in Prison Af... by wyager on Saturday September 02, 2017 @12:21PM (#15156774)
You said:

> Bitlocker, FileFault, TrueCrypt, VeraCrypt basically operate on one disk block at at time and this means they cannot hide data patterns well.

This is wrong, but you claimed it. In the context of this thread (matching files on an encrypted disk with known unencrypted files), that's a known-plaintext attack.

Maybe you weren't aware you were making this claim, but you did.