Modular Inversion Script for On-Chain Elliptic Curve Arithmetic

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improvecapability to perform elliptic curve arithmeticVSAvoidscript complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

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.

Inventive Principle:
Principle #1Segmentation

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.

Inventive Principle:
Principle #24Intermediary (Mediator)

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

Engineering Contradiction:
Improvesecurity and integrity of transactionsVSAvoidcomputational burden
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

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.

Inventive Principle:
Principle #10Preliminary action

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.

Inventive Principle:
Principle #25Self-service

3Adaptability or versatility

If modular inversion script is generated dynamically, then flexibility and adaptability are improved, but script generation time and complexity increase

Engineering Contradiction:
Improveflexibility in script generationVSAvoidscript generation time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

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.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS20250103299A1Elliptic curve arithmetic in script
Publication Date: 2025.03.27 NCHAIN LICENSING AG
  • US20250103299A1 patent drawing
  • US20250103299A1 patent drawing
  • US20250103299A1 patent drawing

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.