Section 49 of the Regulation of Investigatory Powers Act 2000 (RIPA).
This section grants police and other public authorities the power to issue a formal written notice (a "Section 49 notice") demanding that a person disclose the password, PIN, or encryption key to a protected device or data.
A notice cannot be issued lightly. It requires approval from a judge and can only be used when it is deemed necessary and proportionate for purposes such as:
In the interests of national security.
For the purpose of preventing or detecting crime.
In the interests of the economic well-being of the UK.
Refusing to comply with a lawfully issued Section 49 notice is a criminal offence under Section 53 of RIPA
Standard cases: Up to two years' imprisonment.
Cases involving national security or child indecency: The maximum penalty is increased to five years' imprisonment.