English 中文(简体)
3. 震动游乐圈
原标题:Cracking the Playfair cipher
  • 时间:2010-05-31 15:06:19
  •  标签:
  • encryption

我有密码和加密方案(关键硬编码)。 我如何找到钥匙? 当然,加密器的可用性必须敞开可能性,而不是简单化。

最佳回答

了解算法可能有助于分解电离层案文,但只有在计算法有缺陷时才能加以利用。 (好消息是Emfair有一些缺陷,可以加以利用)

下面是几个很好的起点。

  1. Wikipedia (read it all - particularly Cryptanalysis)
  2. Basic Cryptanalysis (look at chapter 7)

第二点不是我所说的灯光,而是你们如果重新进入圈子的话。

问题回答

我找到了五条线路(显然重新评价了一条轨道,并且承认很长一段线):

(a,b,c)="".join((input("CODE: ")).split()),input("Polybius Square: "),"" 
for i in a:
    c+=str(int(((b.find(i))-((b.find(i))%5))/5))+str((b.find(i))%5)
for j in range(0,(int(len(c)/2))):
    print((b[((5*(int((c[:(int(len(c)/2))])[j])))+(int((c[(int(len(c)/2)):])[j])))]).lower(),end="")

NB:在进入聚贝斯广场时,首先进入第1行,然后进入第2行等,没有空间

然后,你就不得不去除不必要的x和vo!

Try:

(a,b,f,g,c)="".join(input("CODE: ").split()),input("Polybius S: "),"","",1
for(i)in(a):
    if(c%2)==0:
        g+=i
    else:
        f+=i
    c+=1
for(j)in(range(0,len(f))):
    if(b.find(f[j])%5)!=(b.find(g[j])%5)and(int(((b.find(f[j]))-(b.find(f[j])%5))/5))!=(int(((b.find(g[j]))-(b.find(g[j])%5))/5)):
        print(b[((int(((b.find(f[j]))-(b.find(f[j])%5))/5))*5)+(b.find(g[j])%5)],end="")
        print(b[((int(((b.find(g[j]))-(b.find(g[j])%5))/5))*5)+(b.find(f[j])%5)],end="")
    elif(b.find(f[j])%5)==(b.find(g[j])%5)and(int(((b.find(f[j]))-(b.find(f[j])%5))/5))!=(int(((b.find(g[j]))-(b.find(g[j])%5))/5)):
        print(b[((((int(((b.find(f[j]))-(b.find(f[j])%5))/5))-1)%5)*5)+b.find(f[j])%5],end="")
        print(b[((((int(((b.find(g[j]))-(b.find(g[j])%5))/5))-1)%5)*5)+b.find(g[j])%5],end="")
    elif(b.find(f[j])%5)!=(b.find(g[j])%5)and(int(((b.find(f[j]))-(b.find(f[j])%5))/5))==(int(((b.find(g[j]))-(b.find(g[j])%5))/5)):
        print(b[((int(((b.find(f[j]))-(b.find(f[j])%5))/5))*5)+((b.find(f[j])%5)-1)%5],end="")
        print(b[((int(((b.find(g[j]))-(b.find(g[j])%5))/5))*5)+((b.find(g[j])%5)-1)%5],end="")

它不是粗略的,而是运作。





相关问题
Extend Contacts application on Android to provide encryption

I want to encrypt individual contacts stored by the Contacts application on Android based on user s preference. So, I am thinking I ll have to hook/extend the Contacts application before the it stores ...

Make md5 strong

Im making a website that will intergrate with game that only support md5 hashing metod (atm). Which ofc is not especially safe anymore. But how could i make it stronger? Should I just generate long ...

How to Pack/Encrypt/Unpack/Decrypt a bunch of files in Java?

I m essentially trying to do the following on a Java/JSP-driven web site: User supplies a password Password is used to build a strongly-encrypted archive file (zip, or anything else) containing a ...

Thread & Queue vs Serial performance

I though it ll be interesting to look at threads and queues, so I ve written 2 scripts, one will break a file up and encrypt each chunk in a thread, the other will do it serially. I m still very new ...

Convert PHP encryption code to C#

I m trying to convert this piece of code from PHP to C#. It s part of a Captive Portal. Could somebody explain what it does? $hexchal = pack ("H32", $challenge); if ($uamsecret) { $newchal = ...

Encryption: how to have 1 iv despite multiple fields

I ve been stuck trying to arrive at a best solution for this for a while. I know that an initialization vector has to be unique for each item being encrypted. So if I m encrypting an address and I ...

热门标签