Modular Inversion Script for On-Chain Elliptic Curve Arithmetic
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current blockchain systems lack the capability to perform elliptic curve arithmetic, specifically computing the modular inverse of an integer, directly within scripts.
Innovation Solution
A computer-implemented method is introduced that enables elliptic curve arithmetic by generating a script for a blockchain transaction, which includes a modular inversion script. This script computes the modular inverse of a target integer using a prime modulus, allowing for operations such as point addition and scalar multiplication on elliptic curves.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If elliptic curve arithmetic is performed outside the script using external computation, then the script remains simple and easy to execute, but the blockchain cannot perform complex cryptographic operations directly on-chain
Solution Approach 1:
The patent segments the elliptic curve arithmetic into discrete operations (point addition, scalar multiplication, modular inversion) that can be independently implemented in the script. Each operation is broken down into basic script opcodes that manipulate stack values, allowing complex cryptography to be built from simple atomic operations.
Solution Approach 2:
The patent introduces a modular inversion script as an intermediary component that handles the computationally intensive modular inverse calculation. This intermediary module can be independently generated and executed, allowing the main transaction script to remain relatively simple while still achieving full elliptic curve arithmetic capability through the modular inversion subroutine.
2Reliability
If expensive computational operations are performed in the script engine, then immutability and security are enhanced, but computational resources and execution time are consumed
Solution Approach 1:
The patent performs preliminary computation by generating the modular inversion script in advance, before the actual transaction execution. The script structure is pre-compiled with the necessary opcodes and parameters, so that when executed, the heavy computational work is already organized and optimized, reducing runtime overhead while maintaining security.
Solution Approach 2:
The script engine performs self-service by executing the modular inversion script autonomously during transaction validation. The script includes self-contained logic that generates and executes the modular inverse calculation without requiring external intervention, allowing the blockchain to securely perform complex operations independently while minimizing reliance on external computational resources.
3Adaptability or versatility
If modular inversion script is generated dynamically, then flexibility and adaptability are improved, but script generation time and complexity increase
Solution Approach 1:
The patent uses parameter changes by dynamically adjusting the modular inversion script based on transaction-specific parameters such as the modulus value and the number of iterations required. The script generation process adapts to different cryptographic parameters, allowing flexible configuration of the modular inversion logic while optimizing execution time by only generating the necessary script depth required for the specific computation.
Data Source
AI summary
A computer-implemented method for enabling elliptic curve arithmetic to be performed using blockchain transactions. A first script of a first blockchain transaction is generated, comprising a modular inversion script configured to obtain a target integer and a modulus value, and output a modular inverse of the target integer. The modular inverse is generated by generating a sequence of squaring values; for each set bit of a reduced modulus value expressed in binary, including the corresponding squaring value of the sequence of squaring values in a result; multiplying together the squaring values of the result to generate a resultant value; and computing a modulus of the resultant value with respect to the modulus value, wherein the modulus of the resultant value is output as the modular inverse, and outputting the first script for inclusion in the first blockchain transaction.


