2017-2018-1 attack algorithm for block cipher based on 201552228

Source: Internet
Author: User

2017-2018-1 201552228 algorithm for brute-attack algorithm of block cipher: an innovative approach to the stability of the English alphabet based on the reading of random sequences generated by the use of the English alphabet of randomly arranged text materials as the key to the brute-attack.

We take des algorithm as an example to illustrate the algorithm of brute-lift attack.

Des algorithm adopts 64-bit master key, so the key number of key space of master key is 2^64, it is unrealistic to try to take the value of each key, because the computing ability of the computer is limited, so we try to choose 2^32 key from the key space. The key to the experiment is how to randomly take 2^32 out of 2^64 keys, in other words, how to take 2^32 values in 0~ (2^64)-1 consecutively.

The letter frequency refers to the frequency with which each letter appears in the text material. After a large number of textual materials are investigated and counted, the frequency of each letter will tend to stabilize. From the network of multiple letters frequency table analysis, found that as long as the text materials can be guaranteed wide source, the number of words enough, each letter appears in the same frequency is similar.

First we group the letters in the alphabet frequency table so that the sum of the letters in each group is equal to 50%.

Now we read any letter in the text material, the probability that the letter belongs to the first group is equal to the probability of belonging to the second group, then we randomly read a character from the text material, like tossing a coin, the probability of having a positive and negative is equal.

Then we need to prepare the text material and perform a character read to generate a random sequence as the key. The content in the text material should be enough. We need to 2^32 a key, the length of each key is 2^6=64 bit, so we need a random 0-1 sequence with a length of 2^38 bits. This 0-1 sequence is obtained by reading the letters in the text, each time reading to a letter to determine whether the letter in the first group or the second group, if the first set of output 0, if the second set of output 1.

In general, each English letter is a char type variable in the computer, with a variable of 1 bytes per char type, and we need a random sequence of length 2^32*64=274 877 906 944 bytes, which is about 256G of text data.

Let's now analyze the probability of a repeat key of 1/(2^64) =5.4 * 10^ (-20) is much smaller than the standard 0.05% of small probability events in mathematical statistics, and we can assume that duplicate keys will not occur.

We directly in order to read the text material letter is not possible, because the English word combination is not random, and some combinations will often appear, for example, the corresponding three-bit 0-1 sequence will often appear, and some combinations will never appear, such as XYZ, No words will use this collocation. The character of this English word has caused a kind of the implication of the letter appearing before and after. So what we're going to do next is make a random full arrangement of the English letters of the text material. This implementation is not complicated, the first experiment of cryptography course is to achieve random full arrangement.

The idea of generating the 0~n is to determine the number of bytes of data to be read according to the n input, then read the data into the data according to the label and the value of the data to determine the number of positions needed to exchange two numbers, and then exchange, you can get a full array of p.

  #include <stdio.h>main () {FILE *fp;    int a,b,c,d,i,j,n,temp;    int number[256]={0};    Char ch;    Char string[256]; if ((Fp=fopen ("E:\\messages.txt", "R") ==null) {printf ("Open file failed!")        \ n ");    Exit (0); } else {printf ("Open File succeeded!    \ n ");    } printf ("Please enter n (not more than 255):");    scanf ("%d", &n);    b=0;        for (a=0;a<n;a++) {number[a]=a;        printf ("%d", Number[a]);        b++;    if (b%10==0) printf ("\ n");    } printf ("\ n");    for (a=0;a<=n;a++) {string[a]=fgetc (FP);        } for (i=n;i>0;i--) {j= (string[i-1]+string[i])%i;        Temp=number[i];        NUMBER[I]=NUMBER[J];    Number[j]=temp;    } b=0;        for (a=0;a<n;a++) {printf ("%d", Number[a]);        b++;    if (b%10==0) printf ("\ n"); } int fclose (FILE *fp);  

After the full-array build is complete, we can begin to read the letters individually, depending on the group to which the letter belongs, to determine whether the next digit of the random sequence is 0 or 1. Each generated 64-bit random sequence, we use this 64-bit random sequence as the key to the plaintext encryption, the results and ciphertext comparison, if the same is true of the 64-bit random sequence is the real key, if not the same will continue to read the letter from the text, generate a random sequence, until the completion of 2^32 attempts.

2017-2018-1 attack algorithm for block cipher based on 201552228

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.