Re: cryptanalyzing bitwise tramps?
- From: yarrkov@xxxxxxxxx
- Date: Tue, 25 Mar 2008 02:34:28 -0700 (PDT)
On 24 maalis, 19:51, HHaller <hhal...@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
Doug <nos...@xxxxxxxxxx> wrote:
I'm thinking of a btc which takes a password and uses it to
determine an input buffer size. The (alphabetic) order of
the letters determines a scheme for "swapping" 0 or 1 bits
within that buffer, producing characters unlike the input
byte stream. After each buffer is written out, the password
is "progressed" by rotating the letters and re-figuring the
bit swapping plan, so any attack s/b an algorithmic one.
(Obviously, the password size has to be multiplied by 8 to
create a large enough plan and buffer.)
This isn't "real math", it's just a mechanical program, but
I wanted something simple enough for beginners to play with.
My question is, how would a knowledgable cryptanalyst attack
it? Is it trivial enough that I don't need to worry about
it being of (morbid) interest to our government?
does it provide a one to one mapping of input to output ?
In the sense that the same number of bytes comes out as goes
in, yes. But no one input byte corresponds to any one output
byte, since its bits are distributed throughout the whole
working buffer, which could be several k long.
consider how you would de-encrypt it.
Decryption involves reversing the swap, (the program
encrypts and decrypts reliably.)
Here's the actual swap code:
int order[number_of_bits] contains the "destination" array
indices with which the source buffer's bits (accessed in order
via for(;;) loop) are swapped. order[] is built by multiplying
the password length by 8 and analyzing the alphabetic order
of its letters to produce unique integers.
Source code for building order[] would be nice as I don't quite
understand what you specifically mean.
<snip>
My questions concern how a professional would develop a
plan of attack if they don't know the password length
(and therefore the buffer size), and don't want to try
brute force. Not being a math major, I'm still guessing
there are ways to do it which I've not heard of.
From what I can tell, the actual password is irrelevant for
encryption, only the bit permutation derived from it is used. A simple
chosen-plaintext attack: request encryptions for each possible input
buffer with precisely one bit set, the permutation can be recovered
with that information.
(My spiffysolver.c could attack this also, it would use that same
attack.)
.
- Follow-Ups:
- Re: cryptanalyzing bitwise tramps?
- From: HHaller
- Re: cryptanalyzing bitwise tramps?
- From: yarrkov
- Re: cryptanalyzing bitwise tramps?
- References:
- cryptanalyzing bitwise tramps?
- From: HHaller
- Re: cryptanalyzing bitwise tramps?
- From: Doug
- Re: cryptanalyzing bitwise tramps?
- From: HHaller
- cryptanalyzing bitwise tramps?
- Prev by Date: Seeking an SHA-256 implementation in C
- Next by Date: Re: my KDF vs dictionary attacks
- Previous by thread: Re: cryptanalyzing bitwise tramps?
- Next by thread: Re: cryptanalyzing bitwise tramps?
- Index(es):
Relevant Pages
|
|