public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
* [bitcoin-dev] Generate and verify ECDSA signature without "r"
@ 2022-11-05  8:46 MC 5760
  0 siblings, 0 replies; only message in thread
From: MC 5760 @ 2022-11-05  8:46 UTC (permalink / raw)
  To: bitcoin-dev

[-- Attachment #1: Type: text/plain, Size: 605 bytes --]

1. Address: private key -> ECC -> public key compression -> Bech32m encode

2. scriptPubkey: Address -> Bech32m decode -> public key compression

3. Segwit: (dsha256(txid_input & index) * x public key + dsha256(unsigned
raw transaction) mod (private key)) mod (N) => Will give a number of 32
bytes

4. Verify:

x1, y1 = ECC(G, dsha256(txid_input & index))

p1 = ECC(G, dsha256(unsigned raw transaction) mod (Segwit))

p2 = ECC((x1,y1) * x public key mod (Segwit)

x2, y2 = ECAddpoint(p1, p2)

If x2 = x public key => OK

I wrote the python code here:
https://github.com/tanvovan/bitcoin/blob/main/p2pc.py

[-- Attachment #2: Type: text/html, Size: 4562 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-05  8:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-05  8:46 [bitcoin-dev] Generate and verify ECDSA signature without "r" MC 5760

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox