asonnino / coconut

Coconut: Threshold Issuance Selective Disclosure Credentials with Applications to Distributed Ledgers.
https://arxiv.org/abs/1802.07344
Apache License 2.0
60 stars 14 forks source link

Ensuring responses in make_pi_v are positive #9

Closed jstuczyn closed 5 years ago

jstuczyn commented 5 years ago

Just a tiny change to ensure that rt is positive. While the previous version worked perfectly fine, it had an awkard (for me) hex representation due to the minus sign being present.

It also allows for successful call to rt.binary() as otherwise an exception is thrown as the method can't handle representing negative numbers.