Modern cryptography can be what protects the citizens against TheMan. It can be the difference between losing a war or winning it, the difference between making millions of dollars off a new invention or letting the competition find out, overtake you and win all the money you could have made. It can be what keeps your PornStash safe from Mom's prying eyes. It's the only barrier that separates data crackers and your bank account's details, and it can be the base of communication within an AncientConspiracy or a shadowy criminal organization.

Unfortunately for [[WritersCannotDoMath those who studied literature hoping to never meet a single number ever again]], cryptography is also one of the hardest sciences in the world, drawing from fields as abstract and esoteric as number theory, mathematical logic, information theory and data structures. Needless to say, this means research in the subject needs to be ''very'' accurate. So when your executives are demanding that you deliver a manuscript in record time, the only thing you can do is depict it as some kind of character shifting or describe it through some kind of TechnoBabble.

Can be an [[AcceptableBreaksFromReality acceptable break from reality]], because there would be no plot at all if an encryption really was unbreakable or took years to be broken.

See also HollywoodHacking. See [[UsefulNotes/{{Encryption}} Useful Notes: Encryption]] for a description of the real thing.



[[folder: Anime and Manga ]]

* ''AngelBeats'' has an example of this. Angel's personal computer is secured with "128-bit DES" which is hacked through without any trouble. While DES is an encryption standard infamous for being insecure, that's because of how short its key is. A version of DES that had an 128-bit key would be impossible to break with any conceivable technology. Certainly not in a few minutes with a laptop.
* Done in ''Manga/GhostInTheShell'', with the HandWave that the Major and the more techie members of Section 9 are just that good. However, sometimes they run across security that actually ''counterattacks'' their hacking, which might be something of an aversion (encryption that can [[MindRape scramble your brain]]? AWESOME).


[[folder: Film ]]

* Averted thoroughly in ''{{Sneakers}}''. While the MacGuffin is entirely fictional, if something did what it could do, it would be able to slice through virtually any modern encryption. The description of how cryptology works is dead-on accurate -- Len Adelman, cocreator of RSA (public-key) encryption, consulted on the movie. The [[ViewerFriendlyInterface visual representation]], on the other hand, is baloney.
* In ''Movie/TheAvengers'', the World Security Council comm panels each have a rotating cipher key in the lower right corner, constantly updating and matching to keep the connection secure.


[[folder: Literature ]]

* Literature/TheRadix: Coded messages play a significant part in the story, depicted verbosely, but not very realistically.
* In ''Literature/DigitalFortress'' the NSA has a computer which is powerful enough to brute force (i.e. keep trying different passkeys until it gets the right answer) encryption. The plot is based around a new encryption algorithm which is resistant to brute force methods. This is a clear case of [[PasswordSlotMachine research failure]], since a brute force search for a solution would try every possible key until the right one was found.
** There does, however, exist an encryption method, the one-time pad, that is immune to brute force, and unbreakable if carried out correctly (doing so, however, is often logistically prohibitive, for one thing, the key must be at least as large as the message). It's immune to brute force because with different keys you can get every possible message that has the same length as the one being sent, with no indication whatsoever of which possible decryption is the right one.
** Actually most modern digital encryption is resistant to brute forcing, in that it's theoretically possible to do it, but would likely take an impossibly long time, possibly billions of years, assuming you dedicate all of the worlds computing power to brute forcing that one key.
* Averting it is pretty much the entire point of Neal Stephenson's ''Literature/{{Cryptonomicon}}'', where Lawrence Waterhouse shows us how the German Enigma machines worked and how Bletchley Park worked day after day cracking their codes, whereas Randy Waterhouse shows us in the first few pages how ''proper'' encryption is done, all of that while rattling scientifically accurate lectures about information theory. Need anything more? Well, Neal Stephenson asked Bruce Schneier to create a 100% functional encryption algorithm, called [[ Solitaire]], which can be implemented on the field with playing cards, ''and the books include a working Perl script that implements the algorithm.''
* In Desmond Bagley's ''The Tightrope Men'', the hero is captured and being questioned by enemy agents, who want to know about the high-tech whatsit he's believed to be working on. However, he's only impersonating the scientist they think he is, and he didn't get a proper briefing, so he's at a loss. Then, abruptly, he comes out with a spray of technobabble about a computer which can brute-force encryption like the one in the DanBrown example above. This scares the life out of him, because he doesn't even understand what he's saying, but it ''does'' make sense to people who know computers, so he wonders where the hell this sudden burst of information ''came from''. Incidentally, the scientist he's posing as was ''actually'' looking into a possible design for an X-ray laser, nothing to do with computers at all.
* Safely averted in ''Literature/{{Reamde}}''. The encrypted file on Wallace's hard drive has a ".gpg" file extension. GPG is a real-world program, the GNU Privacy Guard, that implements an encryption alogrithm ([=OpenPGP=]) that would work exactly as described. That said, there's nothing about GPG that requires a three-letter ".gpg" file extension as it instead embeds GPG/PGP header information in the file itself. GPG'd files can have any extension the user wants and GPG will still be able to identify and decrypt them by checking for the PGP header block in the file. Stephenson likely used a .gpg file extension because it was quicker and less awkward than explaining the details of GPG's functionality, and worked just as well as a shout-out for cryptogeek readers and wouldn't have made much difference anyway for those who didn't know what he was talking about in the first place.


[[folder: Live Action TV ]]

* ''Series/StargateAtlantis'': Multiple times. Janus' lab pops up. He is meant to have his research encrypted with highly advanced encryption. It doesn't last long against the mind of TheSmartGuy.
* ''TheSarahConnorChronicles'': Of course can John break the encryption of Sarkissian's hdd.
* ''Series/BuffyTheVampireSlayer'':
** Willow can decrypt ''anything'', seriously, though admittedly the Initiative's most secretest files took her a few days.
** Actually, she didn't manage to decrypt them; they eventually decrypted themselves, which was a less-than-subtle clue that the season's BigBad had slipped those files to the good guys intentionally.


[[folder: Roleplay ]]

* ''Roleplay/CoalitionOfPonyistStates'':
** Most "encrypted" communiques are merely specified to be encrypted, instead of actual details on the encryption method used. This is mostly to HandWave very-hard-to-decrypt messages, since providing a real-life encryption method/algorithm would allow more tech-saavy players an advantage in explaining how they'd decrypt the message.
** Crystal Spires averts this trope by ''actually encrypting'' messages.


[[folder: Video Games ]]

* Averted in ''VideoGame/{{Iji}}''. The eponymous [[{{Nanite}} Nanotech]] cyborg can hack her way through a lot of low-security doors, but some doors are just too securely encrypted for her to ever hope to open.