News for hackers. Stuff that matters.
Re:ROT13: good version by ChrisSD on Sunday June 09, 2019 @07:01AM (#20138434)
Technically 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".

Re:ROT13: good version by A2017U1 on Sunday June 09, 2019 @07:37AM (#20138574)
Can a cipher invented 2000 years ago have a technical standard ascribed to it?
Re:ROT13: good version by ChrisSD on Sunday June 09, 2019 @08:31AM (#20138767)
Caesar 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.

Re:ROT13: good version by astrobe_ on Sunday June 09, 2019 @08:47AM (#20138833)
> 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.

Re:ROT13: good version by menacingly on Sunday June 09, 2019 @09:06AM (#20138921)
Rot13 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)
Re:ROT13: good version by ChrisSD on Sunday June 09, 2019 @09:40AM (#20139119)
Sure 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.htm...

Re:ROT13: good version by bumfodder on Sunday June 09, 2019 @09:05AM (#20138915)
IMO 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.

Re:ROT13: good version by bjoli on Sunday June 09, 2019 @11:29AM (#20139815)
As 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 :)
Re:ROT13: good version by throwawaymath on Sunday June 09, 2019 @10:18AM (#20139348)
If it's sufficiently well-specified, sure, why not?
Re:ROT13: good version by dsr_ on Sunday June 09, 2019 @08:13AM (#20138709)
øbol comes through as øoby.

Rot13 is not defined for characters outside [a-zA-Z].

Re:ROT13: good version by runxel on Sunday June 09, 2019 @10:06AM (#20139261)
German "ß" works neither (which could at least be substitued with "ss").
Re:ROT13: good version by maxheadroom on Sunday June 09, 2019 @12:32PM (#20140161)
Neither does (æ or Æ).
Re:ROT13: good version by amptorn on Sunday June 09, 2019 @03:50PM (#20141460)
Just out of curiosity, what would you expect ø to encode to?
Re:ROT13: good version by dsr_ on Sunday June 09, 2019 @04:25PM (#20141679)
When 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 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 -- so I expect that Koreans can learn to read rot12.

Re:ROT13: good version by amptorn on Sunday June 09, 2019 @06:01PM (#20142222)
> 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?

Re:ROT13: good version by dsr_ on Sunday June 09, 2019 @07:13PM (#20142522)
I can't say it's correct or incorrect: it's undefined, and this is one way of handling it. For some purposes it might be the best way to handle it, for others it might be bad.

Because rot13 is not defined for a lot of possible inputs, different implementations can produce different results, and not be interoperable.

Re:ROT13: good version by mseidl on Sunday June 09, 2019 @07:59AM (#20138657)
ROT26 is 2x as secure.
Re:ROT13: good version by amptorn on Sunday June 09, 2019 @03:51PM (#20141466)
This is a classic entry-level security mistake. You have to pick a work factor k and then do 2^k iterations of ROT13.
Re:ROT13: good version by anon4242 on Sunday June 09, 2019 @07:21PM (#20142555)
k=1 FTW!
Re:ROT13: good version by aequitas on Sunday June 09, 2019 @09:10AM (#20138943)
I still prefer 3rot13.
Re:ROT13: good version by dveeden2 on Sunday June 09, 2019 @08:32AM (#20138771)
But emoji is not handled correctly, the cleartext and ciphertext are identical
Re:ROT13: good version by xeeeeeeeeeeenu on Sunday June 09, 2019 @10:25AM (#20139396)