Remix.run Logo
floathub 8 hours ago

According to the article, he was actually using GrapheneOS and gave the border official the Duress PIN. So I guess technically it was the official that erased the data :-)

victorbjorklund 5 minutes ago | parent | next [-]

Not how the law works. If I put a bomb in a box. It will explode if a certain pin is put in. And you ask ”can I open the box? What is the pin?” And I say ”here is the pin to open it” and the bomb explodes. Do you think I can claim they blew up themselves ?

jbird99 4 minutes ago | parent | prev | next [-]

A better feature would be a 2nd PIN that unlocks the phone to a secondary profile, which you would leave pretty bare for situations like these.

dkga an hour ago | parent | prev | next [-]

Interesting. So is this GrapheneOS indeed operationally good for keeping one‘s data private?

michaelt 34 minutes ago | parent | next [-]

I mean, it sounds like it would be even better if the duress response was more subtle.

A duress code might let me wipe my phone when someone holds a gun to my head and demands I unlock it. Problem is, there’s still someone holding a gun to my head.

bengt 18 minutes ago | parent [-]

He had an e-reader and phone. My solution would be set the phone's duress pin to the e-reader's actual pin then consent to the e-reader search providing its pin and see what happens.

The actual solution is cloud backup + re-image after the border.

spencerflem an hour ago | parent | prev [-]

Yes if you don’t mind getting arrested by our fascist border police

spacebanana7 7 hours ago | parent | prev | next [-]

I wonder whether it'd be better for a duress PIN to delete existing data and also create a semi plausible artificial profile to hide the deletion event.

dredmorbius 5 hours ago | parent | next [-]

This discussion was raised last time this story was discussed. I was among its advocates: <https://news.ycombinator.com/item?id=49061890>.

Briefly: no.

Less briefly: <https://news.ycombinator.com/item?id=49060780> and <https://news.ycombinator.com/item?id=49060716> (from the grapheneos HN account directly).

spacebanana7 4 hours ago | parent [-]

Thanks for sharing - I get the concerns people have raised in those threads, however I still feel something in this space could be useful.

Even a duress PIN which triggers predefined deletion of certain folders, messages and apps could reduce law enforcement exposure significantly.

grapheneos 38 minutes ago | parent [-]

Deleting arbitrary directories, messages and app data would be highly unreliable. There's a high likelihood of the data being recovered. It's not how computer filesystems and storage are designed to work. Reliable deletion of data requires setting it up to be reliably deleted later on by having it encrypted on storage with keys which can be reliably prevented from ever being obtained again.

Wiping the overall data on the device via a factory reset, OS recovery mode or duress PIN/password prevents recovering any of the data because it reliably wipes material needed to derive key encryption keys and also reliably wipes the encrypted disk encryption keys. Wiping the encrypted disk encryption keys alone would not be good enough because they're stored on the SSD so imaging the SSD and restoring it could preserve the ability to recover the data. The way the key material needed to derive the key encryption keys is wiped prevents recovery via imaging the SSD mainly due to the secure element.

There's already support for reliably wiping data at the granularity of Private Spaces and secondary users. Those have their own encryption keys and can be reliably deleted due to having their own Weaver slots in the secure element and other hardware-based security integration.

Apps can also assorted generate encryption keys in the secure element and use those to encrypt data where it can be reliably deleted via wiping the hardware keystore keys. That requires apps built to have granular storage and encryption of their data.

Despite it being possible to wipe a secondary user or Private Space reliably, the past existence of it and when it was wiped will be easily discoverable via the main Owner user and system data. Preventing discovery of those profiles having existed requires an overall wipe of the data. It isn't feasible to hide it without doing that and hiding it would involve a whole bunch of unreliable removal of data without a way to prevent recovery along with redoing a bunch of statistics and other metadata to hide that there was another profile until recently. For example, things like the battery and data usage stats directly refer to the profiles. Even hiding it from naive analysis not looking at the leftover data on storage would still require changing a bunch of things to hide it.

Making data deletion of the data reliable for a whole profile or the whole data partition also requires a reboot or shutdown. Consider how much data gets loaded into the page cache and many other forms of data in the Linux kernel and other processes. Consider how much linger around in various kinds of registers, etc. including outside of the OS itself. Reboot or shutdown has code to get rid of this and the device sitting there turned off or booting again also gets rid of it.

They were clearly going to hook his phone up to forensics software on a laptop and had done what they needed to do in order to justify it for their own policies. It would not make sense to set up everything they did simply to have someone non-technical manually sift through his apps. They have widespread access to forensic software and also more advanced software with exploits. They definitely have easy access to it at a major Atlanta airport. The adversary in this case is not a non-technical human but rather advanced software from Cellebrite who are fully aware of alternative operating systems and document information on it. Their documentation directly refers to GrapheneOS and has tables listing their (currently very limited) capabilities against it.

This story got widespread news coverage and is widely known about. That should help make it clear how important it is for features to work against adversaries aware of these kinds of features. Our duress PIN/password works against adversaries aware of it. If they don't coerce a PIN/password from someone or don't enter a coerced PIN/password because they know it could be in use then the feature has worked. We want to improve the feature with secure element rate limiting integration in the future so that an OS exploit cannot be used to bypass it. The secure element already prevents an OS exploit from bypassing the limit of 20 total attempts for deriving encryption keys with massively increasing delays between those attempts. It used to solely be based on delays with throttling quickly reaching 1 attempt per day after 140 failed attempts but now there are only 20 total unique attempts. The past 5 failed unique attempts are temporarily remembered and discarded when entered again rather than trying to use them again for usability.

michaelt 20 minutes ago | parent [-]

> Reliable deletion of data requires setting it up to be reliably deleted later on

I mean - yes? If you design a subtle duress pin that only hides certain things, users would have to choose what.

I myself want the bank apps, password manager and email to disappear without a trace, but I don’t care about the social media, photos or web browser history. Other people, though, will have different priorities.

grapheneos 2 minutes ago | parent | next [-]

> I mean - yes? If you design a subtle duress pin that only hides certain things, users would have to choose what.

That's not what we were talking about. This is the full sentence we wrote:

"Reliable deletion of data requires setting it up to be reliably deleted later on by having it encrypted on storage with keys which can be reliably prevented from ever being obtained again."

What we're saying is that in order to have fine-grained deletion of data, it has to be encrypted with fine-grained keys with hardware support for deleting those keys reliably. Reliable deletion of data should also not be confused with stealthy deletion of data which is not generally possible for the kinds of data being discussed.

> I myself want the bank apps, password manager and email to disappear without a trace

You can put all of this into a Private Space or secondary user where it can be reliably deleted as a whole. There will be no way to recover any of the data if the profile is deleted. We have a planned feature for either a toggle to make the duress PIN/password only delete specific secondary profiles or more likely a 2nd duress PIN/password with that different purpose.

Deleting secondary profiles will reliably prevent recovering any of their data, at least after a reboot or shutdown. The best way to do it would be deleting them and then rebooting where the main user and secondary profiles not included in the deletion would still be there after the reboot. Without the reboot, it's unrealistic to reach the point where it's truly highly reliable. The OS does purge the keys for a secondary profile but a lot lingers around in system processes, page cache and elsewhere. If you delete a secondary profile with the goal of preventing data recovery then it's a good idea to reboot afterwards.

Dividing things up into secondary users is the way people can set up having fine-grained reliable deletion of the data. We can expand our duress PIN/password feature to support working with that.

It should be noted nothing about wiping secondary profiles is stealthy. It's very obvious there were profiles and that they were wiped. It can be determined when it happened and approximately how much data was deleted too. The data and filenames are unrecoverable but a fair bit of metadata on the sizes of files, etc. can be recoverable because that metadata is globally encrypted rather than per-profile encrypted. If you want to delete absolutely all traces of it in a reliable way, an overall wipe of the device does it extremely well. If you delete a profile then nothing encrypted by it can be recovered but what about all the evidence of it existing in the system and Owner user data? It's in the battery statistics, data usage statistics, package manager metadata and many other places. It can be purged from those but absence of data can be detected, and there's the usual problem of simply not being able to reliably delete data from computers in a fine-grained way. It's too late to reliably delete data from a file after the file has been regularly rewritten and modified.

Deletion needs to happen through deleting the keys used to encrypt all data which was ever stored in the file, so it would have had to be set up with that in advance. To reliably redact data in a file, the file would need a dedicated hardware-backed key with a new one being generated and the old one wiped as part of redacting data. Reliable wiping of a profile or the overall device works because it's all encrypted with filesystem-based full disk encryption using keys which can be reliably deleted. Profiles have fine-grained encryption for filenames and file data.

You cannot retroactively decide you want to reliably delete the data of a specific app and then do it. It's already spread all over the place. You'd need to wipe the whole profile or the whole device if it's not in a secondary profile. The OS would have had to set up a dedicated encryption key for that app's data with hardware support for deleting only that key by itself. Apps can do this and Signal is an example of app doing it which prevents backing it up via the OS backup system without also using their own backup system too.

dist-epoch 11 minutes ago | parent | prev [-]

You misunderstood the parent post, it's extremely difficult to delete the data without leaving a trace that something was deleted.

Gabrys1 29 minutes ago | parent | prev | next [-]

Maybe it could cause the phone to "randomly" bootloop or something? "Oh no, my phone is broken again, last time this happened I needed to do a factory reset"

grapheneos 16 minutes ago | parent | prev | next [-]

> I wonder whether it'd be better for a duress PIN to delete existing data

Reliably deleting data at the scale of the whole data partition, a secondary user or a Private Space is fully supported but requires a reboot or shutdown to truly complete it.

After wiping key derivation material needed to obtain the key encryption keys in multiple ways and wiping the encrypted disk encryption keys, the OS can still access the data. It still has data in the page cache, in registers and elsewhere. There are still a bunch of system processes with data tied to what was removed. The OS is still fully functional after the nearly instant wipe of everything needed to recover the data again. It can still access all data other than what's encrypted with hardware keystore keys and not currently decrypted.

The wiping process for the duress PIN/password is completed with a shutdown which tears down everything, zeroes memory and provides at least a small time window where the hardware is powered off too. A reboot would also work and the boot process has explicit zeroing of memory, registers, etc.

We decided to use shutdown for the duress PIN/pasword but a reboot is a valid approach too. Our locked device auto-reboot timer feature we first shipped in 2021 relies on the zeroing done by GrapheneOS for both the process of the OS tearing down and then again during booting to return the device to Before First Unlock state.

> also create a semi plausible artificial profile to hide the deletion event.

It isn't feasible to fool forensic software so it largely wouldn't work against state actors. It nearly certainly wouldn't have helped in this situation in the news. They aren't reliant on a non-technical person sifting through a phone. They'll just hook it up to a laptop and follow the data extraction procedure which involves enabling ADB. The software is aware of GrapheneOS can guide people through dealing with anything different about it. They've had a lot of trouble with extraction via ADB for GrapheneOS since the vulnerabilities they exploit via ADB keep getting patched or blocked it exploit protections but it isn't realistic to block extraction with them having the PIN/password. They could just enable the encrypted backup service in the OS instead and then use CLI tools to extract the data from there with the seed phrase. They don't do that because they want everything rather than only nearly all app data. They also have special code to deal with apps such as Signal with their own layer of data encryption since the data taken from their app data directory is nearly all useless by itself.

There's also quite a difference between wiping and rebooting into a not very plausible environment with decoy data set up by the user in advance compared to not properly wiping and giving access to a decoy profile. Bear in mind the OS can still access nearly all data after the wipe until a reboot. It could make a best effort attempt at purging as much as possible from memory, but the OS is not designed to continue functioning with all of the data disappearing. It can't just wipe all loaded encryption keys without crashing and rebooting anyway. It also has a ton of data still around in caches and elsewhere. We don't want to just do a best effort job cleaning up as much as we can but rather reliably prevent recovering any of the deleted data.

We could definitely add a duress PIN/password which wipes only specific secondary profiles, reboots and has the device still functional with whatever data was in the main user still there. That's a feature we can add, but it's important to note that it will not hide that there was deletion of data. It's easy to detect, and it's not feasible to hide that it happened. Many steps can be taken to make it less obvious, but it will still be easy for software aware of it to detect. Even a massive overhaul designed to perfect it would not address the SSD itself giving away what happened for more advanced analysis.

We aren't going to add a decoy profile compromising the security of the device and providing a way to recover data in a state where it isn't at all unrecoverable yet. We did already plan to consider a 2nd duress PIN/password which only wipes specific secondary profiles, but we need to make it clear that it cannot stealthily wipe them to users.

NDlurker an hour ago | parent | prev [-]

Or put a dead man's switch on there

nkrisc 7 hours ago | parent | prev | next [-]

I don’t think that would fly as a defense in court.

phoghed 7 hours ago | parent | next [-]

He’ll just have to pray the scene wasn’t recorded and his real PIN was one digit off

fsckboy an hour ago | parent | prev [-]

>I don’t think that would fly as a defense in court

but that's not the point, the point is to not wind up in court by presenting a phone that no long contains evidence but seems plausibly like your phone so doesn't arouse suspicion

an hour ago | parent | next [-]
[deleted]
dmitrygr an hour ago | parent | prev [-]

> by presenting a phone that no long contains evidence

Evidence Tampering

https://xkcd.com/1494/

forgotmypasswor an hour ago | parent [-]

Yeah if they can catch you and prove it.

MBCook an hour ago | parent [-]

Even if they can’t prove it, they can make your life really miserable for quite a while.

forgotmypasswor 44 minutes ago | parent | next [-]

If it was implemented in such a way, there would be no reason to suspect anyone of using it because it would be totally indistinguishable from not having used it. At that point they have no grounds for legal action. Unless they could monitor FS/disk activity, but that goes beyond typical airport security stuff.

I'm imagining a duress code that erases select files and any indication that there was ever a duress code set up in the first place.

Capricorn2481 5 minutes ago | parent [-]

As soon as that starts, authorities will charge people just for having GrapheneOS. There are 0 checks and balances right now, it's a free for all.

44 minutes ago | parent | prev [-]
[deleted]
OutOfHere 6 hours ago | parent | prev | next [-]

No, to my knowledge, they ask you to enter your PIN/password yourself. They don't enter it for you. I believe he entered it himself, at which point the erasure began. The erasure process was witnessed by the officer.

foo12bar 37 minutes ago | parent [-]

From https://arstechnica.com/gadgets/2026/07/activist-charged-wit...

> Tunick provided this code to an agent, who entered it on the phone, after which “the screen went blank, flashed several times and the phone appeared to restart.”

gruez 8 hours ago | parent | prev [-]

[flagged]

hamper653 7 hours ago | parent | next [-]

There is a difference between exploding a bomb and deleting your data. One is a crime.

gruez 7 hours ago | parent | next [-]

>There is a difference between exploding a bomb

Mines (in wars, as implied by "solider") aren't illegal. Also even for the first example there are certainly improvised explosives you can set up that isn't criminal to create or set off, fireworks for instance. Same with a barrel of gasoline. It's certainly a crime to use it to kill someone, but that's my point. By OP's logic it's not the person who set it up's fault, it's the person who triggered it.

LoganDark 7 hours ago | parent [-]

If you set up a device to explode once someone enters a room, it doesn't matter who set it off by entering the room if they had no idea the room would blow up.

I don't think it'll be very easy to get out of liability in this case. The duress PIN is a feature explicitly designed to delete all data when it is entered, especially in cases of coercion like this. There would be more plausible deniability if officers had simply discovered it somewhere and tried it on their own, but in this case it was knowingly provided directly in place of the real PIN.

mc32 7 hours ago | parent | prev | next [-]

Intentional destruction of evidence is also a crime. Now, whether this applies to this scenario I suppose will have to be determined by the courts.

Destroying potential evidence before suspicion is not a crime. Destroying it once under suspicion is a crime. So anyone can destroy their data at their hotel room even just before entry even if the data contains evidence of crimes. Of course the courts could take that into evidence to support the argument that there were crimes but it would not be a crime in and of itself.

ComputerPerson 7 hours ago | parent | next [-]

Great comment. Wish it was the top one so I didn't have to read through the others to get here.

Do you have thoughts as to how the courts would debate the deletion that you could present on a similar intellectual plane?

LoganDark 7 hours ago | parent | prev [-]

Destroying potential evidence before suspicion is a crime if done with intent to impede a future investigation, even if the investigation hasn't yet started. Your example would be a crime if it could be proven that there would likely have been evidence in what you deleted.

LoganDark 7 hours ago | parent | prev [-]

Deleting your data is absolutely a crime when you know the authorities could've wanted whatever it was you deleted -- even if they haven't told you yet. It stands to reason that providing a duress PIN that deletes your data when entered would be a crime as well, if said data is of interest.

Not to say that I personally agree with either of those cases. But what is considered crime can get pretty unfair when it comes to the authorities thinking you did something wrong.

hamper653 6 hours ago | parent | next [-]

> when it comes to the authorities thinking you did something wrong

Did they though? Was there an actual investigation going on?

LoganDark 6 hours ago | parent [-]

Here "wrong" includes phony bullshit like going after political activists. Even if you did nothing actually wrong, and you know it, and you can prove it, successfully messing with the authorities tends to be pretty difficult.

bdangubic 7 hours ago | parent | prev [-]

Can you provide a statute number for this crime please? Any federal or even state statute will do

someothherguyy 7 hours ago | parent | next [-]

https://www.law.cornell.edu/uscode/text/18/2232

is what he was charged with (a)

see also: https://en.wikipedia.org/wiki/Border_search_exception

LoganDark 7 hours ago | parent [-]

> seems like a stretch though

I think the issue will fall on whether the encrypted data on the device (or its decrypted counterpart) counts as property. The rest looks pretty clear-cut to me.

gruez 7 hours ago | parent | prev | next [-]

https://en.wikipedia.org/wiki/Tampering_with_evidence

bdangubic 7 hours ago | parent [-]

First, that is not an actual statute and second exactly what "evidence" is my phone, evidence of what exactly?

LoganDark 7 hours ago | parent [-]

Evidence of anything. You're tampering with evidence if you act to prevent them from seeing something, even if they had no reason for suspicion. Like how you get arrested for fleeing even if you didn't do anything wrong.

hamper653 6 hours ago | parent [-]

> even if they had no reason for suspicion

Are you sure about that?

bdangubic 5 hours ago | parent | next [-]

Sure - if we were banana republic (which we may be or becoming...)

LoganDark 6 hours ago | parent | prev [-]

[dead]

yodon 7 hours ago | parent | prev | next [-]

> Can you provide a statute number for this crime please? Any federal or even state statute will do

The google search required to find the answer ("federal statute for destruction of evidence") is shorter than your question here.

"Whoever knowingly alters, destroys, mutilates, conceals, covers up, falsifies, or makes a false entry..."[0]

[0]https://www.law.cornell.edu/uscode/text/18/1519

croon 6 hours ago | parent | next [-]

Let's say I want to retire my laptop to my kid, so I reformat it. Are you saying in the eventuality that federal police then wants my laptop that I have committed a crime?

If so, on that assumption, should no one ever be able to erase data on their hardware? Is it schrodingers guilt, that you're simply not guilty until someone looks, and then you are?

And if not, you haven't answered GP's question.

yodon 3 hours ago | parent | next [-]

>Are you saying in the eventuality that...

Legal cases are adjudicated by human judges who have been dealing with scenarios like this for thousands of years, since long before the invention of software and laptops, and who are not the least bit challenged when presented with strawman scenarios like the one you called out.

AnimalMuppet 2 hours ago | parent | prev [-]

If you want to retire you laptop to your kid, and so you reformat at the moment a federal officer is looking over your shoulder asking to look at it, then yes, you have.

hamper653 6 hours ago | parent | prev [-]

> knowingly

Did he know he was suspected of something? Was he suspected of something?

LoganDark 6 hours ago | parent [-]

It's more about knowing the PIN would wipe the device, and providing it with that intent.

Edit: 18 U.S.C. § 1519 doesn't seem to cover this (unless it covers the act of setting up the duress PIN in the first place as "altering"). § 2232(a) covers actually knowingly providing the duress PIN.

LoganDark 7 hours ago | parent | prev [-]

There is a federal criminal provision, 18 U.S.C. § 1519 (destruction, alteration, or falsification of records in federal investigations)

> Whoever knowingly alters, destroys, mutilates, conceals, covers up, falsifies, or makes a false entry in any record, document, or tangible object with the intent to impede, obstruct, or influence the investigation or proper administration of any matter within the jurisdiction of any department or agency of the United States or any case filed under title 11, or in relation to or contemplation of any such matter or case, shall be fined under this title, imprisoned not more than 20 years, or both.

That covers the first part of my comment. As for the second part, there is 18 U.S.C. § 2232(a) (destruction or removal of property to prevent seizure)

> Whoever, before, during, or after any search for or seizure of property by any person authorized to make such search or seizure, knowingly destroys, damages, wastes, disposes of, transfers, or otherwise takes any action, or knowingly attempts to destroy, damage, waste, dispose of, transfer, or otherwise take any action, for the purpose of preventing or impairing the Government's lawful authority to take such property into its custody or control or to continue holding such property under its lawful custody and control, shall be fined under this title or imprisoned not more than 5 years, or both.

IANAL, but the encrypted data on the device could be considered property, and the act of providing the duress PIN in place of the real one could be considered a knowing action for the purpose of preventing the government either from continuing to hold that data under its control, or from seizing the data into its control in the first place (since the data was never decrypted).

hamper653 6 hours ago | parent [-]

> destruction of records in federal investigations

There was a federal investigation going on?

LoganDark 6 hours ago | parent [-]

That's not from the statute that applies in this case

7 hours ago | parent | prev [-]
[deleted]