Re: Contempt of court
Contempt of court was the way the UK used to do it and the way the US still does it.
1) Arrestee refuses to hand over crypto keys (claiming he/she forgot, never had them, whatever).
2) Arrestee is brought before a judge who instructs arrestee to hand over crypto keys.
3) Arrestee repeats excuse.
4) Judge sentences arrestee to 3 months in prison for contempt of court.
5) After 3 months, arrestee is released from prison into the arms of the police who haul arrestee in front of Judge. Because whatever the crime the person was arrested for, even if subsequent evidence shows the person to be innocent, that person is guilty of contempt of court until he/she hands over the keys (even if they no longer matter).*
6) GOTO 3.
Yes, people like Gary Glitter (had he been bright enough to encrypt his stash of kiddy porn) would claim to have forgotten their key. As would terraists. So I can see the temptation for the courts to do this.
But, that does mean that you're seriously fucked if you forget a crypto key and the police ever have cause to investigate the encrypted device.
It also means, as I've said before, be careful about encryption with hidden volumes (like TrueCrypt/VeraCrypt). If you use them you must use the hidden volume. Because if you don't, when the police ask you for the key to the hidden volume and you say you're not using one, you're fucked. They can't prove you are, but you can't prove you aren't, so hand over the keys you don't have because you never had them.
Except for TrueCrypt (and therefore probably VeraCrypt) there was a patch that allowed nesting of hidden volumes to any arbitrary depth. So there's no way you can prove you're not using a hidden volume beneath the ones you've handed over the keys for. So you are fucked if you use those two systems (and possibly others) at all.
Here in the UK people realized it was an abuse of contempt of court powers to do this. What if the judge ordered you to ride a unicycle over a tightrope while juggling running chainsaws? So now we have a law that specifically states it is a criminal offence not to hand over crypto keys when the police request them. That's a big improvement. /s
*The naive amongst you are going to say that if the police find out you're innocent while you're serving time in prison for not handing over your keys, you'll be released. Hahahahahahahahahaha.
All your computer equipment will have been confiscated for detailed analysis. As will all the computers at your place of employment you potentially had access to. That sort of detailed analysis takes days, if not weeks. By the time you're released, your employer will be out of business so you won't have a job to go back to. There will be nagging doubts about whether or not you really did something wrong, so you'll be unemployable.
So when you're released, you're going to go to court for compensation for your losses. Your former employers will want money too. Big money. That will generate very bad publicity for the legal system and the government. Maybe the Home Secretary gets replaced. Maybe even the PM.
So the government will want to settle out of court on condition of no publicity. So your lawyer will scent blood in the water and go for the kill. There's big money to be had for a promise not to topple the Home Sec/PM. Or is there?
It's much cheaper to ignore the fact that you didn't commit the crime you were arrested for. Because you're still guilty of not handing over your crypto keys. And always will be (if you really did forget them). So no messy/expensive court case where you demand compensation. Because you're a vile criminal. A recidivist who has been given many chances (every 3 months) to reform and hand over his/her crypto keys yet continues to refuse to do so.