Tech-Blog
Invalid vs. Illegal
Every so often i come across the word âillegalâ in a computer science context: illegal numbers, illegal statements, and â remember those? â the infamous âIllegal Instructionâ errors we were getting from Windows, referring to an Intel or AMD processor fault.
If this makes you smile because you see whatâs coming, see this old clip by Three Trolls in a Baggie where thereâs a cameo of this concept.
The thing is, these instructions are not illegal â no swat team will come shouldering in when you provoke this error on your PC. And the CPU maker will not be sued for putting the instruction into their processor.
Illegal in this context is an awkward choice of words for saying ânot allowedâ in the context where the instruction was found in - perhaps due a hacking attempt, which further compounds the mistake.
The hacking attempt would be illegal, not the instruction, in all likelyhood⊠but imagine, if the exploit could damage computers, or the case sufficiently egregious, the lawmakers could indeed proceed to making the very instruction illegal in the aftermath. Okay, thatâs admittedly far fetched and hasnât ever happened, but still.
The technical term for ânot acceptedâ or not formally working is âinvalidâ. For example if a website states that your password must not include numbers, then âp4sswordâ will probably be rejected as invalid, rather than illegal. But â+UrPresidentX=1Goatsuckerâ may in some countries be considered illegal, I guess.
This distinction can actually feel a bit chilling (like: âdo you really mean this?â), once you are conscious of the distinction between these two words.
For example, there were times in the US and in France in the 90ies (Crypto Wars), when a strong encryption key could have been valid for your software and perfectly working, but illegal to use with your software (by law in those days). So the distinction between these two concepts is definitely not academic.
Invalid means: not allowed in a formal/syntactic context, and illegal means: not allowed by law.
Validity is inherent to a given formal system. Legality is a completely orthogonal concept.