知道了明文,如何发现所使用的加密方案? [英] Knowing the plaintext, how to discover the encryption scheme used?
问题描述
我有一些字符()项目在被留下加密由过去的开发项目DBF表。
I have some char() fields in a DBF table that were left encrypted by a past developer in the project.
不过,我所知道的几个记录解密的明文结果。我怎样才能确定函数/算法/方案对原始数据进行解密? 这些都是一些样本字段:
However, I know the plaintext result of the decryption of several records. How can I determine the function/algorithm/scheme to decrypt the original data? These are some sample fields:
有关cryptext:
For cryptext:
b5 01 02 c1 e3 0d 0a
明文应该是:
plaintext should be:
3543921 or 3.543.921
而对于cryptext:
And for cryptext:
41 c3 c5 07 17 0d 0a
明文应
1851154 or 1.851.154
我相信 0D 0A
只是填充。从聚集在Win-1252编码数据(说不上来,如果事项)
I believe 0d 0a
is just padding. Was from data gathered in win-1252 encoding (dunno if matters)
编辑:这是出于好奇和学习。我想能够undestand使用的加密(似乎一个简单的,虽然是二进制数据),回收字段的值对于其明文不知元组
It's for the sake of curiosity and learning. I want to be able to undestand the encryption used(seems a simple one, although is binary data) to recover the value of the fields for the tuples whose plaintext I don't know.
编辑2:增加了几个样品
推荐答案
有一个在一般情况下,没有简单的方法。这个问题太笼统。尝试张贴这些平凡+加密的字符串。
There is no easy way in general case. This question is too general. Try posting these plain + encrypted strings.
编辑:
- 是为了学习,你可以阅读这篇文章:加密维基百科
-
如果你真的beleive加密很简单 - 检查它是否是一个字节(或字)级XOR - 请参见下面的伪code
- for the sake of learning you can read this article : Cryptography on Wikipedia
if you really beleive the encryption is simple - check if it's a byte (or word) level XOR - see the following pseudocode
for (i in originalString) {
newString[i] = originalString[i] ^ CRYPT_BYTE;
}
这篇关于知道了明文,如何发现所使用的加密方案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!