aes-128算法加密
The Crypt-Arithmetic problem in Artificial Intelligence is a type of encryption problem in which the written message in an alphabetical form which is easily readable and understandable is converted into a numeric form which is neither easily readable nor understandable. In simpler words, the crypt-arithmetic problem deals with the converting of the message from the readable plain text to the non-readable ciphertext. The constraints which this problem follows during the conversion is as follows:
人工智能中的加密算法問題是一種加密問題,其中,以易于閱讀和理解的字母形式的書面消息被轉換為既不易于閱讀也不被理解的數字形式。 用簡單的話來說,密碼算法問題就是將消息從可讀的純文本轉換為不可讀的密文。 在轉換過程中,此問題遵循的約束如下:
A number 0-9 is assigned to a particular alphabet.
數字0-9分配給特定的字母。
Each different alphabet has a unique number.
每個不同的字母都有一個唯一的數字。
All the same, alphabets have the same numbers.
字母相同,數字相同。
The numbers should satisfy all the operations that any normal number does.
數字應滿足任何普通數字所做的所有操作。
Let us take an example of the message: SEND MORE MONEY.
讓我們以消息為例:發送更多的錢。
Here, to convert it into numeric form, we first split each word separately and represent it as follows:
在這里,為了將其轉換為數字形式,我們首先將每個單詞分開分割,并表示如下:
S E N D
M O R E
-------------
M O N E Y
These alphabets then are replaced by numbers such that all the constraints are satisfied. So initially we have all blank spaces.
然后將這些字母替換為數字,以便滿足所有約束條件。 所以最初我們有所有空格。
These alphabets then are replaced by numbers such that all the constraints are satisfied. So initially we have all blank spaces.
然后將這些字母替換為數字,以便滿足所有約束條件。 所以最初我們有所有空格。
We first look for the MSB in the last word which is 'M' in the word 'MONEY' here. It is the letter which is generated by carrying. So, carry generated can be only one. SO, we have M=1.
我們首先在最后一個單詞中尋找MSB,在這里,單詞“ MONEY”中的單詞為“ M” 。 這是隨身攜帶產生的字母。 因此,進位生成只能是一個。 因此,我們有M = 1 。
Now, we have S+M=O in the second column from the left side. Here M=1. Therefore, we have, S+1=O. So, we need a number for S such that it generates a carry when added with 1. And such a number is 9. Therefore, we have S=9 and O=0.
現在,在左側第二列中有S + M = O。 這里M = 1 。 因此,我們有S + 1 = O。 因此,我們需要一個S的數字,使其與1相加時會產生一個進位。 這樣的數字是9 。 因此,我們有S = 9和O = 0 。
Now, in the next column from the same side we have E+O=N. Here we have O=0. Which means E+0=N which is not possible. This means a carry was generated by the lower place digits. So we have:
現在,在同一側的下一列中,我們有E + O = N。 這里我們有O = 0 。 這意味著E + 0 = N是不可能的。 這意味著低位數字產生了進位。 因此,我們有:
1+E=N ----------(i)
1 + E = N ----------(i)
Next alphabets that we have are N+R=E -------(ii)
我們接下來的字母是N + R = E -------(ii)
So, for satisfying both equations (i) and (ii), we get E=5 and N=6.
因此,為了滿足方程式(i)和(ii) ,我們得到E = 5和N = 6 。
Now, R should be 9, but 9 is already assigned to S, So, R=8 and we have 1 as a carry which is generated from the lower place digits.
現在, R應該是9 ,但是9已經分配給S ,因此, R = 8,并且我們有一個1的進位,這是從低位數字生成的。
Now, we have D+5=Y and this should generate a carry. Therefore, D should be greater than 4. As 5, 6, 8 and 9 are already assigned, we have D=7 and therefore Y=2.
現在,我們有D + 5 = Y ,這應該產生一個進位。 因此, D應該大于4 。 由于已經分配了5、6、8和9 ,因此D = 7 ,因此Y = 2 。
Therefore, the solution to the given Crypt-Arithmetic problem is:
因此, 給定的加密算法問題的解決方案是 :
S=9; E=5; N=6; D=7; M=1; O=0; R=8; Y=2
S = 9; E = 5; N = 6; D = 7; M = 1; O = 0; R = 8; Y = 2
Which can be shown in layout form as:
可以在布局形式中顯示為:
9 5 6 71 0 8 5-------------1 0 6 5 2--------------
翻譯自: https://www.includehelp.com/ml-ai/crypt-arithmetic-problem-a-type-of-constraint-satisfactory-problem-in-artificial-intelligence.aspx
aes-128算法加密