elmerfud
IANAL but like reading about cases like this. From what I've seen in other cases this would be a very strange situation.

They wouldn't specifically subpoena your password. A subpoena could be issued to you and you could be required to testify about things and potentially one of the questions could be to divulge your password. Now the fifth amendment protects against self-incrimination so your best bet is to simply not answer anything and invoke the fifth. Because that protects you from testifying to things that could incriminate you, and not just those things that will incriminate you. Of course once they have the password you never know what someone might find which is why you should take the fifth and not testify to anything.

Courts can legally get around your fifth amendment protection and compel you to provide the password and access but in doing so they must also grant you immunity against anything they may find. The courts have upheld that your testimony no longer can incriminate you so you can be held to testify accurately. If you do not you would be in contempt of the court. Generally in this situation they have an idea of the data or information that they want and you are a small fish and they are going after someone much bigger.

The other similar scenario would be instead of a subpoena for your testimony they would get a warrant to search your system. This is where it gets kind of interesting because when they have a valid warrant they are allowed entry into the device but they are still not allowed to force you to testify against yourself as in divulging a password. They can attempt to crack the password but they cannot force you to tell them what it is. On the other hand if you are using a form of biometric security because that is not considered testimony they can force you to use your fingerprint or face scan or other biometrics to open it up. This is a very important distinction when you're considering the security of your data especially against law enforcement searches.

Jupe
IANAL, but, my understanding is that if a court rules that the Fifth Amendment does not protect against providing a password (if they already know what's there from other sources, etc.), the individual may be compelled to comply with the subpoena.
sharpshadow
As they can subpoena the use of your finger to unlock with fingerprint right?

The only thing they can not force you to is remembering.