in reply to Re: crypto with core modules only
in thread crypto with core modules only

That is very insecure. It's basically adding the same set of 13 numbers in a cycle to each 13th character of the plaintext. You can eliminate the key from the cyphertext by calculating something along the lines of
$diff[$_] = $cyphertext[$_] - $cyphertext[$_+13] for 0..(@cyphertext +- 13);
You then end up with this equivalence for all the chars in the plaintext, apart from the first and last 13:
$diff[$_] == $plaintext[$_] - $plaintext[$_+13];
From there it's fairly easy to deduce what @plaintext is, especially if a few chars of the plaintext are known or can be guessed.

Dave.

Replies are listed 'Best First'.
Re^3: crypto with core modules only
by tobyink (Canon) on Aug 28, 2018 at 18:36 UTC

    It's called a Vigenere cipher, and this variant is an especially weak variant because the length of the key is known to be 13 characters. It is somewhat more secure if the key length isn't known to the attacker.

    If the key length is variable, for long ciphertexts, there are algorithms that can quickly yield the plaintext. For very short cipertexts, it's a lot more secure than you might think. If the key is as long as the message, it's basically a one-time pad.

Re^3: crypto with core modules only
by stevieb (Canon) on Aug 28, 2018 at 15:46 UTC

    Thanks Dave,

    I figured it's terribly insecure, but the original premise was helping someone do some simple obfu that could be encoded in hex and then decoded. Security wasn't really part of the deal.

    It was a uni project for the person and we kind of collaborated outside of any forums. A learning exercise essentially.