New Stream Cipher: Restream
From: Dominik Reichl (dominik.reichl_at_gmx.de)
Date: 08/29/03
- Next message: Tom St Denis: "Re: Help With PasswordSafe!!!"
- Previous message: Hubert von Jättekivastjärna Sr.: "Re: Small streamcipher MiniTrixor 48-bit"
- Next in thread: Tom St Denis: "Re: New Stream Cipher: Restream"
- Reply: Tom St Denis: "Re: New Stream Cipher: Restream"
- Reply: David Wagner: "Re: New Stream Cipher: Restream"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: 29 Aug 2003 04:34:41 -0700
Hello,
I have created a new stream cipher: "Restream". It is relatively fast,
but I don't know how secure it is... But the output looks fairly random
and the Diehard suite didn't find anything.
It is something like a nonlinear feedback shift register, but with 2048
32-bit values.
The KSA of Restream is relatively easy to describe. The initial state
array (2048 32-bit values) is filled by hashing the user password plus
an incrementing counter using SHA-1 (but it could be any other one-way
hash function) until the array is completely filled.
Before calculating the final 32-bit output word, apply this to the state
array:
uNew = p[MRC(pos)] + p[MRC(pos+1)] + p[MRC(pos-1)] + p[MRC(pos-2)] +
((p[MRC(pos+17)] * p[MRC(pos+37)]) ^
(p[MRC(pos+101)] ^ p[MRC(pos+213)])) +
((p[MRC(pos+157)] ^ p[MRC(pos+513)] ^
p[MRC(pos+127)]) + p[MRC(pos+713)]);
ctx->state[pos] = uNew;
ctx->pos++;
where MRC(x) is x & 2047, and 'p' a pointer to ctx->state.
The 32-bit value which can be used then for encryption/decryption is:
x = (p[MRC(pos+27)] + p[MRC(pos+317)]) ^ p[MRC(pos+657)];
You can download a full C++ implementation of the cipher here:
http://home.tiscali.de/reichl/archive/restream/restream.zip
This also includes the project files and a Win32 binary.
If you want to try to break something, try this:
http://home.tiscali.de/reichl/archive/restream/news.txt
http://home.tiscali.de/reichl/archive/restream/news.enc
The first file is the 'news' file from the standard calgary corpus, the
second one is the 'news' file encrypted with Restream.
Can you find the key?
If the challenge above should be too easy (my cipher is breakable?!?):
http://home.tiscali.de/reichl/archive/restream/test2.enc
Try to decrypt this file. No key given.
A tip: this file is a wordlist.
How would you attack my cipher? Any weaknesses?
Happy breaking :-)
Dominik
- Next message: Tom St Denis: "Re: Help With PasswordSafe!!!"
- Previous message: Hubert von Jättekivastjärna Sr.: "Re: Small streamcipher MiniTrixor 48-bit"
- Next in thread: Tom St Denis: "Re: New Stream Cipher: Restream"
- Reply: Tom St Denis: "Re: New Stream Cipher: Restream"
- Reply: David Wagner: "Re: New Stream Cipher: Restream"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|