Block chain public key storage optimization method based on post-quantum signature

By introducing UTXO_PUBKEY and Pubkey type output scripts into the blockchain transaction structure, the problem of public key storage redundancy of post-quantum signature algorithm is solved, efficient optimization of public key storage is achieved, and the storage efficiency of blockchain system is improved.

CN120358026AActive Publication Date: 2025-07-22FUDAN UNIVERSITY
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510837987.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-23
Publication Date
2025-07-22
Estimated Expiration
2045-06-23

AI Technical Summary

Technical Problem

The post-quantum signature algorithm has too much public key storage space in blockchain systems and does not have key derivative functions, resulting in redundant storage problems.

Method used

The UTXO_PUBKEY structure and Pubkey type output script are introduced into the blockchain transaction structure. The public key is located through transaction hash and index, and the public key value is stored only in the first time, and the transaction hash is stored on subsequent calls, which optimizes the public key storage.

Benefits of technology

It significantly reduces the redundant storage of public keys, improves the storage efficiency of blockchain systems, and is especially suitable for grid-based post-quantum signature algorithms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120358026A_ABST
    Figure CN120358026A_ABST
Patent Text Reader

Abstract

The invention discloses a block chain public key storage optimization method based on post-quantum signature. For a block chain system taking a digital signature as a core, along with the development of quantum computing, it is necessary to apply a post-quantum digital signature algorithm to a block chain. However, in the current signature, the public key is too long and does not have a key derivation function, so that the public key can be subjected to redundant storage. For the phenomenon, the block chain public key storage optimization method based on the post quantum signature is designed for the block chain based on the UTXO class. According to the method, a type field is added in an output script of a transaction, when a public key starts to be used, a public key registration process is carried out, and a class of UTXO of which the type is Pubkey is generated. A public key script field is added in a transaction, when a public key needs to be called, UTXO transaction hash and an index corresponding to the public key are stored in a public key script, and then a public key value stored in the public key script is called for signature authentication. And when the public key is not needed and enters an inactive state, finally consuming the UTXO of the Pubkey type.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of post - quantum cryptography and information security technology, and particularly to an optimization method for storing public keys of a blockchain based on post - quantum signatures. Background Art

[0002] With the continuous development of quantum computing technology, post - quantum cryptography schemes that can resist quantum attacks have emerged. For a blockchain system based on digital signature algorithms, it is very necessary to upgrade and replace it with a post - quantum digital signature algorithm. Post - quantum digital signature algorithms based on lattices have been proven to be able to resist quantum attacks, and research is constantly being carried out on adopting post - quantum digital signature algorithms based on lattices in blockchain systems. However, compared with elliptic curve digital signature algorithms, the storage space of public keys and signatures of such algorithms has increased significantly. Therefore, in practical use, it is very necessary to optimize the space.

[0003] In the optimization process, it can be found that for a blockchain system using elliptic curve digital signature algorithms, it has the characteristic that a pair of public - private keys can be used to derive multiple sub - public - private key pairs. While the digital signature algorithm based on lattices currently does not have the key derivation function, so the public - private key pairs will be called multiple times each time a transaction is made on the chain.

[0004] The present invention selects a blockchain system of this type based on the UTXO (Unspent Transaction Output) accounting model for design optimization. When trading in this type of blockchain, UTXOs represent the unspent outputs in the transaction. Each UTXO contains certain information. Each transaction consumes the old UTXOs of the transaction initiator and generates new UTXOs to be allocated to the transaction recipient.

[0005] In a transaction, the correctness and security of UTXOs are achieved through storing and verifying information in scripts of some specific formats. The more common ones are P2PK, P2PKH, and P2SH scripts, among which the P2PK (Pay to Public Key) script is the most classic. In this script, the signature of the transaction initiator is stored in the input script, and the public key of the transaction recipient is stored in the output script. The signature of the transaction initiator is verified against the public key of the UTXO it owns. Successful verification means that the original UTXO will be consumed, and the public key in the output script also represents the ownership of the newly generated UTXO.

[0006] According to the above process and characteristics, it can also be seen that in the output script, the signature is different each time due to the difference in information, but the public key stored in the output script is continuously reused for users who frequently use the same account. Therefore, a method can be designed to avoid repeated storage of the public key in the script. Summary of the Invention

[0007] In view of this, the present invention provides an optimization method for storing blockchain public keys based on post-quantum signatures. According to the characteristics of frequent application of blockchain public keys based on post-quantum signatures, this method designs a transaction structure for storing public keys in a block. When a public key appears for the first time, a transaction is generated to store the specific content of the public key. When the public key is applied again in the blockchain, only the transaction hash needs to be stored, which is used to call the public key stored in the transaction for information verification. This method significantly optimizes the space efficiency of blockchain public keys using post-quantum signatures. The specific solution is as follows:

[0008] In a first aspect, the present invention discloses a method for designing a data structure of a blockchain transaction, and the method specifically includes:

[0009] In the transaction structure, first, a UTXO_PUBKEY structure is newly added, which includes a transaction hash value (Tx_hash) and an index (index). The transaction hash value is used to point to the transaction recording the stored public key. Compared with the transaction hash pointed to in the input script, after being referenced in the UTXO_PUBKEY structure, the UTXO will not be consumed. While after being referenced by the original input script, the UTXO will be consumed and a new UTXO will be generated. The same point is that the unique position of the UTXO in the entire blockchain network can be determined through the transaction hash value and the index. Secondly, in the output script of the transaction, a Type type is added. This type is Transcation type for regular transactions and Pubkey type for transactions storing public keys. If the transaction is of Pubeky type, the data in the output script is the specific value of the public key.

[0010] In a second aspect, the present invention discloses a method for storing public keys, and the method specifically includes:

[0011] The first step is public key registration. When a pair of public and private keys is used for the first time, whether receiving a transfer or a block reward, it will be the recipient. Therefore, a UTXO of type Pubkey will be automatically generated in the output script, and the data value stored in this UTXO is written as the public key value, and the priority of using this UTXO is set to the lowest (to prevent this UTXO from being randomly consumed).

[0012] The second step is public key reference. First, when the public and private key pair is used after registration, a UTXO pointing to the UTXO that records the public key will be stored in the UTXO_PUBKEY structure of the transaction. During script verification, a stack push operation will be performed. The signature of the input script is first pushed onto the stack. Secondly, the output script content will call the transaction hash stored in the UTXO data, and then call the public key value stored in the transaction hash to push the public key onto the stack. Then, the operator is used to verify the correctness of the signature of the input script. During this process, the UTXO storing the public key will not be consumed. After the verification is completed, the UTXO will continue to remain in an unspent state for subsequent use.

[0013] The third step is public key destruction. When the balance of the address corresponding to the public and private key pair is 0, it can be regarded as an inactive state at this time. In the last transaction, the UTXO with the lowest priority that stores the public key information will also be automatically destroyed at this time. However, the public key registration process can also be carried out again later. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the technical solutions in the present invention, the drawings required for the description of the present invention will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0015] Figure 1 It is a schematic diagram of a transaction structure provided by an embodiment of the present invention;

[0016] Figure 2 It is a schematic diagram of a public key reference structure and process provided by an embodiment of the present invention;

[0017] Figure 3 It is a flowchart of a public key registration provided by an embodiment of the present invention;

[0018] Figure 4 It is a flowchart of a public key destruction provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0019] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0020] As described in the background art, the present method mainly aims at a public key optimized storage scheme for a blockchain using a post-quantum signature algorithm. This is based on the unique requirements arising from the fact that such blockchains have long public keys and do not have key derivation functions. In addition, the blockchain structure of the present method is for a blockchain based on the UTXO architecture, and through special structure design, the role of removing redundant storage is achieved.

[0021] Figure 1 As shown, it is a schematic diagram of a transaction structure. Figure 1 As shown, the block transaction structure mainly includes five parts: The transaction hash refers to the value obtained by hashing all data, which can be used as an index for this transaction and can also be used to verify the correctness of the data using the hash; the transaction version is used to control system iteration and has little relevance to the present method; the public key script is a newly added data structure, and the stored content is the hash and index of the referenced transaction. By using the hash of the referenced transaction, the UTXO data table in the blockchain can be queried, and then the transaction can be found. Then, through the index, the specific location of the UTXO can be located, and through this information, the content of the required transaction can be found; the input script mainly stores the post-quantum signature content; the output script mainly includes three parts: type, script, and data. When the type is Pubeky, the script stores the opcode for verifying the signature, and the specific value of the public key is stored in the data. When the type is Transaction, the script stores the opcode for verifying the signature, and no content is stored in the data.

[0022] Figure 2 As shown, it is a schematic diagram of the public key reference structure and process. Figure 2 As shown, the main process is similar to the traditional verification method described in the background art. The process mainly takes place in the data verification stack. First, the digital signature of the input script is pushed onto the stack. Secondly, according to the transaction hash and index data of the public key script, the transaction storing the required public key is found in the data table, and then the public key value of the data in this transaction is written into the stack. Finally, the verification operation is performed according to the verification code of the output script. If the signature verification is successful, the process is successful.

[0023] Figure 3 As shown, it is a flowchart of public key registration. Figure 3 As shown, the main process needs to determine whether the balance is 0 when the public and private key pair is the transaction recipient. If the balance is 0, it indicates that the public key needs to be registered. At this time, a UTXO of type Pubkey will be automatically generated, and the public key value is stored in the data. If the balance is not 0, it is not necessary to generate it, and other UTXOs with higher consumption priority are consumed.

[0024] Figure 4 As shown, it is a flowchart of public key destruction. Figure 4As shown, the main process needs to determine whether the balance of the public-private key pair is 0 when it is the transaction initiator. If the balance is 0, it indicates that the public key needs to be destroyed, and at this time, the UTXO of the Pubkey type will be consumed. If the balance is not 0, other UTXOs with higher priority will be consumed.

[0025] In summary, through the UTXO script architecture feature of the present invention, the public key is stored once according to its usage status, effectively reducing the redundant storage of the same public key in different block data. The more frequently the public key is used, the better the optimization effect. The present invention is applicable to the scenario of post-quantum signature application in the blockchain, especially suitable for lattice-based post-quantum signature algorithms, significantly increasing the application efficiency and expanding the application scope.

[0026] Those skilled in the art should understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, this specification can take the form of a computer program product implemented on one or more computer-usable / readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0027] For another example, the present invention can be implemented in a blockchain system. The blockchain system can include a memory, a processor, and a computer program stored on the memory. The processor can execute the computer program to implement the Figures 2 to 4 steps of the method described in the present invention.

[0028] The specific embodiments described above further elaborate on the purpose, technical solutions, and beneficial effects of the present invention. It should be understood that the above are only specific embodiments of the present invention and are not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection scope of the present invention.

Claims

1. An optimized method for storing the public key of a blockchain based on post-quantum signature, the method comprising: (1) Defining the block structure: adding a UTXO_PUBKEY structure to the transaction data structure, where the UTXO_PUBKEY structure is used to point to the transaction hash that records the stored public key; adding a Type type to the transaction, where a regular transaction is of the Transaction type and a transaction for storing the public key is of the Pubkey type; If the transaction is of the Pubkey type, the stored transaction data is the public key value; (2) Public key registration: When a pair of public and private keys is used for the first time, a UTXO of the Pubkey type is automatically generated in the output script. The information stored in this UTXO is the public key value, and its usage priority is set to the lowest; (3) Public key reference: When the public and private keys are reused, the UTXO_PUBKEY structure points to the UTXO that records the public key; during script verification, the output script content calls the data content of this UTXO during construction and verifies the signature content of the input script according to the operator. During this process, this UTXO will not be consumed; (4) Public key destruction: When the balance of a pair of public and private key addresses is 0, the UTXO of the public key is consumed in the last transaction that becomes 0, and public key registration can be performed again later.

2. The method for optimizing the storage of blockchain public keys based on post-quantum signatures according to claim 1, wherein: After the UTXO_PUBKEY structure is referenced, the corresponding UTXO will not be consumed. Its unique position in the entire blockchain network is determined by the index of this UTXO and the transaction hash value Tx_hash; while after the original input script is referenced, the UTXO will be consumed and a new UTXO will be generated.

3. A blockchain system, comprising a memory, a processor, and a computer program stored on the memory, characterized in that, The processor executes the computer program to implement the optimized method for storing the public key of a blockchain based on post-quantum signature according to any one of claims 1-2.

4. A computer program product comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the optimized method for storing the public key of a blockchain based on post-quantum signature according to any one of claims 1-2.

5. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the optimized method for storing the public key of a blockchain based on post-quantum signature according to any one of claims 1-2.

Citation Information

Patent Citations

  • Block chain transaction processing method based on multivariable signature method and computer equipment

    CN114157431A

  • Blockchain-based network address

    GB2624705A

  • Method for issuing, using, refunding, settling and revocating electric voucher in use of merkle tree structure on the basis of unspent transaction output, and server using the same

    KR101841564B1

  • Zero-knowledge proof payments using blockchain

    US20200193425A1

  • Computer-implemented system and method suitable for increasing the security of instant off-line blockchain transactions

    US20210150522A1