Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Krypton Series 4-7

2025-02-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Level 4: Vigenere Cipher encryption, can counter word frequency statistics, need to know the password, this question knows the key length 6.

http://www.simonsingh.net/The_Black_Chamber/crackingprinciple.html

This website explains how to crack Vigenere Cipher encryption.

http://smurfoncrack.com/pygenere/pygenere.php

Copy the ciphertext directly to the above page, you can guess the password "FREKEY".

Use this code to break the cipher.

Level 5: Encryption is the same as level 4, but the key length is unknown.

Using the decryption site at level 4, you can manually specify the key length for testing. You can also use the Vigenere Cipher decryption tool web page below to guess automatically:

http://www.simonsingh.net/The_Black_Chamber/vigenere_square_tool.html

The key is KEYLEN.

Decrypt the ciphertext with the secret key.

Level 6: LFSR encryption

Reverse encryption algorithm:

Magic value calculation function: flsr cs:reg_2543 Initial value is 1.

public lfsr lfsr proc near var_2= word ptr -2 push rbp mov rbp, rsp mov [rbp+var_2], 0 movzx eax, cs:reg_2543 mov edx, eax and edx, 1 movzx eax, cs:reg_2543 movzx eax, ax and eax, 2 sar eax, 1 xor eax, edx mov [rbp+var_2], ax movzx eax, cs:reg_2543 shr ax, 1 mov edx, eax movzx eax, [rbp+var_2] shl eax, 3 or eax, edx mov cs:reg_2543, ax movzx eax, cs:reg_2543 movzx eax, ax pop rbp retn lfsr end

ELF x86_64 program, encryption algorithm is: c --> capital--> -0x41 --> +key[i](0-9 cycle)--> +magic --> -0x41 --> -0x1a until the value +0x41

Plaintext test:

AAAAAAAAAABBBBBBBBBB BBBBBBBBBBAAAAAAAAAA ABABABABABABABABABAB

EICTDGYIYZLUIOTJSGYZ FJDUEHZJZAKTHNSIRFXY EJCUDHYJYAKUHOSJRGXZ

It can be found that the same character is in different positions, the ciphertext is different, but the same character is in the same position, the ciphertext is the same. It is actually a two-dimensional secret code table of [letter * position].

Decryption can use plaintext ***, generate a 26*20 password table, and then look up the table to decrypt.

You can also use known algorithms to decrypt directly with programs:

#include short reg = 1;char* a_en = "EICTDGYIYZLUIOTJSGYZ";char* a_pl = "AAAAAAAAAABBBBBBBBBB";char* b_en = "FJDUEHZJZAKTHNSIRFXY";char* krypton7 = "PNUKLYLWRQKGKBE";main(){ short a = 0; int b, c; int i, j; char *key[10]; short magic[20]; for(i=0, j=0; i> 1; a = b ^ c; b = reg; b = b >> 1; c = a; c = c = 10) j = 0; key[j] = a_en[i] - a; while(key[j] < 0x41) key[j] += 0x1A; key[j] -= a_pl[i]; printf("magic: %hx\tkey[%d]: %hhx\n", a, j, key[j]); } //decryption test for(i=0, j=0; i= 10) j = 0; b = b_en[i] - magic[i]; while(b < 0x41) b += 0x1A; b -= (int) key[j]; while(b < 0x41) b += 0x1A; printf("%c", b); } printf("\n"); //decrypt krypton7 for(i=0, j=0; i= 10) j = 0; b = krypton7[i] - magic[i]; while(b < 0x41) b += 0x1A; b -= (int) key[j]; while(b < 0x41) b += 0x1A; printf("%c", b);jia } printf("\n");}

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report