From: Dave -Turner on 7 Jan 2010 17:35 Say I've encrypted a string with a monoalphabetic cipher (so I haven't used a polyalphabetic cipher to begin with nor do I want to at any stage) What are some simple things I can do to throw off frequency analysis?
From: Dave -Turner on 7 Jan 2010 17:41 For example, with every byte ... if byteaddress mod 2 = 1 then rotate the bits left by x else rotate the bits right by x endif Obviously i'm not after guaranteed security here, just simple ways to add a decent level of frequency analysis protection with minimal code (the above example is no doubt a poor one :) as the data being encrypted isn't of high importance
From: rossum on 7 Jan 2010 17:53 On Fri, 8 Jan 2010 06:35:50 +0800, "Dave -Turner" <admin(a)127.0.0.1> wrote: >Say I've encrypted a string with a monoalphabetic cipher (so I haven't used >a polyalphabetic cipher to begin with nor do I want to at any stage) > >What are some simple things I can do to throw off frequency analysis? > Have more characters of cypher than plain so the frequent letters can have more than one cypher representation. For example there might be four different ways to encypher 'E' with only one way to encipher 'Z'. Use an unexpected language, Navaho or Welsh for instance. Use a lot of angslay. rossum
From: Dave -Turner on 7 Jan 2010 18:07 > Use an unexpected language, Navaho or Welsh for instance. Cheers rossum, but I should've mentioned that I just want to do this in simple programming code (basic/assembly level kinda thing, not native Indian :)
From: unruh on 7 Jan 2010 18:47
On 2010-01-07, Dave -Turner <admin(a)127.0.0.1> wrote: > Say I've encrypted a string with a monoalphabetic cipher (so I haven't used > a polyalphabetic cipher to begin with nor do I want to at any stage) > > What are some simple things I can do to throw off frequency analysis? Given your requirements, nothing. A monoalphabetic cypher means that each letter in the source maps to a unique letter in the final. If there are more E in the source there will be more C(E) in the final. Now, you could do something like O_i=C(O_(i-1) ^ M_i) where M is the message, M_i is the ith letter, C is the substitution cypher, and ^ is some invertible combination of the two letters (eg addition mod (Number of letters in the alphabet), XOR,....) > > |