The Fifth Amendment to the United States Constitution protects some people under criminal investigation from having to reveal passwords provided access to the encrypted content of storage devices.
In a case between the United States government and John Doe, the defendant refused to decrypt the data on the hard drives of several laptop computers and five external hard drives. He invoked his Fifth Amendment right against self-incrimination. He ended up spending eight months in jail for contempt of court, but the Court of Appeals for the Eleventh Circuit agreed with him and stated that the the content on a storage device is considered a form of testimony and he is therefore covered Fifth Amendment rights. Despite the government's suspicion that the hard drives contain child pornography, the defendant was released free of any charges.
The prosecutors attempted to get around the hurdle by guaranteeing that the defendant would not have to fear any charges for the act of decrypting the data, which was - not surprisingly - not compelling enough. They would only be able to enforce the decryption if they were to grant immunity to the defendant over any potentially incriminating contents at the same time. The government rejected this path.
One could suspect that the data encryption could now be concealed simply by encrypting the data. While that may be true in some cases, this particular ruling was based on the fact that the prosecutors simply had the suspicion that the hard drives stored illegal content. Had there been proof that the defendant obtained child pornography, he could have been forced to provide the decrypted data.