The only time you're protected is if the key in question is password protected AND you only memorized the key (ie didn't write it down anywhere). Then you can plead the fifth.
I don't think that's the case. There was a court ruling a year or two back where the court ordered the defendant to unlock his data. The key part of the ruling was that passwords and keys aren't evidence in and of themselves - the court can demand them in the same way it can demand, for example, physical keys for a safe.
In the UK the punishment for failure to decrypt a device when the police ask is pretty much the punishment for whatever they accuse one of having on the device...
What if you don't have the key? Do they need to prove that you're able and refusing to decrypt the device or are you presumed guilty until you prove you can't?
What about one-time pads where you could make up whatever key you wanted and it would be valid?
However on the whole it is the same as being asked to open a safe. If you don't remember the combination...