Re: cryptanalyzing bitwise tramps?



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.)
.



Relevant Pages

  • [NT] Vulnerability Report for Windows SMB DoS
    ... cross-platform mechanism for client systems to request file services from ... In order to exploit the vulnerability a user account is needed for the ... is therefore vulnerable to a denial of service attack. ... Later in the processing of the request, at SRV.SYS+33209h another buffer ...
    (Securiteam)
  • Re: gets(); was: Re: Why does rewind() ignore errors?
    ... In most environments these days, the chances that a random buffer ... difference between an anomoly and a directed attack. ... "random" buffer overflow, I meant one caused by a bug, rather than by a ...
    (comp.std.c)
  • RE: Attack(s) caught by Okena
    ... I can't tell what the rest of the captured buffer in the event log is meant ... this looks like one attack ... 657400ff' This either happens when a program uses self-modifying code ... or when a program has been subverted by a buffer overflow attack. ...
    (Incidents)
  • Re: cryptanalyzing bitwise tramps?
    ... determine an input buffer size. ... is "progressed" by rotating the letters and re-figuring the ... bit swapping plan, so any attack s/b an algorithmic one. ... how would a knowledgable cryptanalyst attack ...
    (sci.crypt)
  • Re: A little metal crank
    ... "Every time I use the buffer I think of the creativity and ... I don't mind, ... The letters on it say O-F-F because it turns the ... You know that red lights mean stop, ...
    (rec.crafts.metalworking)