Closed Ljiacheng closed 3 years ago
Hi @Turntogamer ! thanks for opening this issue, I will fix it now and update. It is a very easy fix, what happens is that since the key is random it sometimes happens that the leading bits are zero and therefore key length do not match the check
Oh, thanks for your fast reply, now I know the reason :)
Hi, I have tried many times to run gg20_keygen_client, and I find a panic here:
_["round1"] party 2 => party 1 ["round1"] party 3 => party 1 ["round2"] party 2 => party 1 ["round2"] party 3 => party 1 thread 'main' panicked at 'assertion failed: key.len() == 16 || key.len() == 24 || key.len() == 32', /home/abmatrix/.cargo/registry/src/github.com-1ecc6299db9ec823/rust-crypto-0.2.36/src/aes_gcm.rs:23:9 note: run with
RUST_BACKTRACE=1
environment variable to display a backtrace_It happens when use function aes_encrypt() or aes_decrypt(). And I find the actual key.len() is allways 31. So I think the problem is caused by enc_keys. I don't know how it happens. May gg20_sign_client also has this problem? This panic does not happen every time, but it will happen as more times you try.