Post
Topic
Board Development & Technical Discussion
Merits 1 from 1 user
Re: How to convert High-S value to Low-S value?
by
achow101
on 06/08/2020, 22:46:26 UTC
⭐ Merited by ETFbitcoin (1)
How do I replace it? I don’t get it. Is there step by step tutorial? My S value doesn’t look like anything like what your just sent.
How are you making the signature? What software are you using?

Here is a signature with high S:
Code:
30440220534d4f17b88e62b097ba36720ecee6d3389d1192f2018546aa5d23bf2f234a27022100871b3da3d77564f2589fedfce761a42a912b186d78a4da291a2eaaacbf5eb31201
The S value is:
Code:
00871b3da3d77564f2589fedfce761a42a912b186d78a4da291a2eaaacbf5eb312

In python:
Code:
>>> hex(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - 0x00871b3da3d77564f2589fedfce761a42a912b186d78a4da291a2eaaacbf5eb312)
'0x78e4c25c288a9b0da7601203189e5bd42983c47936a3c612a5a3b3e010d78e2f'
The new signature with low S is
Code:
30440220534d4f17b88e62b097ba36720ecee6d3389d1192f2018546aa5d23bf2f234a27022078e4c25c288a9b0da7601203189e5bd42983c47936a3c612a5a3b3e010d78e2f01

If you are doing this by hand, don't forget to change the length before the S value.