News for hackers. Stuff that matters.
Re:Show HN: Neural-hash-collider – Find target hash collisio... by iaw on Wednesday August 18, 2021 @11:06PM (#28229906)
Really naive question. What's to stop apple from using two distinct and separate visual hashing algorithms? Wouldn't the collision likelihood decrease drastically in that scenario?

Again, really naive but it seems like if you have two distinct multi-dimensional hashes it would be much harder to solve the gradient descent problem.

Re:Show HN: Neural-hash-collider – Find target hash collisio... by 63 on Wednesday August 18, 2021 @11:24PM (#28230009)
I'm fairly sure they do, actually. It was in one of the articles earlier today that Apple has a distinct, secret algorithm they perform on suspected CSAM server side after it gets flagged by the client side neural hash. Then only after 30 such images from a single user are identified as CSAM by both algorithms will they be sent to a human reviewer who will confirm their contents. Then, finally, law enforcement will be alerted.

There has been a lot of hyperbole going around and the original premise that this is a breach of privacy is still true, but in my opinion the actual repercussions of attacks and collisions are being grossly exaggerated. One would have to create a collision with known CSAM for both algorithms (one of which is secret) which also overlaps with a legal porn image that could be misconstrued as CSAM by a human reviewer, or at the very least create and distribute hundreds of double collisions to DOS the reviewers.

Re:Show HN: Neural-hash-collider – Find target hash collisio... by blintz on Thursday August 19, 2021 @02:46AM (#28231086)
But relying on an algorithm staying secret is security-by-obscurity 101. You can rely on a cryptographic key staying secret; you can't rely on the design of an algorithm staying secret (I do agree there's a little blurring of these lines with large, trained models, but the gist remains - you can't just hope that nobody sees the structure/weights of your second hash function).
Re:Show HN: Neural-hash-collider – Find target hash collisio... by MrMoenty on Thursday August 19, 2021 @03:25AM (#28231296)
Given that training the same network (with the same structure) will result in different weights and different hashes with high probability, I would argue that the weights actually have all the important properties of a secret key. You would just need to treat them as one operationally, i.e., make sure as few people as possible have access, and use truly random instead of pseudorandom numbers during training.
Re:Show HN: Neural-hash-collider – Find target hash collisio... by user-the-name on Thursday August 19, 2021 @07:06AM (#28232399)
Why can you rely on a cryptographic key staying secret, but not on a trained model staying secret? Both are pieces of binary data that you keep on your own machines and do not give to others.

They are exactly the same case.

Re:Show HN: Neural-hash-collider – Find target hash collisio... by saithound on Thursday August 19, 2021 @08:37AM (#28233032)
There's a massive difference. In fact, the data describing the trained model is not at all analogous to a cryptographic key.

A cryptographic key is a piece of information which, as long as it remains secret, should be sufficient to protect the confidentiality and integrity of your system. This means that your system should remain secure even if your adversary knows everything else apart from the key, including the details of the algorithm you use, the hardware you have, and even all your previous plaintexts and ciphertexts (inputs and outputs). If the key fails to have this property, your cryptosystem is broken.

The trained model (or the weights of a NN) does not have this property at all. Keeping the model secret does not ensure the confidentiality or integrity of the system. E.g. just knowing some inputs and outputs of the secret model allows you to train your own classifier which behaves similarly enough to let you find perceptual hash collisions. If you treat your model as a cryptosystem, this would be a known-plaintext attack: any system vulnerable to these is considered completely and utterly broken.

You'd have to keep all of the following secret: the model, all its inputs, all its outputs. If you manage to do that, this might be secure. Might. But probably not. See also Part 2 of my FAQ, which happens to cover this question. [1]

[1] https://news.ycombinator.com/item?id=28232625

Re:Show HN: Neural-hash-collider – Find target hash collisio... by user-the-name on Thursday August 19, 2021 @08:53AM (#28233212)
> E.g. just knowing some inputs and outputs of the secret model allows you to train your own classifier which behaves similarly enough to let you find perceptual hash collisions.

This seems highly unlikely. You could train a model to find those exact known hashes, but I highly doubt you could get it to accurately find any other unknown hash.

> You'd have to keep all of the following secret: the model, all its inputs, all its outputs.

These are all, in fact, secret.

Re:Show HN: Neural-hash-collider – Find target hash collisio... by saithound on Thursday August 19, 2021 @09:27AM (#28233547)
> This seems highly unlikely. You could train a model to find those exact known hashes, but I highly doubt you could get it to accurately find any other unknown hash.

Your "highly doubt" is baseless. Black box attacks (where you create adversarial examples only using some inputs and outputs, but not the model) on machine learning models are not new. They have been demonstrated countless times [1]. You don't need to know the network at all.

> These are all, in fact, secret.

This is not the case, since regular, unprivileged Apple employees can and will look at the inputs and outputs of the model (the visual derivatives and their hashes). It's also irrelevant.

You insist that there is some kind of analogy between "keeping the model secret" and keeping a "cryptographic key" secret. There is no such analogy. It makes no sense. It is simply not there. Keeping a cryptographic key secret keeps confidentiality and integrity. Keeping your model secret accomplishes neither of these.

[1] https://towardsdatascience.com/adversarial-attacks-in-machin...

Re:Show HN: Neural-hash-collider – Find target hash collisio... by user-the-name on Thursday August 19, 2021 @03:39PM (#28238358)
> Your "highly doubt" is baseless. Black box attacks (where you create adversarial examples only using some inputs and outputs, but not the model) on machine learning models are not new. They have been demonstrated countless times [1]. You don't need to know the network at all.

This is not a machine learning model as such, though, and is used differently than they are.

> This is not the case, since regular, unprivileged Apple employees can and will look at the inputs and outputs of the model

Can they?

Re:Show HN: Neural-hash-collider – Find target hash collisio... by londons_explore on Thursday August 19, 2021 @03:12AM (#28231210)
Security by obscurity has protected a lot of things successfully...
Re:Show HN: Neural-hash-collider – Find target hash collisio... by mikeyla85 on Thursday August 19, 2021 @04:00AM (#28231475)
In this context, security by obscurity is literally what protects private keys.
Re:Show HN: Neural-hash-collider – Find target hash collisio... by silvestrov on Thursday August 19, 2021 @02:41AM (#28231059)
> It was in one of the articles earlier today that Apple has a distinct, secret algorithm they perform on suspected CSAM server side

But then they still need to upload the original image to the server, and what was the reason for doing the scanning client-side then when they still upload it?

Re:Show HN: Neural-hash-collider – Find target hash collisio... by Thorrez on Thursday August 19, 2021 @02:50AM (#28231106)
>and what was the reason for doing the scanning client-side then when they still upload it?

Probably so that China cannot force Apple to hand over arbitrary images in iCloud (or all images in iCloud). With Apple's design the only images China can get from you are malicious images that people send you. If Apple scanned every image serverside without any clientside scanning, then theoretically China could get all newly-uploaded iCloud images.

Re:Show HN: Neural-hash-collider – Find target hash collisio... by ec109685 on Wednesday August 18, 2021 @11:39PM (#28230090)
They do: https://news.ycombinator.com/item?id=28230029

They also keep the second hash function private.

Re:Show HN: Neural-hash-collider – Find target hash collisio... by zepto on Thursday August 19, 2021 @12:18AM (#28230270)
They do. The system isn’t vulnerable to these collisions attacks. The people saying they are are just not aware of how the system works.
Re:Show HN: Neural-hash-collider – Find target hash collisio... by heavyset_go on Wednesday August 18, 2021 @11:35PM (#28230071)
It's common for two unrelated images come up as false positives when comparing hashes across different unrelated perceptual hashing methods.