With the bn_expo value set above, exp_bits = 65 (bn_expo[i].BitSize()=65) and the result is completely off.
However, any other value where BitSize != 65 works perfectly fine.
One temporary workaround for this issue was to intentionally align the exp_bits to 8, by adding:
@bwang30 and I found a weird bug in the multi buffer modular exponentiation in
mbx_exp4096_mb8
when the power input is exactly 65 bits.The following is a sample input that fails to run:
With the
bn_expo
value set above,exp_bits = 65
(bn_expo[i].BitSize()=65
) and the result is completely off. However, any other value whereBitSize != 65
works perfectly fine.One temporary workaround for this issue was to intentionally align the
exp_bits
to 8, by adding:where
maxExpBitLen=72
whenexpBitLen=65
.I can provide a test code to replicate the issue if needed.