NIST

What is missing from the AES Validation Standard Pseudocode for the Monte Carlo Tests?

痞子三分冷 提交于 2021-01-29 05:23:59
问题 I'm trying to use the prescribed validation procedure for AES-128 in CBC mode, as defined in the NIST AESAVS standard. One of the more important parts of the test suite is the Monte Carlo test, which provides an algorithm for generating many 10000 pseudorandom tests cases such that it is unlikely that a hardcoded circuit could fake AES. The algorithm pseudocode therein appears to be taking some liberties with variable scope and definition, so I am hoping someone could help me fill in the

256位NIST素域椭圆曲线运算优化细节之一(单个素数p的加减法)

我怕爱的太早我们不能终老 提交于 2020-03-17 12:01:21
某厂面试归来,发现自己落伍了!>>> 在素域椭圆曲线运算过程中,256位加法和减法运算结果常常位于区间[0,p)之外的情形,需要做+p或是-p的运算 256位NIST素域椭圆曲线参数p的生成公式为: p = 2^256 − 2^224 + 2^192 + 2^96 − 1 按照符号将此式分解得: p = (2^256 + 2^192 + 2^96) - (2^224 + 1) 转化为16进制并按64位分节,变成下面的形式: +: 0000000000000001 0000000000000000 0000000100000000 0000000000000000 -: 0000000100000000 0000000000000000 0000000000000000 0000000000000001 =: ffffffff00000001 0000000000000000 00000000ffffffff ffffffffffffffff 仔细观察可以发现,所涉及64位加法和减法中,只出现一个64位立即数: 0000000100000000 假设某次256位减法最终发生借位,其低256位数值保存于寄存器r8:r11中,现在需要+p运算以修正之,若是用构成p的4个立即数直接运算的话,其代码如下: # -------------- # r8:r11 += p256 # -------