annando / salmon-protocol

Automatically exported from code.google.com/p/salmon-protocol
0 stars 0 forks source link

public key modulus bytes count #32

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
shouldn't
http://code.google.com/p/salmon-protocol/source/browse/trunk/lib/python/magicsig
_hjfreyer/magicsigalg.py#225
be
pad_string = chr(0xFF) * (msg_size_bits - len(encoded) - 3)
instead of
pad_string = chr(0xFF) * (msg_size_bits / 8 - len(encoded) - 3)
?

You did the /8 one line above:
msg_size_bits = modulus_size + 8-(modulus_size % 8)  # Round up to next byte

I had problems running this reference implementation agains Status.Net and this 
one fixed this issue.

Original issue reported on code.google.com by m...@rkusa.st on 8 Jun 2011 at 8:41