I read about a case where the authorities were trying to gain access to the defendant's phone to look for evidence (text messages). The authorities were unable to access the phone (I don't know how they were so lame but never mind) and requested the defendant to tell his password. He refused citing the 5th amendment and this caused a legal debate and the answer is not clear whether the defendant should cooperate in unlocking the phone. Some argue the problem is the method of access only, so uttering a password is testimonial but fingerprint protected phones are okay to unlock (so they could obtain a fingerprint). An attorney said that making someone give you their thoughts was a "completely different story" than providing fingerprints or DNA. But if this thought is merely a key then why?
(Would this analogy hold true for safe box full of personal effects and potentially incriminating letters? If the authorities cannot unlock it they cannot make you give the key to the box because it's just a little too...personal?)