AES CCM 128 位中的 S-box
S-box in AES CCM 128 bit
我正在使用 AES-CCM 进行数据加密和解密。
在学习AES的时候,接触到一个词,叫S-Box。
什么是S-Box,与AES的关系?如何计算?它是否取决于对称密钥?
AES-CCM 128 位如何生成密文?
S-Boxes 是一种用于对称加密算法的系统,用于替代和模糊密钥与要加密的文本之间的关系。
您可以在此 article 中看到更多信息。在这里,你有一个部分:
There are different types of cyphers according to their design [68]. One of these is the Substitution–PermutationNetwork (SPN) that generates the ciphered text by applying substitution and permutation rounds to the original text and the symmetric key to create confusion. To do this, it must be used the Substitution boxes (S-boxes) and Permutation boxes (P-boxes). The S-boxes substitute one-to-one the bits of a block of the input text in the round with bits of the output text. This output is taken as an input in the P-boxes and then it permutes all the bits that will be used as S-box input in the next round.
正如@CGG 所说,S-boxes 是 Substitution-Permutation 网络的一个组成部分。 Wikipedia entry 有很好的图表,有助于解释它们的工作原理。
将 S-box 视为简单的替换密码 -- A=1、B=2 等。在 SPN 中,您 运行 通过 S-box 输入以替换新值,然后你 运行 通过 P-box (排列)将修改后的位分配给尽可能多的 S-boxes 。重复此循环以将更改传播到整个密文。
通常,S-box 用相同数量的输出位替换输入位。这种交换应该 1:1 以提供可逆性(即你必须能够反转操作才能解密),应该采用雪崩效应(因此改变 1 位的输入会改变大约一半的输出位),并且应该取决于输入的每一点。
我正在使用 AES-CCM 进行数据加密和解密。
在学习AES的时候,接触到一个词,叫S-Box。
什么是S-Box,与AES的关系?如何计算?它是否取决于对称密钥?
AES-CCM 128 位如何生成密文?
S-Boxes 是一种用于对称加密算法的系统,用于替代和模糊密钥与要加密的文本之间的关系。
您可以在此 article 中看到更多信息。在这里,你有一个部分:
There are different types of cyphers according to their design [68]. One of these is the Substitution–PermutationNetwork (SPN) that generates the ciphered text by applying substitution and permutation rounds to the original text and the symmetric key to create confusion. To do this, it must be used the Substitution boxes (S-boxes) and Permutation boxes (P-boxes). The S-boxes substitute one-to-one the bits of a block of the input text in the round with bits of the output text. This output is taken as an input in the P-boxes and then it permutes all the bits that will be used as S-box input in the next round.
正如@CGG 所说,S-boxes 是 Substitution-Permutation 网络的一个组成部分。 Wikipedia entry 有很好的图表,有助于解释它们的工作原理。
将 S-box 视为简单的替换密码 -- A=1、B=2 等。在 SPN 中,您 运行 通过 S-box 输入以替换新值,然后你 运行 通过 P-box (排列)将修改后的位分配给尽可能多的 S-boxes 。重复此循环以将更改传播到整个密文。
通常,S-box 用相同数量的输出位替换输入位。这种交换应该 1:1 以提供可逆性(即你必须能够反转操作才能解密),应该采用雪崩效应(因此改变 1 位的输入会改变大约一半的输出位),并且应该取决于输入的每一点。