Settings

Theme

Proof of Capture: Apple Reference Image, but open source and using steganography

merybenavente.me

129 points by merybenavente · 80 comments

Reader

10 threads
Retr0id

> we sign a perceptual hash (pHash) of the image rather than an exact pixel checksum

Perceptual hashes are non-cryptographic. There are certainly collision attacks, but what about preimages? A preimage would completely break this scheme.

This paper demonstrates second-preimage attacks against PhotoDNA and PDQ: https://eprint.iacr.org/2021/1531.pdf

  • theamk

    Yep, that breaks this scheme, making it useless. But it's far from the only thing making it useless, and the github page even explicitly lists those:

    - "Small content edits slip under the threshold. [...] A localised edit covering ~15%x20% of the frame [...] passes as authentic" - this is the worst part. 15%x20% is huge, for example enough to change the face of the person or the book/text on the image.

    - "Cropping is not survivable, at any amount" - given the purported reason for perceptual hashing is surviving light editing, it's pretty disappointing that one of the most common light editing operation is not supported.

    Oh, and the whole "cryptographic chip" angle is absolutely bogus from the security perspective. OK, attacker can't extract the private key from chip. But they can simply connect the chip to a different device and have it sign anything! Given that the attacker in this model is device owner, this is absolutely trivial.

  • phh

    Considering child comment, I agree it's not great. That being said, would a bit-hash have worked? How many users are capable of sending bit-perfect images to someone else? I don't expect more than 5% of people to know...

    • Retr0id

      Yes, it is a hard problem, but that doesn't mean that we should accept non-solutions.

nmadden

Signing things by default has repeatedly been found to have serious unintended consequences. Do you really want your leaked/stolen photos to be undeniably linked to you?

https://blog.cryptographyengineering.com/2020/11/16/ok-googl...

  • mike_hearn

    Maybe cryptographers think this way, but I'm struggling to think of a case where a normal person had genuine photos leaked and then just baldly denied everything. Deniability isn't an option most people use or want to use in practice.

    On the other hand, images faked by AI is a real problem.

    • zbentley

      > a case where a normal person had genuine photos leaked and then just baldly denied everything

      "Genuine" is doing a lot of work in that sentence. A big part of the threat model for image provenance/signing/similarity diffing is identifying when images aren't genuine--if they're from elsewhere than they're claimed to be from, or have been modified.

      You're right that there are privacy/security costs to attributability, and that it's not always the right thing to do. I hope that keeping provenance information either entirely cryptographic in nature (okay, the image has a signature--you can't determine anything about that signature other than "signed with this key y/n" when you present a key) or reducing identifying or fingerprintable information presence in provenance metadata is sufficient to mitigate some of those concerns.

      Dr. Neal Krawetz has written and researched a lot about this topic:

      https://hackerfactor.com/blog/index.php?/archives/1069-The-B...

      https://hackerfactor.com/blog/index.php?/archives/1098-Metas...

      https://www.hackerfactor.com/blog/?/archives/529-Kind-of-Lik...

    • smalltorch

      I don't think it's really the utility of deniability, rather a slippery slope of and loss of freedom from a mechanism that stamps every photo taken and silently cryptographically ties it to the photo taker.

      That could obviously be used for good or bad purposes.

      Reminds me of tracking dots in printers. It was implemented to provide a way to track a document to its source.

  • postit

    It reminds me of the era when the Stasi kept archives of typewriter samples and typefaces so they could trace the authors of anonymous letters deemed subversive.

    • netsharc

      Samples, or sampling of each typewriter's idiosyncracies?

      This post https://foxfire.blog/explorations/the-typewriter-that-became... claims "specific machine":

      > The forensic science behind this was genuinely elegant. No two typewriters print identically. The mechanical tolerances of individual typebars—those metal arms that swing up to strike the ribbon—create unique signatures. Forensic document examiners look at three primary characteristics: alignment (whether a letter strikes slightly above or below the baseline), impression (whether one side of a letter prints darker than the other due to uneven wear), and damage (a chipped serif, a broken bowl on a lowercase “g”, a filled-in counter on an “e”). Taken together, these micro-imperfections form a pattern as distinctive as a human fingerprint—or so the authorities claimed.

      > The East German Stasi took this principle to its industrial extreme. They maintained an exhaustive registry of type samples, a vast database of typewriter fingerprints. When a dissident pamphlet surfaced, the Stasi could compare its letterforms against their archive and, in theory, trace the text back to the specific machine that produced it. The countermeasure was ingenious in its simplicity: dissidents sought out pre-communist typewriter models—early Mignon or Ideal D machines manufactured before the registry existed. A typewriter without a file was a typewriter without a name. It could speak and not be traced.

      Since they had control of commerce, I suppose it was possible to intercept every typewriter and "fingerprint" it before it is sold, or even tweak the typewriter to produce something unique (e.g. chipping a typebar so it prints a particular letter distinctly). Hah, needing to register your name/address to buy a typewriter feels spooky too. And if it gets stolen, you'd have to tell the authorities that it's no longer in your possession.

fitzn

Here's a toy for embedding small text into images steganographically: https://github.com/fitzn/atrium

  • smalltorch

    Here's a toy for embedding text inside random HN comments.

    https://gitlab.com/here_forawhile/edasm

    Example:

    After wholly implemented our logging layer with dagger, I posit that the real regression was not the aws itself but the rigorously prototyped around authentication. We consequently extraordinarily profiled the config, henceforth simplified every edge case, and the optimization were unmistakably exemplary. alternatively, the aforementioned monitoring is comparable advantageous to an incremental security environment. I endorse this path if your security team has rigorously instrumented a massive rust codebase before.

    • gpugreg

      Both DeepSeek-V4.1-Flash and GLM-5.3-Flash failed to decode your embedded example text. I failed, too, but I only spent a minute trying to figure out your repo before giving up and telling AI to do it. Anyway, maybe you want to improve your docs?

      • smalltorch

        That's makes sense because I am the only key holder in existence to decode! It should decode with other 'keys' but It won't be the correct message.

        The text decodes to 'hello world'.

        Also, this engine won't compile on non arm64 chips without virtualization layers.

        Check the 'Prerequisites' section for required packages to compile.

        • 1over137

          why require arm64?

          • smalltorch

            There were significant performance improvements to write the engine in assembly.

            The project started as a pure python version, but it's pretty slow.

  • merybenaventeOP

    cool work!

treyd

I don't understand why few people are pointing out the obvious vulnerability here that you can control the wires going into the photosensor controller and pretend that the photosensor is capturing whatever image you want. I imagine it's not exactly trivial to do this, but a grad student with an FPGA could probably figure it out.

  • whywhywhywhy

    >a screen attack still works: photograph a screen displaying an AI image and you get a signed photo of a fake

    you don't need to do that just photograph a screen.

    This seems close to worthless in "identifying real photos vs AI" for someone actually wanting to do something bad with an AI image, although probably very useful at identifying which phone took a photo when ("the root of trust stays inside Apple's Private Cloud Compute") seen as it's not an entirely local solution a bad actor government could use their powers to completely abuse this.

    • DoctorOetker

      its conflicting desiderata: a videographer doesn't want to constantly power a device to maintain provable continuity, but screen attacks necessitate such a scheme

      a continuous stream of video from factory to customer to observation should prevent screen attacks, if there is a trustworthy framework for processing and checking the absence of screen slide-ins etc.

    • ares623

      if geolocation data can be captured in the same signature, that would be a good enough approximation for most relevant cases I think.

      • brainwad

        GNSS signals can be relatively easily faked because the original signals are very weak so overpowering them doesn't require much broadcast power.

        • 15155

          Jamming them is easy, replaying them so as to trick unacquainted receivers is easy, but "faking" a network of signals so as to precisely control present a specific location is not easy or feasible.

          "Overpowering" (as to jam) inherently means detectable, these signals are arriving below the noise floor anyway. And if you aren't overpowering, the original signals will leak through. Also, depending on the sophistication of the receiver, your ability to present an implausibly different location may not exist at all (AGPS.)

        • ares623

          ah, damn.

  • altairprime

    Because doing so does not materially devalue Apple’s product. Sure, a dedicated attacker could try to overcome it, but few will, and only people of such serious consequence that they can afford the effort of modification. By and large this puts Apple into direct competition with Nikon and it’s long overdue that someone ship this capability to a wider market than authorities.

    Also, remember how Touch ID sensors are cryptographically paired, and consider whether Apple could bake that into a camera sensor rather than a fingerprint sensor. If they can, then you can run wires all you want; the attestation chain will not be valid. I’d be shocked if they were willing to launch the product without that, and there’s a new hardware dependency or else they’d have released it for earlier phones.

  • Retr0id

    Simpler than that, you can just talk to the cryptography IC yourself and ask it to sign stuff. No need for an FPGA, just an arduino. Given the datasheet I imagine any LLM from the last year should be able to oneshot it.

    • hex4def6

      if

      I imagine on apple silicon this is buried deep in silicon / ISP IP block, and isn't a discrete IC.

      • Retr0id

        But it is, the discrete IC is pictured in the article.

        • klausa

          I think you're talking past each other.

          You're talking about the device that's in the blog post; the person you're replying to is talking about the thing that Apple is shipping soon.

  • figmert

    Or, as the author said, you can just photograph an AI generated picture, and that will work too.

    • petu

      This feature is Pro phones only, not Duo: https://www.apple.com/iphone/compare/ ("Apple Reference Image (Fusion Main)")

      So only on devices with LiDAR / that can capture depth map.

    • theamk

      If there is signed metadata too, then it's pretty hard. You will need to match focus distance (it will be very small if photographing picture), GPS location, exposure and other settings. If there is a depth map, you'll need to match it too.

    • koinedad

      Adding depth sensor info to the this could help

  • TedDoesntTalk

    Even easier is to just take a picture of an AI-generated picture.

Wendell58

A pHash isn't built for this. The 15%x20% threshold that passes as authentic is enough to swap a face.

khalic

I very much hope that apple is using lidar data to determine if it's a flat surface being screened

  • ale42

    And then? What if the flat surface is a wall showing cracks and it's the photo that should have been signed?

    Maybe it should include depth info in the image instead.

Lammy

In the future, people willingly surveil themselves 24/7 with cryptographic proof, because fake images and video will be so good that it will be the only way to prove what one didn't do. Total Information Awareness achieved :D

amelius

One of the few advantages of "not owning your device".

Glad that at least we have that now.

vzaliva

I expect in the near future all digital cameras to digitally sign the images they take. Even before AI slop, it was useful to avoid manual alterations. AI makes it all too easy, so it makes sense.

However, this will certify only the original image. I think the missing part of this is additional layers of certification which allow some image editing (e.g., rotating, contrast, etc.) yet clearly document that the image was modified and link to the original image ID. Kind of like a signed git log.

  • zvr

    People may be interested in the work of the Coalition for Content Provenance and Authenticity (C2PA) https://c2pa.org/

  • xg15

    EXIF data is stripped for a good reason - because it can be a privacy hazard. Suddenly this plays no role anymore?

    • stvltvs

      Signing the raw image data wouldn't require also signing the EXIF metadata. For privacy, you could later strip out everything except the raw image and the camera's signature and still prove that the image is unaltered.

      • cortesoft

        What are you signing it with, though? A unique key that only exists on your device... so it will perfectly tie a photo to a specific camera.

        Even if you didn't know who owned the camera, you could identify other pictures taken by that same camera, and information in those photos might let you figure out who owns the camera.

        • anhner

          But you are signing it with your _private_ key, presumably. You know, the key that stays on your device and nobody knows?

      • smalltorch

        I think he's saying the existence of a camera signature is the privacy issue maybe.

        • lokar

          You can remove it all.

          If authenticity later becomes an issue you can produce the original.

    • doc_ick

      Ontop of this, including a photo edit history in a photo including the original photo would increase the size of a photo to be completely unusable or unshareable.

      • xg15

        I understood the GP so that only some unique ID or hash of the original image would be included, not the image itself. Basically like the commit chain of Git but without the actual content blobs.

        You could use this data to prove that image B is an edit of image A if you already have both A and B.

        I still think this is a bad idea, because this all requires the images to have some sort of ID - and that seems like a prime target for tracking.

        • lokar

          You can publish a fully stripped image (as people do now for exif), and retain the original

    • hamdingers

      In the contexts where you need to prove an image is a real unaltered photograph (court cases, news media, science, etc) privacy is usually not a concern.

      Nobody cares if your social media photos are edited, they probably are, it's fine.

      • xg15

        I'm pretty sure if signing images becomes the norm, because cameras will do it automatically then social media sites etc will start to care - or at least be thankful for the additional metadata.

        • theamk

          EXIF already includes extensive metadata, including phone model and GPS location. For professional cameras, there is often camera and lens serial numbers too.

          This has been the case for many years, and so far social media sites never care - they strip that info instead. Why would this change with one more extra piece of metadata?

    • xoa

      >EXIF data is stripped for a good reason - because it can be a privacy hazard. Suddenly this plays no role anymore?

      Can you clarify what your actual complaint is here? Putting aside for a second obvious implementation options, it's pretty standard that there can be a tradeoff between privacy and trust. Any of us are still perfectly free to upload images for fun to forums or social media or whatever that are private, or edited or whatever we like. But if there's something we [i]want[/i] to prove, this gives an extra option to do so. And in particular the set of cases where one cares the most about enhancing authenticity appears at first thought to be pretty much a union set with the cases where one will put their name (or at least the location and time of the picture in question) behind the image? Like, can you give examples of specific cases you are imagining where simultaneously the photo itself reveals no information about time and location [i]and[/i] it's something local/national/international-newsworthy where people would fear AI-alteration? Like, say you're photographing at a protest to document it including any violations of law. By definition, the images you take reveal the location and the time. That's the whole point of them. Having the location and timestamp signed wouldn't reveal anything extra as long as the photo was unaltered.

      And actual legit journalism always has name(s) standing behind the reporting. Or for that matter, even if we're merely talking something like a review of a product, is it actually wrong to put a name or pseudonym behind that review if you expect readers to give you much credence? I mean, you'd be free in terms of law and tech to not bother. But even long before the current growing AI-slop age a lot of us have been starting to treat anonymous reviews with a lot of skepticism, or discounting them entirely for some product classes, for good reason.

      Even in terms of maintaining privacy, remember we already have "tools" for that which this in turn could further help. You could privately report a tip to a reporter at a media organization, and then they could report on that without revealing you but be able to say "we verified the signature of the raw image and sensor data" alongside normal follow up. Then it's their name, but having a stronger chain behind it could still be helpful in places.

      Finally getting back to "implementation options", there's no technical reason the image and multiple sets of metadata can't all be signed separately by the sensor stack such that you can pick & choose what to include and still have it all be signed, with readers giving greater or lesser weight to the trust based on your choices.

      • xg15

        I think what got me worried is the GPs take that "I expect in the near future all digital cameras to digitally sign the images they take". Sure, if you have your special, verification-enhanced camera, go for it. But if this goes like with smartphones and we have all cameras embedding such a signature - and therefore all cameras are made locked-down and tamper-resistent - then we have another category of devices removed from control of their users.

        > Any of us are still perfectly free to upload images for fun to forums or social media or whatever that are private, or edited or whatever we like.

        First, the paper proposed a method of embedding the metadata inside the actual image pixels in a way that makes it difficult to remove. I think it's still possible, but you're will need a specialized tool to do so and it will alter the image.

        Second, that's assuming forums or social media would still be allowing uploading unsigned images. If AI images really become as much of a problem as anticipated here, then sites might decide to block any image they can't verify completely.

        > Like, can you give examples of specific cases you are imagining where simultaneously the photo itself reveals no information about time and location [i]and[/i] it's something local/national/international-newsworthy where people would fear AI-alteration?

        All kinds of photos from warzones have this property. We wouldn't have an entire science of geolocating photos from landmarks that were accidentally captured if everyone was so easy with putting their GPS coordinates in the file.

  • teravor

    if such a method gains traction then so will the effort to bypass it. either by stealing private keys or just projecting light onto the sensor.

  • ranger_danger

    There will always be a way around it. There are even open-source alternative/hacked firmwares for professional DSLR cameras where tampering with the signing may be possible.

    And this still doesn't help any other kind of image e.g. screenshots, photo of a screen etc. that can make the camera signatures largely pointless depending on the context.

    • stvltvs

      The idea is to be able to prove that a photo you took was captured by a camera, not generated. That would be helpful in the context of a disputed news story, a court case, etc.

      Would that ever be relevant for a screenshot?

      • qingcharles

        It's not massively helpful for a court case, IMO. This has been handled the same way since the invention of photography: ask the photographer to swear under oath they took the photo. (technically, laying a foundation for the evidence)

      • ranger_danger

        Yes in multiple ways, and there's probably more than this:

        It's relevant that a screenshot doesn't have a signature, in the case that you want to remove any "proof" or tracking info from a real photo when uploading an image. Maybe I don't want people to know what brand/model of camera I use.

        And it's relevant if a screenshot did have a signature if you want to "prove" that the screenshot itself hasn't been tampered with after the fact.

        • xg15

          In the method proposed in the paper, the signature is stored in the pixels and ostensibly even survives some compression. So if you made a screenshot of a signed image, the image would still have its signature inside the screenshot, but the screenshot wouldn't have any (new) signature as a whole.

          That's how I understood it at least.

          • ranger_danger

            I would assume you could make big enough differences in color/contrast/brightness and especially 3D rotation (similar to taking a photo of a screen) would make such a signature unreadable... but I would love to be proven wrong.

  • nulltrace

    Soon my phone can cryptographically prove the beauty filter lied at capture time.

xg15

> For example, a screen attack still works: photograph a screen displaying an AI image and you get a signed photo of a fake. But it's always nice seeing big actors interested in addressing this problem.

Yeah, very nice. So this whole idea basically doesn't work - but we get a new stealth way to embed metadata in an image that can be used for tracking...

(And a new narrative why cameras need to have TPMs and locked-down firmware as well)

  • shagie

    Photos of photos has always been a problem.

    In days of old, a Polaroid photo was considered "proof of capture".

    I've got a Polaroid daylab 35 plus sitting in storage somewhere (https://www.instantoptions.com/wp/faqs/daylab/). You can project a slide through it onto Polaroid film, expose it, and have the image there.

    I was also able to find a company that did slide printing. It was possible to send them a digital image and they'd send you back a slide with that image... which I then used to make a Polaroid of that image.

    I had a classic 600 Polaroid photo of a UFO landing.

  • ChocolateGod

    Couldn't the camera encode information from the depth sensor and prevent this.

    • TedDoesntTalk

      I will make miniature dioramas and photograph them.

      • mandolingual

        At that point you've earned the fruits of your deception, just like the tricksters who spent time doing physical photo editing.

      • petu

        Miniature dioramas wouldn't be size appropriate. Apple could detect faces/cars/other common objects of ~known size and verify -- or even just dump depth map for anyone to check.

    • petu

      It seems to be what Apple is doing, this feature is only available on the 18 Pro's (which have depth sensor on the back), but not Duo.

  • azatom

    That signature contains time and optionally gps coords, and taking photo of a screen is not simple. So overall does solve some problem

    ps:most important: cam/lens settings also in the digital sig, what for a screen is different

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection