The 5th amendment protects you from being a witness against yourself [0]. So to me it seems pretty clear that in the US this would not be allowed.
But then again, it seems as though being forced to reveal your password is not necessarily a violation of the 5th amendment [1]. I can't quite understand why the supreme court hasn't made a decision on this one yet. There are a lot of conflicting decisions now.
0: `nor shall be compelled in any criminal case to be a witness against himself`
The thought process behind being compelled to provide a password is that you can be compelled to provide it to (indiscriminate) computer; which is currently thought of similarly to being summoned, as opposing this would be contempt of court or obstruction of justice.
Forcing someone to do something without payment and to their own detriment should run afoul of both the 13th and 5th amendment respectively; but if it was already reasonably and obviously known that an encrypted drive contained CSAM or national security secrets, and you have already been duly convicted of that, then it would not apply ("except as a punishment for crime whereof the party shall have been duly convicted," ), and you can be coerced into the "labor" of decryption - although double jeopardy would seem to apply, so you cannot be further charged for anything found, once decrypted.
I suggest making your passwords themselves incriminating, just to throw in another constitutional hiccup.
Not that any of this would matter in practice, but it is quite a legal thought experiment.
Ah but isn't the third party doctrine predicated on the data being voluntarily given to a third party? "a person has no legitimate expectation of privacy in information he voluntarily turns over to third parties."
But then again, it seems as though being forced to reveal your password is not necessarily a violation of the 5th amendment [1]. I can't quite understand why the supreme court hasn't made a decision on this one yet. There are a lot of conflicting decisions now.
0: `nor shall be compelled in any criminal case to be a witness against himself`
1: https://www.aclu.org/news/privacy-technology/police-should-n...