Open Mir-ina opened 11 months ago
If c is zero, then c.bit_length() is zero too. So c.to_bytes((c.bit_length()+7)//8, 'big') will return empty string, which is not correct. We need '\x00'.
c
c.bit_length()
c.to_bytes((c.bit_length()+7)//8, 'big')
If
c
is zero, thenc.bit_length()
is zero too. Soc.to_bytes((c.bit_length()+7)//8, 'big')
will return empty string, which is not correct. We need '\x00'.