Skip to content

Computation may be wrong in python 3 #193

@cslashm

Description

@cslashm

here:
https://github.com/warner/python-ecdsa/blob/fa18c32f4b6cf80c763f8968ed7c48706922e226/src/ecdsa/rfc6979.py#L56

The line should be change in rolen = int((qlen + 7) / 8)

Indeed in python3 / always return a float, then line 96 the comparison
len(t) < rolen may lead into some aberration such as 32<32 that return True.

This is because of float encoding.

Metadata

Metadata

Assignees

Labels

bugunintended behaviour in ecdsa code

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions