They serve you a RIPA notice and you either provide the password or they prosecute you. Penalties are 2-5 years in jail depending on the nature of the investigation.
I avoid flying anywhere near the UK or its territories.