Suppose I have a computer and I set up two logins that are identical other than one sanitises my data SSD upon logging on. This would cause any information I have on said drive to be inaccessible to anyone. Have I committed any crime? Assume the data itself is legal, and is not evidence of a crime I have commited. An important use case of such a tool would be reporters who may have evidence of crimes they are investigating. If that changes the situation that should be mentioned in the answer.

Suppose someone verbally requests the login credentials of the computer, and I provide the sanitising one which they proceed to use. Have I committed any crime?

Any jurisdiction would be relevant, as would any values for the "someone" above (such as employer, police officer, border agent). Cases where such a question would be particularly relevant seem to occur at borders in particular, with examples in the USA, Canada and most recently in the UK. So I can be specific about what I have done I have used the example of a general purpose computer, but I assume the same thing would apply to commercially available tools.

  • Would the data on the device be evidence of a crime, or simply private data you do not want to share?
    – o.m.
    Commented Apr 23, 2023 at 11:12
  • Private, not evidence of my crimes. I have edited the question.
    – User65535
    Commented Apr 23, 2023 at 11:21
  • 1
    The question seems to imply if encryption is legal, I am not confident to write an answer yet, but dead sure that it is not a crime to encrypt data. Data that is not accessible to someone is not a crime but a security measure. Even if the data is evidence of any crime you committed or even not, you would not be accused alone for this unless asked to provide that data and you are found to be able to decrypt data.
    – Velma
    Commented Apr 23, 2023 at 11:58
  • @AitzazImtiaz, there are situations (the OP mentioned border controls) where one is not required to hand over passwords, but not doing so could lead to a refusal of entry. Wiping the device and "showing that it is empty" may be an attempt to get around this.
    – o.m.
    Commented Apr 23, 2023 at 14:22
  • 1
    The question seems to be "what is a list of all scenarios where it would be illegal to wipe my drive". You contradict yourself w.r.t. "evidence of a crime", so why doesn't the part about reporters completely undermine the question. What if the drive has evidence of your own crime, can I ignore your caveat? Does "ask for" include "demand under color of law" or does it include pleas from strangers on the street?
    – user6726
    Commented Apr 23, 2023 at 14:43

4 Answers 4


If this is done with the specific intention of obstructing justice (see R. c. Charbonneau, 1992 CanLII 2979 (QCCA)), then this is an offence contrary to s. 139(2) of the Criminal Code. The offence is not dependent on the deleted evidence being evidence that would have been used against the deleter.

Every person who intentionally attempts in any manner other than a manner described in subsection (1) to obstruct, pervert or defeat the course of justice is guilty of [an offence].

A couple of examples:

  • In R. c. Renaud, 2019 CM 4021, the accused had asked someone to delete photographs and texts off of their smart phone. He was found not guilty on this charge because the mens rea was not proved.
  • In R. v. Subia, 2022 ONSC 1693, the accused admitted that he used specialized software in an attempt to delete traces of evidence (images) from his phone. He was found guilty of attempted obstruction of justice.
  • Does 'obstructing justice' require some kind of court case or am I already obstructing justice if I hinder a border guard performing a standard check to decide whether to grant entry?
    – quarague
    Commented Apr 24, 2023 at 9:45

Using it may be a crime

Having it is fine

There is a similar crime in all jurisdictions which in is called Tampering etc with evidence under s317 of the Crimes Act 1900.

To establish the offence, the prosecution must prove beyond reasonable doubt that:

  1. You suppressed, concealed, destroyed, altered or falsified information knowing it is or may be required as evidence in a judicial proceeding, or you fabricated false evidence (other than by perjury), or you knowingly made use of false evidence, and

  2. You intended by doing so to mislead any judicial tribunal in judicial proceedings.

A ‘judicial proceeding’ is any proceeding in or before a judicial tribunal in which evidence may be taken on oath.

Evidence of a crime (even if not your crime) “is or may be required as evidence in a judicial proceeding” even if no such proceeding has commenced. If you know its there and your intention is to destroy this evidence to prevent it being used in the (hypothetical) judicial proceeding, then you have committed the crime.

  • It is not clear to me that telling someone a username/password is "suppressed, concealed, destroyed, altered or falsified information".
    – User65535
    Commented Apr 24, 2023 at 7:34
  • 1
    So, if I tell you a code to the door that instead of opening it, electrocutes you, I haven’t murdered you?
    – Dale M
    Commented Apr 24, 2023 at 8:54
  • That would be murder if you had told them the code or not.
    – User65535
    Commented Apr 24, 2023 at 11:39
  • Perhaps a more relevant comparison would be telling someone your address, but not about a legal security system. If they tried to break in and got hurt, would you be liable?
    – User65535
    Commented Apr 24, 2023 at 11:48
  • "I didn't tamper with the evidence, the cops did!"
    – nick012000
    Commented Apr 24, 2023 at 20:50

Yes using it can be illegal depending on the circumstances.

In numerous (if not all) jurisdictions there are offences like the following:

Some jurisdictions compel the preservation or disclosure of records (e.g. for tax assessments or freedom of information law).

Some jurisdictions compel cooperation with agents of the state (e.g. when being questioned at a border).

[At common law] the offence of Perverting the Course of Justice is committed when an accused:

  • does an act or series of acts;
  • which has or have a tendency to pervert; and
  • which is or are intended to pervert;
  • the course of public justice.

T v. R [2011] EWCA Crim 729:

In a criminal case, the course of justice includes the police investigation of a possible crime. An act that makes that investigation more difficult, or which may mislead the police in their investigation, may tend to pervert the course of justice.

The circumstances might be such that there is a more appropriate or specific offence (that would be preferred to a broader offence). For example, in England and Wales there is the offence of altering etc. records with intent to prevent disclosure, s77 Freedom of Information Act 2000.

In some circumstances using it is not illegal, e.g. if someone steals your device and demands you tell them your username and password.


As soon as you know that the information on your device will be or could be requested in a civil court, wiping it is not a crime, but the judge in the case will assume that the wiped data would have hurt your case and base his decision on that. If I asked you to produce some evidence because I think it will support my case, and you wiped it, the judge will assume that the evidence was there in the wiped data, and that it supported my case.

Now your problem is that even if the data you wiped was private and of no relevance to the court case, the judge doesn't and cannot know that, so in this situation wiping your completely irrelevant data is a huge mistake.

  • I think this answer could be improved by a jurisdiction, but also it mentioning what happens if it is not? Is it a serious legal strategy to always have a potential civil case hanging over your head to allow you to delete data?
    – User65535
    Commented Apr 23, 2023 at 11:26
  • Not sure this is correct in most of the US. Commented Apr 24, 2023 at 6:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .