Quote Originally Posted by fullmetalcoder View Post
It's a good idea but how do we compute the "n"???
S-box will handle that.
If it's generated from the first key or the first unencrypted block or anything like that it does not provide any security enhancement except if you consider that the attacker ignore the algorithm used but in this case he doesn't stand a chance to break the message...
No, it's not "generated" from key, it's part of the key. Consider the key to be made of two parts - one is the S-box number used and the other is the seed for the key stream generator.

BTW what is a "S-block" ???
Eem... sorry, should be S-box

Generally the idea is that n changes every block and you don't know which S-box is used, so you can't follow the pattern - you have to check every S-box. The larger the number of S-boxes, the better the security. Additionally you can introduce another level - switch S-boxes during computation.

Of course all that makes the cipher quite computation intensive and hard to implement in hardware.