Blockchain Transaction r-Puzzle Verification
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional hash puzzles in blockchain transactions are vulnerable to miner attacks, where an unscrupulous miner can observe the unlocking script and create a new transaction to pay themselves instead of the intended recipient, and existing solutions like pay-to-public key hash (P2PKH) require pre-specifying recipients, limiting flexibility.
Innovation Solution
Introducing an 'r-puzzle' based on the r-part of an ECDSA signature, which allows any party to prove knowledge of a secret value without revealing it, using the r-part as a challenge that must be solved in the unlocking script of a second transaction, enabling flexible redemption without pre-specifying identities.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If conventional hash puzzles are used in blockchain transactions, then transaction verification is simple, but the system is vulnerable to miner attacks where miners can observe unlocking scripts and redirect payments to themselves
Solution Approach 1:
The ECDSA signature is segmented into two parts: the r-part is placed in the locking script of the first transaction, while the s-part must be provided in the unlocking script of the second transaction. This segmentation prevents miners from creating valid transactions without knowing the ephemeral key, as they cannot generate the correct s-part without it.
Solution Approach 2:
The locking script is prepared in advance with the r-part of the ECDSA signature, creating a puzzle that requires the s-part to solve. This preliminary setup establishes the security mechanism before the transaction needs to be redeemed, ensuring that only someone with the ephemeral key can complete the redemption.
2Reliability
If pay-to-public key hash (P2PKH) is used to prevent miner attacks, then transaction security improves, but flexibility is reduced because recipients must be pre-specified
Solution Approach 1:
The redemption mechanism is made dynamic by allowing any party to redeem the transaction by providing the correct s-part of the ECDSA signature. Unlike P2PKH which locks funds to a specific public key, this approach allows flexible redemption by anyone who possesses the ephemeral key, enabling dynamic and adaptable transaction structures.
3Ease of operation
If the ephemeral key is revealed to verify the puzzle solution, then verification is straightforward, but security is compromised because the secret value is exposed
Solution Approach 1:
The verification process extracts only the necessary component (the s-part of the ECDSA signature) without requiring the full ephemeral key to be revealed. The r-part already in the locking script combines with the submitted s-part to form a complete signature that can be verified using standard ECDSA verification, thus maintaining security while enabling verification.
4Reliability
If the r-puzzle mechanism is implemented, then transaction security and flexibility improve, but the device complexity increases due to the additional cryptographic operations
Solution Approach 1:
The custom r-puzzle verification mechanism is replaced by substituting it with the well-established ECDSA cryptographic system. By framing the puzzle solution in terms of ECDSA signature components, the invention leverages existing, widely-understood cryptographic verification routines rather than requiring new verification logic, thus reducing overall system complexity.
Data Source
Figure 1
Figure 2
Figure 3~4
AI summary
A method comprising, at a node of a blockchain network: obtaining a first transaction including runnable code specifying a reference instance of an r-part of ant ECDSA signature; receiving a second transaction including information comprising at least an s-part of the ECDSA signature, and obtaining a public key wherein the ECDSA signature signs a message based on a corresponding private key; and running the code from the first transaction, the code being configured to return a result of true, irrespective of whose private key was used as the first private key, on condition that: the ECDSA verification function, as applied to the ECDSA signature, verifies that the s-part received in the second transaction corresponds to the reference instance of the r-part specified by the first transaction, given the message received in the second transaction and the obtained first public key.