6 ms·
ROT13: good version
- ChrisSD 7y agoTechnically ROT13 can only handle 26 characters. The "good" version would be to deny any inputs outside an accepted character set. Ok so this doesn't really matter for a joke algorithm like ROT13 but in more serious cases it's important to refuse any inputs that aren't handled and not try ad-hoc fixes to make them "work".
- A2017U1 7y agoCan a cipher invented 2000 years ago have a technical standard ascribed to it?
- ChrisSD 7y agoCaesar ciphers? I believe they are well defined, yes. Although ROT13 itself only dates back to maybe the 70's or 80's. Besides, I was honestly just using this as an excuse to make a more general point. I've grown frustrated with bugs and security issues arising from "fixing" input to work in a domain which was not designed to handle that input. But as I said, it doesn't really matter with ROT13 because it isn't a serious algorithm.
- astrobe_ 7y ago> But as I said, it doesn't really matter with ROT13 because it isn't a serious algorithm. Depends on what you use it for. I've seen it used for "spoilers" text when other tricks were not available. BTW it is funny that Caesar's cypher cannot handle "Latin" characters.
- bumfodder 7y agoIMO it doesn’t matter whether an algorithm is “serious” or not, it depends solely on how people treat it. In this story, ROT13 is taken seriously, so it is a serious algorithm. And the creation of such a good version does have it’s value, no matter how useful ROT13 is.
- menacingly 7y agoRot13 is not Caesar's cipher. Rot13 is in the family of rotational ciphers, but it's a more modern concept designed around a 26-letter alphabet (so that running it twice produces the plaintext again)
- ChrisSD 7y agoSure it has its uses for simple obfuscation but in that case my central point is relevant. It's only good for obfuscating ASCII letters. Btw what's commonly known as Caesar cipher (aka shift cipher) is a generalisation of Caesar's original cypher (described as shifting each character 3 places). ROT13 is different from the "original" as it shifts by 13 characters over a 26 character alphabet. This makes the encode and decode steps the same. You can play with different alphabets and shifts here: https://crypto.interactive-maths.com/caesar-shift-cipher.html https://crypto.interactive-maths.com/caesar-shift-cipher.htm...
- bjoli 7y agoAs an aside: After 20 years of IRC usage I read and write rot13 without any technical aids (mostly due to the first 2 years of quakenet). I wouldn't be surprised if you'd find someone who can speak it :)
- throwawaymath 7y agoIf it's sufficiently well-specified, sure, why not?
- deleted 7y ago[deleted]
- mseidl 7y agoROT26 is 2x as secure.
- dsr_ 7y agoøbol comes through as øoby. Rot13 is not defined for characters outside [a-zA-Z].
- runxel 7y agoGerman "ß" works neither (which could at least be substitued with "ss").
- maxheadroom 7y agoNeither does (æ or Æ).
- amptorn 7y agoJust out of curiosity, what would you expect ø to encode to?
- dsr_ 7y agoWhen I said rot13 isn't defined outside of a certain set, I meant it. If you want ø to be half-rotatable, you need to specify an ordered character set (with an even set size) and say that rot29 or rot128 or whatever you come up with is the analogous mapping to rot13. Now, rot13 excludes punctuation and keeps capitalization after transform, so an ordinary human can learn to read rot13 English reasonably fluently. I don't know if that is common across all Latin-descended alphabetic languages, but it's really not going to be a plausible skill in Mandarin. https://en.wikipedia.org/wiki/Chinese_characters#Indexing https://en.wikipedia.org/wiki/Chinese_characters#Indexing is somewhere between horrifying and fascinating. On the other hand, Korean (Hangul) has a perfectly reasonable alphabetic set size and ordering, at least in South Korea. https://en.wikipedia.org/wiki/Hangul#Alphabetic_order https://en.wikipedia.org/wiki/Hangul#Alphabetic_order -- so I expect that Koreans can learn to read rot12.
- amptorn 7y ago> rot13 isn't defined outside of a certain set Ah, so, when you said "øbol comes through as øoby" you were saying that this is the correct behaviour?
- dveeden2 7y agoBut emoji is not handled correctly, the cleartext and ciphertext are identical
- xeeeeeeeeeeenu 7y agorot8000[1][2][3] is a similar idea. [1] - http://rot8000.com http://rot8000.com [2] - https://news.ycombinator.com/item?id=18495518 https://news.ycombinator.com/item?id=18495518 [3] - https://news.ycombinator.com/item?id=6659687 https://news.ycombinator.com/item?id=6659687