I would be interested to hear what legal experts say on this subject.
Every lawyer I've ever heard talking on the subject says
never cooperate with a law enforcement investigation. Keep your mouth shut, doesn't matter how innocent you are, and do nothing at all to help them. Certainly don't hinder them in any way, or resist what they are doing to you, but you have no legal obligation to assist a police investigation (at least in the US, overseas you are pretty much screwed if you don't make an affirmative defense at the start, which is terrible for a lot of logical reasons). Don't slam the door in their faces when they come to serve you a warrant, but absolutely do not give any indication you know anything about anything, or have access to anything.
From the moment you have law enforcement coming to talk to you, you need to think only about avoiding a successful prosecution. Trained, experienced interrogators are trying to put you in prison or possibly execute you. They have bosses above them yelling at them to close the case, the prosecutor you'll have accusing you in court likely has political ambitions, everything in the system is set up to get a conviction, and nobody is particularly interested in convicting the right person. It is not about determining the truth or facts in a case, it is about convicting you.
So, if you show the police where your computer or iPhone is, they'll be able to prove in a court of law that it belongs to you. If you unlock it, they'll be able to prove in a court of law that you had access to it. If there really is something on there, even accidentally or as a frame job, you're now halfway convicted. Even if there's nothing incriminating on there, but it creates some kind of circumstantial pattern, you're screwed in court. Don't give the police
anything that they can use against you. Demand a lawyer, keep your mouth shut, and do absolutely nothing.
The sad truth is we have so many laws now, everybody is guilty of something whether they know it or not. And even if you're not guilty of the thing they're looking for, they can still ruin your life once you start cooperating and they start finding things.
Even your truthful denials can be used against you, when they find some witness who is mistaken about something that contradicts something you say. Think: Defendant claimed he was out of town at the time of the murder, but Witness A thought he saw Defendant in town across the parking lot of the grocery store. If Defendant lied about his whereabouts at the time of the murder, Defendant must be lying about other things, like how he didn't kill that person. It doesn't matter that Defendant in this scenario was really out of town, all that matters is what can be proved by the prosecution. If Defendant had kept his mouth shut and made no statements, Witness A's statements about seeing the Defendant at the grocery store across a parking lot wouldn't help convict the Defendant.
Just don't say or do anything, and let your lawyer do the talking in court about the lack of evidence and how the prosecution failed to make its case.