Numerical value conversion method and numerical value conversion system with low hardware complexity and high operation efficiency
AssigneePUFsecurity Corporation
InventorWen-Ching Lin
Life of this patent
Estimating the term…
Abstract
A numerical conversion method for a public key cryptography system includes accumulating a first value by using a first modular addition loop according to the first value for generating a second value after a first predetermined loop count is reached, accumulating the second value by using a second modular addition loop according to the second value for generating a third value after a second predetermined loop count is reached, inputting the third value to a Montgomery modular exponentiation function for generating a Montgomery conversion parameter, and converting a first conversion value in an integer domain into a second conversion value in a Montgomery domain.
Claims12
A numerical value conversion method for a public key cryptography system, comprising:
- receiving a first conversion value in an integer domain;
- converting the first conversion value from the integer domain to a second conversion value in a Montgomery domain by steps of:
- updating a first value by using a first modular addition loop according to the first value for generating a second value after a first predetermined loop count of the first modular addition loop is reached;
- updating the second value by using a second modular addition loop according to the second value for generating a third value after a second predetermined loop count of the second modular addition loop is reached;
- inputting the third value to a Montgomery modular exponentiation function for generating a Montgomery conversion parameter, wherein the Montgomery conversion parameter is a modulo operation result of a square of the second value and a constant;
- and
- converting the first conversion value into a second conversion value according to the Montgomery conversion parameter;
- performing a public key cryptographic algorithm using the second conversion value in the Montgomery domain to generate a cryptographic result;
- and
- converting the cryptographic result from the Montgomery domain to the integer domain for use in cryptographic operations;
- wherein the first value is denoted as T, the first modular addition loop is recited as a formula:
- T=(T+T) mod N, the first predetermined loop count is equal to K−m+1, the first value is equal to 2m−1, m is an output value of a ceiling function of log2N, K is a first predetermined positive integer, N is the constant, and when the first modular addition loop reaches the first predetermined loop count, the second value is equal to R=2K mod N, the second modular addition loop is recited as a formula:
- R=(R+R) mod N, the second predetermined loop count is 2, when the second modular addition loop reaches the second predetermined loop count, the third value is equal to (2λ×R) mod N, and A is a second predetermined positive integer, and the constant is a positive odd integer.
A numerical value conversion system for a public key cryptography system, comprising:
- a processor, and
- an operation circuit coupled to the processor, the operation circuit comprising:
- a first multiplexer;
- a first register coupled to the first multiplexer;
- a modular adder coupled to the first multiplexer and the first register;
- and
- a Montgomery multiplier coupled to the first multiplexer and the first register;
- wherein the processor receives a first conversion value in an integer domain, and converts the first conversion value from the integer domain to a second conversion value in a Montgomery domain by performing steps of:
- controlling the first multiplexer, the first register, and the modular adder for generating a first modular addition loop, wherein after the first multiplexer receives a first value, the processor updates the first value by using the first modular addition loop according to the first value for generating a second value after a first predetermined loop count of the first modular addition loop is reached, and the second value is buffered in the first register;
- controlling the first multiplexer, the first register, and the modular adder for generating a second modular addition loop, wherein the processor updates the second value by using the second modular addition loop according to the second value for generating a third value buffered in the first register after a second predetermined loop count of the second modular addition loop is reached;
- controlling the Montgomery multiplier for executing a Montgomery modular exponentiation function according to the third value, wherein the Montgomery modular exponentiation function is used for generating a Montgomery conversion parameter, the Montgomery conversion parameter is a modulo operation result of a square of the second value and a constant;
- and
- converting the first conversion value into a second conversion value according to the Montgomery conversion parameter;
- the processor performs a public key cryptographic algorithm using the second conversion value in the Montgomery domain to generate a cryptographic result, and the processor converts the cryptographic result from the Montgomery domain to the integer domain for use in cryptographic operations;
- and
- wherein the first value is denoted as T, the first modular addition loop is recited as a formula:
- T=(T+T) mod N, the first predetermined loop count is equal to K−m+1, the first value is equal to 2m−1, m is an output of a ceiling function of log2N, K is a first predetermined positive integer, N is the constant, and when the first modular addition loop reaches the first predetermined loop count, the second value is equal to R=2K mod N, the second modular addition loop is recited as a formula:
- R=(R+R) mod N, the second predetermined loop count is 2, when the second modular addition loop reaches the second predetermined loop count, the third value is equal to (2λ×R) mod N, and A is a second predetermined positive integer, and the constant is a positive odd integer.
Dependencies are inferred from the claim text.