Skip to content

Commit

Permalink
R must be 32 bytes exactly
Browse files Browse the repository at this point in the history
  • Loading branch information
Atif Nazir committed Jul 1, 2020
1 parent 66aa31d commit 2e8dc8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/block_io.php
Original file line number Diff line number Diff line change
Expand Up @@ -1254,7 +1254,7 @@ public function getSignatureHashPoints($hash, $nonce = null)
if (strlen($R)%2) { $R = '0' . $R; }
else if (hexdec(substr($R, 0, 1)) >= 8) { $R = '00' . $R; }

}while($nonce_not_provided && (strlen(hex2bin($R)) > 32 || hexdec(substr($R, 0, 1)) >= 128));
}while($nonce_not_provided && (strlen(hex2bin($R)) != 32 || hexdec(substr($R, 0, 1)) >= 128));

//second part of the signature (S).
//S = nonce^-1 (hash + privKey * R) mod p
Expand Down

0 comments on commit 2e8dc8e

Please sign in to comment.