There is RIPA which allows a court to force you to divulge a decryption key.
The penalty for not doing so is up to two years in prison, five if terrorism is involved.
The Regulation of Investigatory Powers Act 2000 (RIPA), Part III, activated by ministerial order in October 2007, requires persons to supply decrypted information and/or keys to government representatives with a court order. Failure to disclose carries a maximum penalty of two years in jail
- Wikipedia - Key Disclosure Law
Section 49 of Part III of RIPA compels a person, when served with a notice, to either hand over an encryption key or render the requested material intelligible by authorities.
Anyone who refuses to decrypt material could face five years in jail if the investigation relates to terrorism or national security, or up to two years in jail in other cases.
Controversially, someone who receives a Section 49 notice can be prevented from telling anyone apart from their lawyer that they have received such a notice.
- The Register - UK police can now force you to reveal decryption keys -
Refuseniks face jail time
The act can be read on the government website
It describes, for example, grounds for not complying ...
3) For the purposes of this section a person shall be taken to
have shown that he was not in possession of a key to protected
information at a particular time if—
(a) sufficient evidence of that fact is adduced to raise an issue with
respect to it; and
(b) the contrary is not proved beyond a reasonable doubt.