[go: nahoru, domu]

ROT13: Difference between revisions

Content deleted Content added
removed vandalism
Tags: Reverted Visual edit
GreenC bot (talk | contribs)
 
(6 intermediate revisions by 6 users not shown)
Line 2:
{{Use dmy dates|date=November 2023}}
[[File:ROT13_table_with_example.svg|right|frameless]]
'''ROT13''' ('''Rotate13''', "'''rotate by 13 places'''", sometimes hyphenated '''ROT-13''') is a simple letter [[substitution cipher]] that replaces a letter with the 13th letter after it in the [[latinLatin alphabet]]. ROT13 is a special case of the [[Caesar cipher]] which was developed in ancient Rome.
 
Because there are 26 letters (2×13) in the [[ISO basic Latin alphabet|basic Latin alphabet]], ROT13 is its own [[inverse function|inverse]]; that is, to undo ROT13, the same [[algorithm]] is applied, so the same action can be used for encoding and decoding. The algorithm provides virtually no [[cryptography|cryptographic]] security, and is often cited as a canonical example of [[weak encryption]].<ref name=modern-cryptanalysis>{{cite book |title=Modern Cryptanalysis: Techniques for Advanced Code Breaking |author=Christopher Swenson |page=5 |publisher=John Wiley & Sons |date=17 March 2008 |isbn=978-0-470-13593-8 |url=https://books.google.com/books?id=oLoaWgdmFJ8C&pg=PA5 |access-date=5 October 2015 |archive-date=24 June 2016 |archive-url=https://web.archive.org/web/20160624151537/https://books.google.com/books?id=oLoaWgdmFJ8C&pg=PA5 |url-status=live }}</ref>
 
ROT13 ishas been used in [[online forum]]s as a means of hiding [[spoiler (media)|spoiler]]s, [[punch line|punchlines]], puzzle solutions, and [[profanity|offensive material]]s from the casual glance. ROT13 has inspired a variety of letter and word games online, and is frequently mentioned in [[newsgroup]] conversations.
 
==Description==
Applying ROT13 to a piece of text merely requires examining its alphabetic characters and replacing each one by the letter 1513 places further along in the [[alphabet]], wrapping back to the beginning if necessary.<ref name="schneier">{{Cite book|last=Schneier |first=Bruce |author-link= Bruce Schneier |title=Applied Cryptography |url=https://archive.org/details/appliedcryptogra00schn_605 |url-access=limited |edition=Second|year=1996|publisher=John Wiley & Sons |isbn= 0-471-11709-9|pages=[https://archive.org/details/appliedcryptogra00schn_605/page/n198 11] }}</ref>
<kbd>A</kbd> becomes <kbd>N</kbd>, <kbd>B</kbd> becomes <kbd>O</kbd>, and so on up to <kbd>M</kbd>, which becomes <kbd>Z</kbd>, then the sequence continues at the beginning of the alphabet: <kbd>N</kbd> becomes <kbd>A</kbd>, <kbd>O</kbd> becomes <kbd>B</kbd>, and so on to <kbd>Z</kbd>, which becomes <kbd>M</kbd>. Only those letters which occur in the [[English alphabet]] are affected; numbers, symbols, punctuation, whitespace, and all other characters are left unchanged. Because there are 26 letters in the English alphabet and 26 = 2 &times; 13, the ROT13 function is its own [[inverse function|inverse]]:<ref name="schneier"/>
 
Line 37:
==Usage==
 
ROT13 is a special case of the [[encryption algorithm]] known as a [[Caesar cipher]], used by [[Julius Caesar]] in the 1st century BC.<ref>{{Cite book|last=Kahn |first=David |author-link=David Kahn (writer) |title=The Codebreakers: The Story of Secret Writing |publisher=Macmillan |location=New York |isbn=0-684-83130-9 }}</ref>
 
[[Johann Ernst Elias Bessler]], an 18th-century clockmaker and constructor of [[perpetual motion]] machines, pointed out that ROT13 encodes his surname as ''Orffyre''. He used its [[latinisation of names|latinised]] form, ''Orffyreus'', as his pseudonym.<ref>{{cite web|url=https://lockhaven.edu/~dsimanek/museum/people/people.htm|title=Perpetual Futility: A short history of the search for perpetual motion|last=Simanek|first=Donald E.|date=2012|website=The Museum of Unworkable Devices|access-date=28 October 2020|archive-date=10 October 2020|archive-url=https://web.archive.org/web/20201010110525/https://www.lockhaven.edu/~dsimanek/museum/people/people.htm|url-status=live}}</ref>
Line 47:
ROT13 is not intended to be used where [[confidentiality|secrecy]] is of any concern—the use of a constant shift means that the encryption effectively has no [[key (cryptography)|key]], and decryption requires no more knowledge than the fact that ROT13 is in use. Even without this knowledge, the algorithm is easily broken through [[Frequency analysis (cryptanalysis)|frequency analysis]].<ref name="schneier"/> Because of its utter unsuitability for real secrecy, ROT13 has become a catchphrase to refer to any conspicuously weak [[encryption]] scheme; a critic might claim that "56-bit [[Data Encryption Standard|DES]] is little better than ROT13 these days". Also, in a play on real terms like "double DES", the terms "double ROT13", "ROT26", or "2ROT13" crop up with humorous intent (due to the fact that, since applying ROT13 to an already ROT13-encrypted text restores the original [[plaintext]], ROT26 is equivalent to no encryption at all), including a spoof academic paper entitled "On the 2ROT13 Encryption Algorithm".<ref>{{Cite web|title=On the 2ROT13 Encryption Algorithm|date=25 September 2004|url=http://www.pruefziffernberechnung.de/Originaldokumente/2rot13.pdf|publisher=Prüfziffernberechnung in der Praxis|access-date=20 September 2007|archive-date=15 April 2012|archive-url=https://web.archive.org/web/20120415092223/http://www.pruefziffernberechnung.de/Originaldokumente/2rot13.pdf|url-status=live}}</ref> By extension, triple-ROT13 (used in joking analogy with 3DES) is equivalent to regular ROT13.
 
In December 1999, it was found that [[Netscape Communicator]] used ROT13 as part of an insecure scheme to store email passwords.<ref>{{Cite CiteSeerX |author=Hollebeek, Tim|author2=Viega, John |author-link2=John Viega |title=Bad Cryptography in the Netscape Browser: A Case Study|citeseerx=10.1.1.15.9271 }}</ref> In 2001, Russian programmer [[Dimitry Sklyarov]] demonstrated that an eBook vendor, New Paradigm Research Group (NPRG), used ROT13 to encrypt their documents; it has been speculated that NPRG may have mistaken the ROT13 toy example—provided with the [[Adobe Systems|Adobe]] eBook [[software development kit]]—for a serious encryption scheme.<ref>{{Cite web|first=Bruce|last=Perens|author-link=Bruce Perens|url=httphttps://www.zdnet.com/newsarticle/dimitry-sklyarov-enemy-or-friend/116424|title=Dimitry Sklyarov: Enemy or friend?|date=1 September 2001|access-date=3 February 2011|publisher=[[ZDNet News]]|archive-date=17 October 2014|archive-url=https://web.archive.org/web/20141017174003/http://www.zdnet.com/news/dimitry-sklyarov-enemy-or-friend/116424|url-status=live}}</ref> Windows XP uses ROT13 on some of its registry keys.<ref>{{Cite web|title=ROT13 is used in Windows|url=https://blog.didierstevens.com/2006/07/24/rot13-is-used-in-windows-you%E2%80%99re-joking/|date=24 July 2006|access-date=15 December 2016|archive-date=20 December 2016|archive-url=https://web.archive.org/web/20161220182919/https://blog.didierstevens.com/2006/07/24/rot13-is-used-in-windows-you%E2%80%99re-joking/|url-status=live}}</ref> ROT13 is also used in the [[fortune (Unix)|Unix fortune program]] to conceal potentially offensive [[dicta]].
 
==Letter games and net culture==