# How weak/strong is this hand cipher? (updated) [closed]

In simple steps here the system:

first write text.

hand cipher

then divide into groups of three letters:

han dci phe r

then choose a key consisting of three letters, for example car and encrypt first three letters with the key han + car => kbf.

Then take the result kbf and encrypt the second three letters dci + kbf and the result to encrypt the next third three letters and so on until the end.

How strong is this system?

oct22 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- oct26 (updated)

Hello again , I read a little and work a much and come with this, if the old system above is weak. What about that;

will divide the plain text into groubs of three letters, then choose three pass keys each three letters ex. ( are, you, mad )

ill sec ure cip her = plain text divide into sectors

are jdq cit xay ajo = use key no.1 'are'

jdq cit xay ajo iog = cipher text round.1

you isl lbf jcb kmq = use key no.2 'you'

isl lbf jcb kmq tbx = cipher text round.2

vtp hvv ryx clo wnm = cipher text round.3

ill secure cipher = plain text

vtp hvvryx clownm = cipher text

S0................? so embarrassing, really ill secure cipher! just leave the post open a couple of days, no more answers needed today

-

## closed as too localized by D.W., Paŭlo Ebermann♦Oct 28 '12 at 21:54

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Is it absolutely trivial too .? –  illsecure Oct 26 '12 at 15:17
The attack from before still works, except you need to run it three times. –  CodesInChaos Oct 26 '12 at 15:23
I know that but its like 3DES now u need to test every key three times is that possible any way, and note that if the txt longer it could be 5,7 or ten letters in each sector. How can u try every key ? and any way I've something hidden will maximum the security. just for this any possible attack. –  illsecure Oct 26 '12 at 15:45
The attack does not require any key guessing. The key is simply the ciphertext of the previous block. Any data after 3*n chars where n is the length of each key can be trivially decrypted without knowing any of the keys. –  CodesInChaos Oct 26 '12 at 16:02
How I miss that the only block that encrypted is the first, well... give me more time to think. –  illsecure Oct 26 '12 at 16:22
show 1 more comment

$c_0 = m_0 + k$

$c_i = m_i + c_{i-1}$ for $i>0$

It's absolutely trivial to break this, since the attacker knows the ciphertext, and thus knows both $c_i$ and $c_{i-1}$.

Decrypting the first group is hard. But to decrypt any group but the first, simply subtract the previous group from the current group $m_i = c_i - c_{i-1}$.

If you use the same key twice, you can also attack the first block by calculating $m^1_0-m^2_0 = c^1_0 - c^2_0$ which for typical texts allows some kind of frequency analysis on the messages. This is a generic attack stream ciphers which are used multiple times with the same key/IV.

Your updates scheme is secure for the first three blocks, and can be broken in exactly the same way as the old one. Just apply the above method three times giving you everything but the first 9 chars.

So once again it's secure if the key is used only once and the message is shorter than the key and insecure otherwise. You're still inferior to vignere with the same key-size, and that's already a pretty bad cipher.

-
ok 1.if u dont know how many letters in each block will it be easy too, 2.And what if you dont know anything about the system if you had cipher text only , 3.And last thing what if I zigzag(cipher) the cipher text will that make it more secure. –  illsecure Oct 22 '12 at 10:08
1. An unknown block-size doesn't help much either. The attacker simply tries different block-sizes until one fits. 2. The standard assumption in cryptography is that the algorithm is public, and only the key is secret. It's hard to say how much security is gained by hiding the algorithm, so we simply assume that no security is gained. 3. Zig-zag and other obfuscations don't increase security. The attacker can simply undo the transformation, since its unkeyed. –  CodesInChaos Oct 22 '12 at 10:11
one more question is there any way I can make hard yet easy to apply cipher using a key or there is no way for that? cuz I almost giving up –  illsecure Oct 22 '12 at 10:23
–  CodesInChaos Oct 22 '12 at 10:24
seen before, thanks any way. thats all for now –  illsecure Oct 22 '12 at 10:42