如何破解削弱TEA块密码? [英] How to crack a weakened TEA block cipher?

查看:342
本文介绍了如何破解削弱TEA块密码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,我试图破解茶叶分组密码在C.这是一个分配和茶密码已weakend所以,关键是2个16位数字。

At the moment I am trying to crack the TEA block cipher in C. It is an assignment and the tea cipher has been weakend so that the key is 2 16-bit numbers.

我们已经给出了code到EN code明文。

We have been given the code to encode plaintext using the key and to decode the cipher text with the key also.

我有一些明文的例子:


  1. 明文(1234,5678)EN codeD(3e08,fbab)

  2. 明文(6789,DABC)EN codeD(6617,72b5)

带连接code方法接受明文和关键,连接code(明文,KEY1)。这与其它键再次发生创造了EN codeD消息,连接code(ciphertext1,键),然后创建连接codeD(3e08,fbab)或EN codeD(6617, 72b5)。

Update

The encode method takes in plaintext and a key, encode(plaintext,key1). This occurs again with another key to create the encoded message, encode(ciphertext1,key), which then creates the encoded (3e08,fbab) or encoded (6617,72b5).

我怎么会去破解这个密码?

How would I go about cracking this cipher?

目前,我带code。与每一个可能的密钥已知明文;关键尺寸为十六进制值FFFFFFFF。我写这篇文章到文件。

At the moment, I encode the known plaintext with every possible key; the key size being hex value ffffffff. I write this to file.

但现在我坚持和需要的方向。

But now I am stuck and in need of direction.

我如何使用等效键的TEA的弱点,以降低所需的时间,将采取破解密码?另外,我要在中间人攻击使用的人。

How could I use the TEA's weakness of equivalent keys to lower the amount of time it would take to crack the cipher? Also, I am going to use a man in the middle attack.

当我连接code与已知明文和所有关键1秒它会创建所有的加密文本关联密钥并将​​其存储在表中。

As when I encode with known plaintext and all key 1s it will create all the encrypted text with associated key and store it in a table.

然后我将与已知的密文是在我和键2的所有可能的值分配解密。这将使我已经只被解密一次解密的​​表。

Then I will decrypt with the known ciphertext that is in my assignment with all the possible values of key2. This will leave me with a table of decrypts that has only been decrypted once.

然后我可以在2个表放在一起比较,看是否有encrpts与key1的比赛进行解密密钥2。

I can then compare the 2 tables together to see if any of encrpts with key1 match the decrypts with key2.

我想用equilenvent弱点为好,如果有人可以帮助我在code这将是巨大implmenting这一点。任何想法?

I would like to use the equilenvent weakness as well, if someone could help me with implmenting this in code that would be great. Any ideas?

推荐答案

这是极其相似的的双地穴的从IOI2001年编程竞赛的问题。一般的方案示这里,它不会给你code,但也许你指出正确的方向。

This is eerily similar to the Double Crypt problem from the IOI '2001 programming contest. The general solution is shown here, it won't give you the code but might point you in the right direction.

这篇关于如何破解削弱TEA块密码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆