7.3.3 STA: DecryptionAlgorithm07
7.3.3.1 Decryption process
The Standard Transfer Algorithm decryption process is shown in Figure 21 , which comprises a key alignment process and 16 iterations of a permutation, substitution and key rotation process.
标准传输算法解密过程如图21所示,包括一个密钥对齐过程和一个置换、替换和密钥旋转过程的16次迭代。
The decryption algorithm and encryption algorithm are complementary and thus share the same EA code.
解密算法和加密算法是互补的,因此共享相同的EA代码。
7.3.3.2 Permutation process
The decryption permutation process is illustrated in Figure 22.
解密置换过程如图22所示。
A sample permutation table is given in Table 51 .
表51给出了一个样本置换表。
The first entry in the permutation table corresponds to the least significant bit position 0 in the DataBlock and the last entry to the most significant bit position 63 in the DataBlock.
置换表中的第一项对应于数据块的最低有效位0,而最后一项对应于数据块的最高有效位63。
Use the bit position of the source DataBlock as an index into the permutation table; then use the value found in the permutation table at that entry position as a pointer to the bit position in the destination DataBlock. For example: for the source DataBlock bit position 7 corresponds to the value 52 in the permutation table, thus the value of bit 7 from the source DataBlock is placed in bit position 52 in the destination DataBlock.
使用源数据块的位位置作为置换表的索引。然后将在置换表中找到的该位置的值作为指向目标数据块中对应位的指针。例如:源数据块位7对应置换表中的值52,因此源数据块位7的值放在目标数据块位52的位置。
It can be seen that this gives the inverse result of the process in 6.5.4.3.
可以看到,这与6.5.4.3中的过程相反。
7.3.3.3 Substitution process
The decryption substitution process is illustrated in Figure 23.
There is a 4-bit substitution process for each of the 1 6 nibbles in the data stream. The substitution table used is one of two 1 6-value substitution tables and is dependent on the least significant bit setting of the corresponding nibble in the key. A sample substitution table is given in Table 52.
对于数据流中的16个蚕食,每个都有一个4位替换过程。这里使用的替换表是两个16值替换表中的一个,它取决于键中对应小块的最低有效位设置。表52给出了一个样本替换表。
The first entry in the substitution table corresponds to entry position 0 and the last to entry
position 15.
替换表中的第一个条目对应于条目位置0,最后一个条目对应于条目位置15。
Use the value of the data nibble as an index to an entry position in the substitution table; then replace the nibble value with the value from the substitution table found at that entry position. For example: if the value of the data nibble is 8 and we are using SubstitutionTable1 , then the entry at position 8 is the value 1 4, thus replace the data nibble value with the value 1 4.
使用数据块的值作为替换表项位置的索引。然后用在该入口位置找到的替换表中的值替换nibble值。例如:如果数据nibble的值是8,而我们使用的是SubstitutionTable1,那么位置8的元素的值是14,因此用1 4替换数据nibble的值。
It can be seen that this gives the inverse result of the process in 6.5.4.2.
可以看出,这与6.5.4.2中的过程相反。
7.3.3.4 Key rotation process
The entire key is rotated one bit position to the right as illustrated in Figure 24.
整个密钥向右旋转一位,如图24所示。
7.3.3.5 Worked example to decrypt a TransferCredit token using the STA
A worked example using the sample substitution and permutation tables is illustrated in Figure 25.
图25展示了一个使用样本替换和置换表的示例。
标签:39,预付费,process,电能表,value,substitution,position,bit,table From: https://blog.csdn.net/huaqianzkh/article/details/143779267