It's incumbent on the prosecution to prove that you know the key they are claiming you are withholding. It is a defence to say you forgot it, or that the data is random. The prosecution would have to prove that you didn't forget it and that the data is not random.
s3 makes it clear that if you plausibly claim you have forgotten it, then the prosecution must prove this is not the case (i.e. you still know it) beyond reasonable doubt.
In most cases it requires a court order as well.