Re: Simple cipher program help

From: ošin (ošin_at_ragnarok.com)
Date: 04/28/03


Date: Mon, 28 Apr 2003 11:11:58 -0700


> I'm trying to write a program to take 64bits of plaintext in, using some
> kind of key, create 64bit cipher text.
>
> All this done over 16 iterations. Kind of like a really simple DES.
>
> I'm no good at programming, and just new to ciphertext - its just a little
> part of my school course.
>
> I was thinking, getting the input and key to binary, then XORing them,
then
> for each result, XORing it with the key.
>
> Will this work, or be reversible?

It will not work too well. You say that you XOR the input with the key to
get the first round result. Then you XOR that round result with the same key
to get the next round result. That means that on each even numbered round,
you XOR twice with the same key, which just gives you back the original
plaintext. After 16 rounds, you have not encrypted anything. Even if you did
toggle any bits, there is still the problem that you have not shuffled any
of the bits within the data. You should try to diffuse the data after each
round as well.



Relevant Pages

  • Re: Small streamcipher MiniTrixor 48-bit
    ... >> It would be nice to be the first to publish the plaintext, ... I will perform that attack tonight, ... > I do not think you understand the cipher correct, ... > try to run just the xor part and look at the output. ...
    (sci.crypt)
  • Re: New RUIX cipher
    ... I think we can push a 'differential' through your cipher with a 100% ... we are at the top of the next round. ... > The implementation has a mainroutine that calls the encode ... > finally in each round i xor the key with the corresponding plaintext ...
    (sci.crypt)
  • Re: Small streamcipher MiniTrixor 48-bit
    ... I do not think you understand the cipher correct, ... It creates a pseudo random outputstream that is used to xor the plaintext ... So this is the values that i use to xor the plaintext. ...
    (sci.crypt)
  • Re: Group cipher question
    ... > Take a block symmetric cipher, encrypt some plaintext using key a, then ... > the result is the same as a single encryption using key c. ... If you'd trust in xor: ...
    (sci.crypt)
  • Re: How good an encryption algorithm is this?
    ... If you try the algorithm, ... this modification of your algorithm is equivalent to a naive XOR ... > cipher - XORing the input data with a fixed key. ... > a plaintext and a ciphertext for some message, ...
    (microsoft.public.dotnet.languages.csharp)