Modular Calculator Sign-Based Subtraction for Cryptography
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing modular arithmetic operations, such as addition and subtraction, require division operations to determine if the result deviates from the modulus value, which is inefficient, especially in cryptographic operations involving large integers.
Innovation Solution
A modular calculator that determines the arithmetic operation based on the sign information of the two integers involved, allowing for addition or subtraction without comparing the result with the modulus value, and adjusts the result by adding or subtracting the modulus value as necessary, eliminating the need for division.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If a general modular reduction method using division is used to calculate the remainder after adding or subtracting two integers, then the result is accurate, but the computational complexity increases and processing time is extended
Solution Approach 1:
The patent changes the parameter of the calculation method from division-based modular reduction to subtraction-based modular reduction. By using subtraction instead of division, the computational complexity is reduced while maintaining the accuracy of the modular arithmetic result. The controller determines whether to add or subtract the modulus value based on the signs of the input integers, eliminating the need for division operations.
2Measurement precision
If a general modular reduction method using division is used, then the remainder is calculated correctly, but the processing time is extended
Solution Approach 1:
The patent changes the calculation parameter from division to subtraction. This parameter change significantly reduces processing time because subtraction operations are computationally simpler and faster than division operations. The controller uses the sign information of the input integers to directly determine whether to add or subtract the modulus value, eliminating time-consuming division and comparison operations.
3Measurement precision
If division operation is performed to determine if the result deviates from the modulus value, then the modular reduction is accurate, but the number of calculation steps increases
Solution Approach 1:
The patent changes the operational parameter from division to subtraction. This eliminates multiple calculation steps (trial division, quotient calculation, remainder calculation) and replaces them with a single subtraction operation. The accuracy is maintained because the controller determines the appropriate operation based on the signs of the input integers, ensuring the result remains within the correct modular range.
Solution Approach 2:
The patent extracts and removes the division operation from the modular reduction process. By taking out the division step and replacing it with subtraction, the number of calculation steps is reduced while the essential function of calculating the remainder is preserved through the subtraction-based approach.
4Measurement precision
If comparison with modulus value is performed to determine the arithmetic operation, then the result is accurate, but the computational overhead increases
Solution Approach 1:
The patent changes the decision parameter from comparison-based to sign-based. Instead of comparing the intermediate result with the modulus value to determine whether addition or subtraction is needed, the controller directly uses the sign information of the input integers to determine the arithmetic operation. This reduces computational overhead while maintaining accuracy.
Data Source
AI summary
A modular calculator and a method of performing a modular calculation are provided. The modular calculator includes a first register to receive and to store a first integer, a second register to receive and to store a second integer, a calculator connected to an output terminal of the first register and an output terminal of the second register, and a controller to determine an arithmetic operation of the calculator by referring to a sign of the first integer and a sign of the second integer and to control the calculator to perform the determined arithmetic operation on one of an addition and a subtraction of the first integer and the second integer and a modulus value.


