# US 2023/0069234 A1 · Processor with an elliptic curve cryptographic algorithm and a data processing method thereof

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2023/0069234 A1
- Document ID: US20230069234A1
- Status: Published application
- Kind: A1
- Application number: 17/837,627
- Filed: 2022-06-10
- Published: 2023-03-02
- Earliest claimed: 2021-09-01
- Assignees: Shanghai Zhaoxin Semiconductor Co., Ltd.
- Applicants: Shanghai Zhaoxin Semiconductor Co., Ltd.
- Inventors: Yanting LI; Zhenhua HUANG; Yingbing GUAN; Yun SHEN; Lei YI; Shuang YANG
- Web page: https://patentgrep.com/patent/US20230069234A1

## CPC

- H04L 9/3066: {involving algebraic varieties, e.g. elliptic or hyper-elliptic curves}
- H04L 9/0825: {using asymmetric-key encryption or public key infrastructure [PKI], e.g. key signature or public key certificates}
- H04L 9/3236: {using cryptographic hash functions}
- H04L 9/3252: {using DSA or related signature schemes, e.g. elliptic based signatures, ElGamal or Schnorr schemes}
- H04L 2209/12: Details relating to cryptographic hardware or logic circuitry
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A processor with an elliptic curve cryptographic algorithm and a data processing method thereof are shown. The processor has a first register storing a Hash value pointer, a second register storing a public key pointer, a third register storing a signature pointer, and a fourth register for storage of a verified result. In response to a first elliptic curve cryptographic instruction of an instruction set architecture, the processor reads the Hash value of the data by referring to the first register, obtains the public key by referring to the second register, obtains the digital signature to be verified by referring to the third register, performs a signature verification procedure using the elliptic curve cryptographic algorithm on the Hash value based on the public key and the digital signature to be verified to generate the verified result, and programs the verified result into the fourth register.

## Claims

### Claim 1

A processor with an elliptic curve cryptographic algorithm, comprising:
a first register, storing a Hash value pointer pointing to a first storage space within a system memory, wherein a Hash value of data is stored in the first storage space;
a second register, storing a public key pointer pointing to a public key of a signer;
a third register, storing a signature pointer pointing to a digital signature to be verified;
a fourth register, for storage of a verified result;
wherein, in response to a first elliptic curve cryptographic instruction of an instruction set architecture, the processor reads the Hash value of the data from the first storage space by referring to the first register, obtains the public key by referring to the public key pointer read from the second register, obtains the digital signature to be verified by referring to the signature pointer read from the third register, performs a signature verification procedure using the elliptic curve cryptographic algorithm on the Hash value based on the public key and the digital signature to be verified to generate the verified result, and programs the verified result into the fourth register.

### Claim 2 (depends on 1)

The processor with the elliptic curve cryptographic algorithm as claimed in claim 1, wherein:
parameters used in the first elliptic curve cryptographic instruction include the Hash value pointer, the public key pointer, and the signature pointer.

### Claim 3 (depends on 1)

The processor with the elliptic curve cryptographic algorithm as claimed in claim 1, further comprising:
a fifth register, storing an intermediate variable pointer, pointing to a second storage space within the system memory;
wherein an intermediate variable generated by the processor while performing the signature verification procedure on the Hash value is temporarily stored in the second storage space as indicated by the intermediate variable pointer obtained from the fifth register.

### Claim 4 (depends on 3)

The processor with the elliptic curve cryptographic algorithm as claimed in claim 3, wherein:
prior to performing the signature verification procedure on the Hash value, the processor stores a starting address of the second storage space in the fifth register, and resets all bytes in the second storage space to zero.

### Claim 5 (depends on 4)

The processor with the elliptic curve cryptographic algorithm as claimed in claim 4, wherein:
the second storage space is allocated by an operating system according to a request from software.

### Claim 6 (depends on 1)

The processor with the elliptic curve cryptographic algorithm as claimed in claim 1, further comprising:
a sixth register, storing a control word, indicating performing the signature verification procedure in response to the first elliptic curve cryptographic instruction.

### Claim 7 (depends on 1)

The processor with the elliptic curve cryptographic algorithm as claimed in claim 1, further comprising:
a cryptographic unit;
a set of architectural registers including the first register, the second register, the third register, and the fourth register;
a microcode storage device, storing microcode; and
a decoder, generating a plurality of microinstructions based on the microcode in response to the first elliptic curve cryptographic instruction; wherein:
according to the microinstructions:
the set of architectural registers is defined, read and updated; and
when a register in the set of architectural registers provides a control word indicating a signature verification code, the cryptographic unit using the set of architectural registers performs the signature verification procedure on the Hash value based on the public key and the digital signature to be verified.

### Claim 8 (depends on 7)

The processor with the elliptic curve cryptographic algorithm as claimed in claim 7, wherein:
the digital signature to be verified is (r′, s′), r′ is a first part of the digital signature, and s′ is a second part of the digital signature to be verified;
according to the microinstructions, the processor checks whether
r
,
∈
1
,
n-1
and
s
,
∈
1
,
n-1
,
and if at least one is not true, the processor determines that the signature verification procedure has failed;
if r’∈ [1, n-1] and s’∈ [1, n-1], the processor performs a calculation,
t
=
r
,
+
s
,
mod
n
where n is an order of an elliptic curve base point, and t is a criterion;
according to the microinstructions, the processor determines whether the criterion, t, is zero; and
if the criterion, t, is zero, the processor determines that the signature verification procedure has failed.

### Claim 9 (depends on 8)

The processor with the elliptic curve cryptographic algorithm as claimed in claim 8, wherein:
the cryptographic unit includes an elliptic curve cryptographic acceleration engine;
the elliptic curve cryptographic acceleration engine includes hardware for point multiplication that receives an elliptic curve input point and a big number input to generate an elliptic curve output point;
the microinstructions decoded from the first elliptic curve cryptographic instruction includes a first point multiplication microinstruction and a second point multiplication microinstruction, which are executed when the criterion, t, is not zero;
in response to the first point multiplication microinstruction, the hardware for point multiplication performs a calculation, [ s ’ ] G, where s′ is the big number input, and G is the elliptic curve base point used as the elliptic curve input point;
in response to the second point multiplication microinstruction, the hardware for point multiplication performs a calculation, [ t ] P A, where t is the big number input, and PA is the public key used as the elliptic curve input point;
according to the microinstructions, the processor performs a calculation,
x1
,
,
y1
,
=
s
,
G
+
t
P
A,
to evaluate an elliptic curve point (x 1 ‘ , y i ’ ) ;
according to the microinstructions, the processor performs calculation, R = ( e ‘ + x 1 ’ ) m o d n, where e′ is the Hash value of the data;
according to the microinstructions, the processor determines whether R is r′;
if R is not r′, the processor determines that the signature verification procedure has failed; and
if R is r′, the processor determines that the signature verification has succeeded.

### Claim 10 (depends on 9)

The processor with the elliptic curve cryptographic algorithm as claimed in claim 9, wherein the hardware for point multiplication further comprises:
hardware for a first coordinate system conversion, converting the elliptic curve input point that is an affine coordinate point into a first intermediate point that is an aggravated projective coordinate point;
hardware for multiple point calculation, using the big number input to perform a multiple point calculation on the first intermediate point to generate a second intermediate point; and
hardware for a second coordinate system conversion, converting the second intermediate point that is an aggravated projective coordinate point into the elliptic curve output point that is an affine coordinate point.

### Claim 11 (depends on 8)

The processor with the elliptic curve cryptographic algorithm as claimed in claim 8, wherein:
the cryptographic unit includes an elliptic curve cryptographic acceleration engine;
the elliptic curve cryptographic acceleration engine includes hardware for point multiplication that receives an elliptic curve input point and a big number input to generate an elliptic curve output point;
the microinstructions decoded from the first elliptic curve cryptographic instruction includes a single point multiplication microinstruction, which is executed when the criterion, t, is not zero;
in response to the point multiplication microinstruction, the hardware for point multiplication performs a calculation, [ s ’ ] G + [ t ] P A, to evaluate an elliptic curve point ( x i ’ , y i ’ ) , where s′ is the big number input, G is the elliptic curve base point used as the elliptic curve input point, t is the big number input, and PA is the public key used as the elliptic curve input point;
according to the microinstructions, the processor performs calculation, R = ( e ‘ + x i ’ ) m o d n, where e′ is the Hash value of the data;
according to the microinstructions, the processor determines whether R is r′;
if R is not r′, the processor determines that the signature verification procedure has failed; and
if R is r′, the processor determines that the signature verification has succeeded.

### Claim 12 (depends on 1)

The processor with the elliptic curve cryptographic algorithm as claimed in claim 1:
prior to the first elliptic curve cryptographic instruction, the processor executes a second elliptic curve cryptographic instruction;
for execution of the second elliptic curve cryptographic instruction, the first register stores a user identification code pointer, the second register stores a public key pointer, the third register stores a preprocessed Hash value pointer, the fourth register stores a user identification code length, the user identification code pointer points to a third storage space within the system memory that stores user identification code, the public key pointer points to the public key, and the preprocessed Hash value pointer points to a fourth storage space within the system memory to indicate where to store a preprocessed Hash value; and
in response to the second elliptic curve cryptographic instruction, the processor reads the user identification code from the third storage space by referring to the first register, reads the public key by referring to the second register, reads the user identification code length from the fourth register, performs a first preprocessing procedure using the elliptic curve cryptographic algorithm on the user identification code and the user identification code length based on the public key to generate the preprocessed Hash value, and programs the preprocessed Hash value into the fourth storage space to be converted into the Hash value of the data, for execution of the first elliptic curve cryptographic instruction.

### Claim 13 (depends on 12)

The processor with the elliptic curve cryptographic algorithm as claimed in claim 12, wherein:
parameters used in the second elliptic curve cryptographic instruction include the user identification code pointer, the public key pointer, the user identification code length, and the preprocessed Hash value pointer.

### Claim 14 (depends on 12)

The processor with the elliptic curve cryptographic algorithm as claimed in claim 12, further comprising:
a fifth register, storing an intermediate variable pointer pointing to a second storage space within the system memory;
wherein an intermediate variable generated by the processor while performing the first preprocessing procedure is stored in the second storage space as indicated by the intermediate variable pointer obtained from the fifth register.

### Claim 15 (depends on 12)

The processor with the elliptic curve cryptographic algorithm as claimed in claim 12, wherein:
when finishing the first preprocessing procedure, the processor produces an address increment on the preprocessed Hash value pointer stored in the third register, and the address increment is equal to a length of the preprocessed Hash value.

### Claim 16 (depends on 12)

The processor with the elliptic curve cryptographic algorithm as claimed in claim 12, further comprising:
a sixth register, storing a control word, indicating performing the first preprocessing procedure in response to the second elliptic curve cryptographic instruction.

### Claim 17 (depends on 12)

The processor with the elliptic curve cryptographic algorithm as claimed in claim 12, further comprising:
a cryptographic unit;
a set of architectural registers including the first register, the second register, the third register, and the fourth register;
a microcode storage device, storing microcode; and
a decoder, generating a plurality of microinstructions based on the microcode in response to the second elliptic curve cryptographic instruction; wherein:
according to the microinstructions decoded from the second elliptic curve cryptographic instruction:
the set of architectural registers is defined, read and updated; and
when a register in the set of architectural registers provides a control word indicating a first preprocessing code, the cryptographic unit using the set of architectural registers performs the first preprocessing procedure.

### Claim 18 (depends on 17)

The processor with the elliptic curve cryptographic algorithm as claimed in claim 17, wherein:
according to the microinstructions, a calculation is performed:
S=ENTL
A
ID
A
a
b
x
G
y
G
x
A
y
A
where ENTLA is the user identification code length, IDA is the user identification code, a and b are elliptic curve parameters, (XG, YG) is an elliptic curve base point, (XA, YA) is a coordinate representation of the public key, and S is a bit string.

### Claim 19 (depends on 18)

The processor with the elliptic curve cryptographic algorithm as claimed in claim 18, wherein:
the cryptographic unit includes an elliptic curve cryptographic acceleration engine, and the elliptic curve cryptographic acceleration engine includes hardware for preprocessing;
the cryptographic unit further includes a Hash cryptographic acceleration engine;
the microinstructions decoded from the second elliptic curve cryptographic instruction includes a preprocessing microinstruction;
in response to the preprocessing microinstruction, the hardware for preprocessing divides the bit string, S, with finished message padding into message blocks to be sent into the Hash cryptographic acceleration engine for a Hash value transform; and
the hardware for preprocessing includes an internal storage space storing an initial Hash value that is gradually updated by the Hash cryptographic acceleration engine till a Hash value, Hash(S), is updated into the internal storage space as the preprocessed Hash value.

### Claim 20 (depends on 12)

The processor with the elliptic curve cryptographic algorithm as claimed in claim 12, wherein:
prior to the first elliptic curve cryptographic instruction and after the second elliptic curve cryptographic instruction, the processor executes a third elliptic curve cryptographic instruction;
for execution of the third elliptic curve cryptographic instruction, the first register stores a preprocessed Hash value pointer pointing to the fourth storage space, the second register stores a data pointer for the data, the third register stores the Hash value pointer, the fourth register stores a length of the data, the data pointer for the data points to a fifth storage space within the system memory that stores the data, and the Hash value pointer points to the first storage space; and
in response to the third elliptic curve cryptographic instruction, the processor reads the preprocessed Hash value from the fourth storage space by referring to the first register, reads the data from the fifth storage space by referring to the second register, performs a second preprocessing procedure using the elliptic curve cryptographic algorithm on the preprocessed Hash value and the data to generate preprocessed data, processes the preprocessed data to generate the Hash value of the data, and programs the Hash value of the data into the first storage space for execution of the first elliptic curve cryptographic instruction.

### Claim 21 (depends on 20)

The processor with the elliptic curve cryptographic algorithm as claimed in claim 20, wherein:
Parameters used in the third elliptic curve cryptographic instruction include the preprocessed Hash value pointer, the data pointer for the data, and the Hash value pointer.

### Claim 22 (depends on 20)

The processor with the elliptic curve cryptographic algorithm as claimed in claim 20, further comprising:
a fifth register, storing an intermediate variable pointer pointing to a second storage space within the system memory;
wherein an intermediate variable generated by the processor while performing the second preprocessing procedure is stored in the second storage space as indicated by the intermediate variable pointer obtained from the fifth register.

### Claim 23 (depends on 20)

The processor with the elliptic curve cryptographic algorithm as claimed in claim 20, wherein
when finishing the second preprocessing procedure, the processor produces an address increment on the Hash value pointer stored in the third register, and the address increment is equal to a length of the Hash value of the data.

### Claim 24 (depends on 20)

The processor with the elliptic curve cryptographic algorithm as claimed in claim 20, further comprising:
a sixth register, storing a control word, indicating to perform the second preprocessing procedure in response to the third elliptic curve cryptographic instruction.

### Claim 25 (depends on 20)

The processor with the elliptic curve cryptographic algorithm as claimed in claim 20, further comprising:
a cryptographic unit;
a set of architectural registers including the first register, the second register, the third register, and the fourth register;
a microcode storage device, storing microcode; and
a decoder, generating a plurality of microinstructions based on the microcode in response to the third elliptic curve cryptographic instruction; wherein:
according to the microinstructions decoded from the third elliptic curve cryptographic instruction:
the set of architectural registers is defined, read and updated; and
when a register in the set of architectural registers provides a control word indicating a second preprocessing code, the cryptographic unit using the set of architectural registers performs the second preprocessing procedure.

### Claim 26 (depends on 25)

The processor with the elliptic curve cryptographic algorithm as claimed in claim 25, wherein:
according to the microinstructions, a calculation is performed:
M
¯
′
=
Ζ
A
M
′
where ZA is the preprocessed Hash value, M′ is the data, and is is the preprocessed data.

### Claim 27 (depends on 26)

The processor with the elliptic curve cryptographic algorithm as claimed in claim 26, wherein:
the cryptographic unit includes an elliptic curve cryptographic acceleration engine, and the elliptic curve cryptographic acceleration engine includes hardware for preprocessing;
the cryptographic unit further includes a Hash cryptographic acceleration engine;
the microinstructions decoded from the third elliptic curve cryptographic instruction includes a preprocessing microinstruction;
in response to the preprocessing microinstruction, the hardware for preprocessing divides the preprocessed data, with finished message padding into message blocks to be sent into the Hash cryptographic acceleration engine for a Hash value transform; and
the hardware for preprocessing includes an internal storage space storing an initial Hash value that is gradually updated by the Hash cryptographic acceleration engine till a Hash value, Hash( updated into the internal storage space as the Hash value of the data.

### Claim 28

A method for performing an elliptic curve cryptographic algorithm using a processor, comprising:
in response to a first elliptic curve cryptographic instruction of an instruction set architecture, reading a Hash value of data from a first storage space of a system memory, obtaining a public key, obtaining a digital signature to be verified, performing a signature verification procedure using the elliptic curve cryptographic algorithm on the Hash value based on the public key and the digital signature to be verified to generate a verified result, and programming the verified result into a register.

### Claim 29 (depends on 28)

The method as claimed in claim 28, wherein:
parameters used in the first elliptic curve cryptographic instruction include a Hash value pointer pointing to the Hash value, a public key pointer pointing to the public key, and a signature pointer pointing to the digital signature to be verified.

### Claim 30 (depends on 28)

The method as claimed in claim 28, further comprising:
storing an intermediate variable generated while performing the signature verification procedure on the Hash value in a second storage space; and
prior to performing the signature verification procedure on the Hash value, resetting all bytes in the second storage space to zero.

### Claim 31 (depends on 30)

The method as claimed in claim 30, wherein:
the second storage space is allocated by an operating system according to a request from software.

### Claim 32 (depends on 28)

The method as claimed in claim 28, further comprising:
generating a plurality of microinstructions based on microcode in response to the first elliptic curve cryptographic instruction; and
according to the microinstructions, if a control word indicates a signature verification code, performing the signature verification procedure on the Hash value based on the public key and the digital signature to be verified.

### Claim 33 (depends on 28)

The method as claimed in claim 28, further comprising:
prior to the first elliptic curve cryptographic instruction, executing a second elliptic curve cryptographic instruction;
in response to the second elliptic curve cryptographic instruction, reading user identification code from a third storage space of the system memory, reading the public key, reading a user identification code length, performing a first preprocessing procedure using the elliptic curve cryptographic algorithm on the user identification code and the user identification code length based on the public key to generate a preprocessed Hash value, and programing the preprocessed Hash value into a fourth storage space within the system memory to be converted into the Hash value for execution of the first elliptic curve cryptographic instruction.

### Claim 34 (depends on 33)

The method as claimed in claim 33, further comprising:
generating a plurality of microinstructions based on microcode in response to the second elliptic curve cryptographic instruction; and
according to the microinstructions, if a control word indicates a first preprocessing code, performing the first preprocessing procedure.

### Claim 35 (depends on 33)

The method as claimed in claim 33, further comprising:
prior to the first elliptic curve cryptographic instruction and after the second elliptic curve cryptographic instruction, executing a third elliptic curve cryptographic instruction; and
in response to the third elliptic curve cryptographic instruction, reading the preprocessed Hash value from the fourth storage space, reading the data, performing a second preprocessing procedure using the elliptic curve cryptographic algorithm on the preprocessed Hash value and the data to generate preprocessed data, processing the preprocessed data to generate the Hash value, and programing the Hash value into the first storage space for execution of the first elliptic curve cryptographic instruction.

### Claim 36 (depends on 35)

The method as claimed in claim 35, further comprising:
generating a plurality of microinstructions based on microcode in response to the third elliptic curve cryptographic instruction; and
according to the microinstructions, if a control word indicates a second preprocessing code, performing the second preprocessing procedure.
