in reply to Re: Encrypting a Filename
in thread Encrypting a Filename

I saw that, and supposed at the time it was a Perl implementation of the Vigenère cypher, probably because your chart was formatted as a square. Looking again now, it seems to be just a simple 8-way Ceasar cypher, which I guess is the same in principle with a 8-character password built-in rather than allowing the user to supply a password.

It will be trivially cracked. You can suppose that files end in ".exe" etc., and very often have dot as the 4th from the end character. Since the encoding rule depends on the mod-8 position, various length filenames will allow you to probe the cypher and get a few matches. From there you can pick out bits of words, and continue the process.

Hmm, I wonder if the old Vigenère or other substitution cypher could be used in a chaining mode...?

—John

Replies are listed 'Best First'.
Re: Re-3: Encrypting a Filename
by marcink (Monk) on Jun 15, 2001 at 03:16 UTC
    Well, I _did_ write it was a simple solution, didn't I? ;-)

    I like tye's suggestion, although increasing file name might mean exceeding filesystem's name length limit... Hmm... perhaps good ol' enigma?

    -mk
      I was just thinking on the drive home that I could implement the Vigenère cypher as a CUFP as a companion to your post.

      I also figured out how to use a stream cypher: treat the legal character set as a wheel, and use the output of a pseudorandom sequence (as set up initially with your key) as a count to shift the wheel. So even though the sequence produces numbers in the range 0..255, I can map that using modulo addition. That doesn't 'feedback' though, so I need to throw the current character into the sequence generator as it's encoded.

      I also wonder if RC4 can be trivially adapted to use an arbitrary sized alphabet.

      Using Enigma, generalized to any alphabet, is just plain cool, too!

      —John