Yeah, I was unsure how the fifth amendment related to this. But let's say fifth amendment is not an issue -- say, police suspects that my encrypted file contains evidence against my friend Bob. They'd need a court order to compel me to decrypt the file, no?
Most definitely. Like you said, the fifth amendment protection would likely not apply then. You might make the argument that the fact you had evidence of a crime in some way incriminates you I suppose.