JP2023110884A - Data processing device and data processing method - Google Patents

Data processing device and data processing method Download PDF

Info

Publication number
JP2023110884A
JP2023110884A JP2023007773A JP2023007773A JP2023110884A JP 2023110884 A JP2023110884 A JP 2023110884A JP 2023007773 A JP2023007773 A JP 2023007773A JP 2023007773 A JP2023007773 A JP 2023007773A JP 2023110884 A JP2023110884 A JP 2023110884A
Authority
JP
Japan
Prior art keywords
code
data processing
zero
source code
arithmetic circuit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2023007773A
Other languages
Japanese (ja)
Inventor
ジャン・シエヌビヌ
Shenbin Zhang
ホア・ソォン
Song Hua
ピ・ビンフォン
Bing-Feng Pi
俊 孫
Shun Son
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Publication of JP2023110884A publication Critical patent/JP2023110884A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/51Source to source
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/43Checking; Contextual analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Devices For Executing Special Programs (AREA)
  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

To provide a data processing device for converting executable source code into zero-knowledge proof capable of verifying the correctness of the execution process of the source code, and a data processing method.SOLUTION: The data processing device includes: an arithmetic circuit constraint generation unit that is configured to automatically analyze source code and decompose the source code into code structure and to generate arithmetic circuit constraints that describe code structure; and a zero-knowledge proof generation unit that is configured to generate zero-knowledge proof by using the arithmetic circuit constraints. The zero-knowledge proof is constituted of polynomials that are formed based on the arithmetic circuit constraints.SELECTED DRAWING: Figure 1

Description

本発明は、データ処理の技術分野に関し、特に、実行可能なソースコードを、該ソースコードの実行過程(プロセス)の正確性を検証(verification)するためのゼロ知識証明(zero-knowledge proof)に変換するためのデータ処理装置及びデータ処理方法に関する。 TECHNICAL FIELD The present invention relates to the technical field of data processing, and in particular, converts executable source code into zero-knowledge proof for verifying the correctness of the execution process of the source code. The present invention relates to a data processing apparatus and data processing method for conversion.

従来の様々なデータ処理技術では、データ処理に係る業務(サービス)ロジックが比較的複雑になるときに、データ処理のパフォーマンスが大幅に低下し、それに応じてデータ処理の関連コストも増加し得る。 In various conventional data processing techniques, when the business (service) logic involved in data processing becomes relatively complex, the performance of data processing can be significantly degraded, and the associated costs of data processing can be increased accordingly.

従来技術に存在する上述の問題を解決するために、本発明は、実行可能なソースコードを、該ソースコードの実行プロセスの正確性を検証するためのゼロ知識証明に変換するためのデータ処理技術を提供することを課題とする。 In order to solve the above-mentioned problems existing in the prior art, the present invention provides a data processing technology for transforming executable source code into zero-knowledge proofs for verifying the correctness of the execution process of the source code. The task is to provide

本発明の1つの側面によれば、実行可能なソースコードを、ソースコードの実行プロセスの正確性を検証するためのゼロ知識証明に変換するために用いられるデータ処理装置が提供され、該データ処理装置は、
ソースコードを自動で分析してソースコードをコード構造に分解し、コード構造を記述する演算回路制約(constraint)を生成するように構成される演算回路制約生成ユニット;及び
演算回路制約を使用してゼロ知識証明を生成するように構成されるゼロ知識証明生成ユニットであって、ゼロ知識証明は、演算回路制約に基づいて形成される多項式により構築される、ゼロ知識証明生成ユニットを含む。
According to one aspect of the present invention, there is provided a data processing apparatus used for converting executable source code into zero-knowledge proofs for verifying the correctness of the execution process of the source code, the data processing apparatus comprising: The device
an arithmetic circuit constraint generation unit configured to automatically analyze source code to decompose the source code into code structures and generate arithmetic circuit constraints that describe the code structures; and using the arithmetic circuit constraints. A zero-knowledge proof generation unit configured to generate a zero-knowledge proof, the zero-knowledge proof including a zero-knowledge proof generation unit constructed by polynomials formed based on arithmetic circuit constraints.

本発明のもう1つの側面によれば、実行可能なソースコードを、ソースコードの実行プロセスの正確性を検証するためのゼロ知識証明に変換するためのデータ処理方法が提供され、該データ処理方法は、
ソースコードを自動で分析してソースコードをコード構造に分解し、コード構造を記述する演算回路制約を生成し;及び
演算回路制約を使用してゼロ知識証明を生成することを含み、
ゼロ知識証明は、演算回路制約に基づいて形成される多項式により構築される。
According to another aspect of the present invention, there is provided a data processing method for transforming executable source code into zero-knowledge proofs for verifying the correctness of an execution process of the source code, the data processing method comprising: teeth,
automatically analyzing source code to decompose the source code into code structures, generating arithmetic circuit constraints that describe the code structures; and generating zero-knowledge proofs using the arithmetic circuit constraints,
Zero-knowledge proofs are constructed by polynomials formed based on arithmetic circuit constraints.

本発明の他の側面によれば、上述のデータ処理方法を実現し得るコンピュータプログラムが提供される。また、少なくともコンピュータ可読媒体の形式を有するコンピュータプログラムプロダクトがさらに提供され、その中には、上述のデータ処理方法を実現するためのコンピュータプログラムコードが記憶されている。 According to another aspect of the present invention, there is provided a computer program capable of implementing the data processing method described above. Also provided is a computer program product in the form of at least a computer readable medium, in which is stored computer program code for implementing the data processing method described above.

本発明における、実行可能なソースコードを、該ソースコードの実行プロセスの正確性を検証するためのゼロ知識証明に変換するためのデータ処理技術によれば、複雑なオンチェーンの業務ロジックをオフチェーンの計算にトランスファーでき、かつオフチェーンの計算及びその関連するデータのためにゼロ知識証明を自動的に生成できるため、オフチェーンの計算の正確性を確保できる。特に、該データ処理技術は、オフチェーンの計算に係るソースコードを自動で分析して計算プロセスを回路制約に変換でき、かつ最適化のゼロ知識証明プロトコルを用いてそのために証明を生成できる。このようにして、安全性を確保することができるとともに、ブロックチェーンの計算コストを低減することもできる。 According to the data processing technology for converting executable source code into zero-knowledge proof for verifying the correctness of the execution process of the source code in the present invention, complex on-chain business logic can be converted off-chain and automatically generate zero-knowledge proofs for off-chain computations and their associated data, ensuring the accuracy of off-chain computations. In particular, the data processing technique can automatically analyze the source code for off-chain computation to translate the computation process into circuit constraints, and generate proofs for it using an optimized zero-knowledge proof protocol. In this way, security can be ensured and the computational cost of the blockchain can also be reduced.

本発明の実施例におけるデータ処理装置のブロック図である。1 is a block diagram of a data processing device in an embodiment of the present invention; FIG. 本発明の実施例においてデータ処理装置が実行する例示的な処理を示す図である。FIG. 2 illustrates exemplary processing performed by a data processing apparatus in an embodiment of the present invention; 本発明の実施例における演算回路制約生成ユニットのブロック図である。FIG. 4 is a block diagram of an arithmetic circuit constraint generation unit in an embodiment of the present invention; 本発明の実施例において静的分析サブユニットが実行する例示的な処理を示す図である。FIG. 4 illustrates exemplary processing performed by the static analysis subunit in an embodiment of the invention; 本発明の実施例において静的分析サブユニットが第一コード構造について実行する例示的な処理を示す図である。FIG. 4 shows an exemplary process performed by a static analysis subunit on a first code structure in an embodiment of the present invention; 本発明の実施例において静的分析サブユニットが第二コード構造について実行する例示的な処理を示す図である。FIG. 4 shows an exemplary process performed by the static analysis subunit on the second code structure in an embodiment of the present invention; 本発明の実施例において静的分析サブユニットが第三コード構造について実行する例示的な処理を示す図である。FIG. 4 illustrates an exemplary process performed by the static analysis subunit on the third code structure in an embodiment of the present invention; 本発明の実施例において静的分析サブユニットが第四コード構造について実行する例示的な処理を示す図である。FIG. 10 illustrates an exemplary process performed by the static analysis subunit on the fourth code structure in an embodiment of the present invention; 本発明の実施例において動的分析サブユニットが実行する例示的な処理を示す図である。FIG. 4 illustrates exemplary processing performed by the dynamic analysis subunit in an embodiment of the invention; 本発明の実施例において動的分析サブユニットが第五乃至第八コード構造について実行する例示的な処理を示す図である。FIG. 10 illustrates an exemplary process performed by the dynamic analysis subunit for fifth through eighth code structures in an embodiment of the present invention; 本発明の実施例においてゼロ知識証明生成ユニットが実行する例示的な処理を示す図である。Fig. 3 shows an exemplary process performed by a zero-knowledge proof generation unit in an embodiment of the present invention; 本発明の実施例においてゼロ知識証明生成ユニットが実行する例示的な累積証明生成処理を示す図である。FIG. 4 illustrates an exemplary cumulative proof generation process performed by a zero-knowledge proof generation unit in an embodiment of the present invention; 本発明の実施例においてゼロ知識証明生成ユニットが実行する累積証明処理の一例を示す図である。FIG. 4 is a diagram showing an example of cumulative proof processing executed by a zero-knowledge proof generation unit in an embodiment of the present invention; 本発明の実施例におけるデータ処理方法のフローチャートである。4 is a flow chart of a data processing method according to an embodiment of the present invention; 本発明の実施例におけるデータ処理方法及びデータ処理装置を実現し得る汎用マシンの構成図である。1 is a configuration diagram of a general-purpose machine that can implement a data processing method and a data processing device according to an embodiment of the present invention; FIG.

以下、添付した図面を参照しながら、本発明を実施するための好適な実施例を詳細に説明する。なお、これらの実施例は例示に過ぎず、本発明を限定するものではない。 Preferred embodiments for carrying out the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that these examples are merely illustrative and do not limit the present invention.

ゼロ知識証明は計算に関する情報を公開することなく、汎用計算の正確性に対して検証を行うことができる。ゼロ知識証明は汎用計算を計算ステップに従って演算回路に変換し、各回路ゲートに対して制約を行い、すべての回路ゲートの制約を形式化して統一し、そして、統合して演算回路制約システムを形成する。汎用計算の正確性を演算回路制約システムの充足可能性(satisfiability)に変換する。演算回路制約システムを多項式の表現に変換し、汎用計算の正確性を再び多項式の正確性に変換する。多項式の定義域における値をサンプリングして検証を行うことで、汎用計算の正確性の検証を実現し得る。このプロセスでは、暗号スキームにより、検証者が汎用計算に関する情報を得ることなく、汎用計算の正確性に対して検証を行うようにさせることができる。 Zero-knowledge proofs can verify the correctness of general-purpose computations without exposing information about the computations. Zero-knowledge proof transforms general-purpose computations into arithmetic circuits according to the computation steps, constrains each circuit gate, formalizes and unifies the constraints of all circuit gates, and integrates them to form an arithmetic circuit constraint system. do. We translate the correctness of general-purpose computations into the satisfiability of arithmetic circuit constraint systems. We transform the arithmetic circuit constraint system into a polynomial representation, and transform the general computational accuracy back into polynomial accuracy. Verification of the correctness of general-purpose computations can be achieved by sampling and verifying values in the domain of the polynomial. In this process, cryptographic schemes allow verifiers to verify against the correctness of general-purpose computations without obtaining information about the general-purpose computations.

ブロックチェーンは、ディーセントラリゼーション(decentralization)の方式で操作を行う分散型データベースと見なすことができる。ブロックチェーン技術は、データ暗号化、タイムスタンプ、分散型コンセンサス、経済的インセンティブなどの手段を使用することで、分散型システムにおけるトランザクションノードの相互信頼を必要とせずに、ディーセントラリゼーションベースのポイントツーポイントのトランザクション、協調、及びコラボレーションを実現できるため、セントラリゼーション機構に一般に存在する高コスト、低効率、データ記憶不安全などの問題を解決できる。 A blockchain can be viewed as a distributed database that operates in a manner of decentralization. By using means such as data encryption, timestamps, decentralized consensus, and economic incentives, blockchain technology enables decentralization-based points without the need for mutual trust of transaction nodes in decentralized systems. Because it can realize two-point transaction, coordination and collaboration, it can solve the problems such as high cost, low efficiency and data storage insecurity that are commonly present in centralization mechanisms.

近年、ブロックチェーンは、新しい形式の普遍性(universality)有りの分散型基盤アーキテクチャとして、金融、経済、テクノロジー、さらには政治などのあらゆる分野で幅広く応用されている。 In recent years, as a new form of universal distributed infrastructure architecture, blockchain has been widely applied in various fields such as finance, economy, technology, and even politics.

しかし、現在のブロックチェーンシステムでは、オンチェーンの業務ロジックがスマートコントラクトにより実現される。オンチェーンの業務ロジックが比較的複雑になるときに、チェーンへのトランザクションのアップロードのパフォーマンスが大幅に低下し、それに応じてトランザクションの手続料金も増加し得る。 However, in current blockchain systems, on-chain business logic is realized by smart contracts. When the on-chain business logic becomes relatively complex, the performance of uploading transactions to the chain may be significantly degraded, and transaction processing fees may increase accordingly.

また、安全性を確保するために、ブロックチェーンアプリケーションの開発者はオンチェーンのスマートコントラクトにおける業務ロジックをオフチェーンにトランスファーするときに、この部分のスマートコントラクトのコードのために手動でゼロ知識証明を生成する必要があり、これによって、オフチェーンの業務ロジックの実行プロセスが正確であることを確保できる。開発者について言えば、ゼロ知識証明を生成するには暗号学や数学の関連知識を把握する必要がある。しかし、ほとんどのブロックチェーンアプリケーションの開発者は暗号学の知識を有していない。また、ゼロ知識証明の演算回路制約を手動で書くのは非常に手間がかかる。開発者が手動で演算回路制約を生成できたとしても、ゼロ知識証明を生成するときに、依然として、従来のゼロ知識証明プロトコルを使用する必要があるため、具体的なシーンに応じてゼロ知識証明の生成時間を短縮できない。 In addition, to ensure safety, blockchain application developers manually perform zero-knowledge proof for this part of the smart contract code when transferring the business logic in the on-chain smart contract to off-chain. It must be generated to ensure that the off-chain business logic execution process is accurate. As for developers, generating zero-knowledge proofs requires a grasp of the relevant knowledge of cryptography and mathematics. However, most blockchain application developers have no knowledge of cryptography. Also, manually writing the arithmetic circuit constraints for zero-knowledge proofs is very time-consuming. Even if developers can manually generate arithmetic circuit constraints, they still need to use traditional zero-knowledge proof protocols when generating zero-knowledge proofs. generation time cannot be shortened.

以下に詳細に説明する本発明のデータ処理技術によれば、プログラムソースコードの静的コード分析に基づいて、順次構造、すべての分岐、ループ、API(Application Program Interface)インターフェース関数呼び出しなどについて回路制約を生成でき、また、プログラムソースコードの動的コード分析に基づいて、動的アレイ、動的ループ、具体的に実行される分岐、再帰関数などについて回路制約を生成できる。また、ソースコードの動的実行の計算プロセスにおいてコード変数の割り当て(assignment)を記憶できる。また、ゼロ知識証明の生成プロセスにおいて、従来のゼロ知識証明生成方法を最適化する。具体的には、構造が異なる(重複しない)コード構造について、ゼロ知識証明を同時に(concurrently)生成し、また、構造が同じ(重複した)コード構造について、累積によってゼロ知識証明を生成する。 According to the data processing technology of the present invention, which will be described in detail below, based on static code analysis of program source code, circuit constraints are applied to sequential structures, all branches, loops, API (Application Program Interface) interface function calls, and the like. and based on dynamic code analysis of program source code, circuit constraints can be generated for dynamic arrays, dynamic loops, specifically executed branches, recursive functions, and the like. Also, the assignment of code variables can be stored in the computational process of dynamic execution of the source code. Also, in the zero-knowledge proof generation process, we optimize the conventional zero-knowledge proof generation method. Specifically, zero-knowledge proofs are generated concurrently for code structures with different (non-overlapping) structures, and zero-knowledge proofs are generated by accumulation for code structures with the same (overlapping) structure.

なお、ここでは、用語“演算回路制約”、“回路制約”、“制約”及び“乗算回路制約”は、同じ意味を有するため、明細書において混在して使用され得る。また、ここでは、用語“ゼロ知識証明”及び“証明”は、同じ意味を持つので、明細書において混在して使用され得る。 Note that the terms “arithmetic circuit constraint”, “circuit constraint”, “constraint” and “multiplication circuit constraint” have the same meaning and can be used together in the specification. Also, as used herein, the terms "zero-knowledge proof" and "proof" have the same meaning and may be used interchangeably in the specification.

以下、図面を参照しながら、本発明の実施例に基づいて、本発明における、実行可能なソースコードを、ソースコードの実行プロセスの正確性を検証するためのゼロ知識証明に変換するためのデータ処理技術について詳しく説明する。 Data for converting executable source code into zero-knowledge proof for verifying the correctness of the execution process of the source code in the present invention, based on the embodiment of the present invention, with reference to the drawings. Processing technology will be described in detail.

図1は本発明の実施例におけるデータ処理装置100のブロック図である。図2は本発明の実施例においてデータ処理装置100が実行する例示的な処理を示す図である。 FIG. 1 is a block diagram of a data processing device 100 according to an embodiment of the invention. FIG. 2 is a diagram illustrating exemplary processing performed by data processing apparatus 100 in an embodiment of the present invention.

図1に示すように、本発明の実施例におけるデータ処理装置100は演算回路制約生成ユニット101及びゼロ知識証明生成ユニット102を含んでも良い。 As shown in FIG. 1, a data processing apparatus 100 in an embodiment of the present invention may include an arithmetic circuit constraint generation unit 101 and a zero-knowledge proof generation unit 102. As shown in FIG.

図2に示すように、本発明の実施例によれば、データ処理装置100の入力は、プログラムのソースコード、例えば、C言語、Java言語、Golong言語などで書かれたソースコードを含んでも良い。また、図2に示すように、データ処理装置100の出力は、ソースコードの実行プロセスの正確性を検証するためのゼロ知識証明であっても良い。 As shown in FIG. 2, according to embodiments of the present invention, the input of the data processing device 100 may include program source code, e.g., source code written in C language, Java language, Golong language, etc. . Also, as shown in FIG. 2, the output of the data processing device 100 may be a zero-knowledge proof for verifying the correctness of the execution process of the source code.

また、図2における点線枠で示すように、本発明の他の実施例によれば、データ処理装置100の入力はさらに、プログラムにおける関数のパラメータを含んでも良い。 Also, as indicated by the dashed box in FIG. 2, according to another embodiment of the present invention, the input of data processing apparatus 100 may further include parameters of functions in the program.

本発明の実施例によれば、ソースコードは、ブロックチェーンアーキテクチャにおいて、アプリケーションに関するデータに対してオフチェーンの事前処理を行うために用いられる。ここで言及されているアプリケーションとは、例えば、ブロックチェーンアーキテクチャにおいてスマートコントラクトの形式で実現されるオンチェーントランザクションであっても良い。なお、当業者が理解すべきは、ここでブロックチェーンのスマートコントラクトのためのソースコードを例にして、本発明の実施例におけるデータ処理装置及びデータ処理方法を詳細に説明したが、本発明はこれに限定されないということである。本発明の思想及び範囲を離脱しない限り、本発明の構想は、ブロックチェーンだけでなく、他のデータ処理の技術分野におけるソースコードにも適用できる。例えば、安全などが原因でソースコード自体を公開できない技術分野では、本発明の構想を採用してソースコードをゼロ知識証明に変換することで、ソースコードの実行プロセスの正確性を検証できる。 According to embodiments of the present invention, the source code is used to perform off-chain pre-processing of data for applications in a blockchain architecture. The applications referred to here may, for example, be on-chain transactions implemented in the form of smart contracts in a blockchain architecture. It should be understood by those skilled in the art that the data processing device and data processing method in the embodiments of the present invention have been described in detail by taking the source code for blockchain smart contract as an example. It is not limited to this. Without departing from the spirit and scope of the present invention, the concept of the present invention can be applied not only to blockchain, but also to source code in other technical fields of data processing. For example, in technical fields where the source code itself cannot be made public due to security reasons, the concept of the present invention can be used to convert the source code into a zero-knowledge proof, thereby verifying the correctness of the source code execution process.

図1及び図2に示すように、本発明の実施例によれば、演算回路制約生成ユニット101は、ソースコードを自動で分析してソースコードをコード構造に分解し、かつコード構造を記述する演算回路制約を生成できる。 As shown in FIGS. 1 and 2, according to the embodiment of the present invention, the arithmetic circuit constraint generation unit 101 automatically analyzes the source code to decompose the source code into code structures and describes the code structures. Arithmetic circuit constraints can be generated.

図2に示すように、本発明の実施例によれば、演算回路制約生成ユニット101は、ソースコードの静的コード構造に対して分析を行うことで、静的コード構造に関する演算回路制約を生成でき、そのうち、静的コード構造はソースコードの実行期間内で不変であり、また、ソースコードの動的コード構造を実行することで、動的コード構造に関する演算回路制約を生成でき、そのうち、動的コード構造はソースコードの実行期間内で変数に応じて動的に変化し得る。また、図2における点線枠で示すように、本発明の他の実施例によれば、演算回路制約生成ユニット101はさらに、演算回路の変数割り当て(variable assignment)を行うことができる。図2に示すように、本発明の実施例によれば、演算回路制約生成ユニット101はソースコードのコード構造に対しての分析及び実行に基づいて、ソースコードに含まれる変数の乗法公式の形式を有する演算回路制約を生成できる。以下、図3乃至図10に基づいて演算回路制約生成ユニット101の構成及び機能についてより詳しく説明する。 As shown in FIG. 2, according to an embodiment of the present invention, the arithmetic circuit constraint generation unit 101 analyzes the static code structure of the source code to generate arithmetic circuit constraints for the static code structure. The static code structure is unchanged during the execution period of the source code, and the dynamic code structure of the source code can be executed to generate arithmetic circuit constraints on the dynamic code structure. The static code structure can change dynamically according to variables during execution of the source code. Also, as indicated by the dashed frame in FIG. 2, according to another embodiment of the present invention, the arithmetic circuit constraint generation unit 101 can further perform variable assignment of the arithmetic circuit. As shown in FIG. 2, according to the embodiment of the present invention, the arithmetic circuit constraint generation unit 101, based on the analysis and execution of the code structure of the source code, the multiplication formula form of the variables contained in the source code. can generate an arithmetic circuit constraint with The configuration and functions of the arithmetic circuit constraint generation unit 101 will be described in more detail below with reference to FIGS. 3 to 10. FIG.

図1及び図2に示すように、本発明の実施例によれば、ゼロ知識証明生成ユニット102は、演算回路制約生成ユニット101が生成した演算回路制約を使用して、ゼロ知識証明を生成でき、そのうち、ゼロ知識証明は、演算回路制約に基づいて形成された多項式により構築され得る。上述のように、図2における点線枠で示すように、本発明の他の実施例によれば、ゼロ知識証明生成ユニット102は、演算回路制約生成ユニット101が生成した演算回路制約、及び回路変数の割り当ての両方を用いて、ゼロ知識証明を生成できる。 As shown in FIGS. 1 and 2, according to embodiments of the present invention, the zero-knowledge proof generation unit 102 can use the arithmetic circuit constraints generated by the arithmetic circuit constraint generation unit 101 to generate zero-knowledge proofs. Among them, zero-knowledge proofs can be constructed by polynomials formed based on arithmetic circuit constraints. As described above, according to another embodiment of the present invention, zero-knowledge proof generation unit 102 generates arithmetic circuit constraints generated by arithmetic circuit constraint generation unit 101 and circuit variables can be used to generate zero-knowledge proofs.

図2に示すように、本発明の実施例によれば、ゼロ知識証明生成ユニット102は、構造が異なる(重複しない)コード構造について、ゼロ知識証明を同時に生成でき、また、構造が同じ(重複した)コード構造について、累積によってゼロ知識証明を生成できる。以下、図11から図13をもとにゼロ知識証明生成ユニット102の構造及び機能についてさらに詳しく説明する。 As shown in FIG. 2, according to an embodiment of the present invention, the zero-knowledge proof generation unit 102 can simultaneously generate zero-knowledge proofs for code structures with different (non-overlapping) structures and also for code structures with the same (overlapping) structures. ), we can generate zero-knowledge proofs by accumulation. The structure and function of the zero-knowledge proof generation unit 102 will be described in more detail below with reference to FIGS. 11 to 13. FIG.

図3は本発明の実施例における演算回路制約生成ユニット101のブロック図である。図3に示すように、本発明の実施例によれば、演算回路制約生成ユニット101は静的分析サブユニット1011及び動的分析サブユニット1012を含み得る。以下、静的分析サブユニット1011及び動的分析サブユニット1012の構成及び機能についてそれぞれ詳細に説明する。 FIG. 3 is a block diagram of the arithmetic circuit constraint generation unit 101 in the embodiment of the invention. As shown in FIG. 3, according to embodiments of the present invention, arithmetic circuit constraint generation unit 101 may include static analysis subunit 1011 and dynamic analysis subunit 1012 . The configurations and functions of the static analysis subunit 1011 and the dynamic analysis subunit 1012 will be described in detail below.

図4は本発明の実施例において静的分析サブユニット1011が実行する例示的な処理を示す図である。 FIG. 4 is a diagram illustrating exemplary processing performed by static analysis subunit 1011 in an embodiment of the present invention.

本発明の実施例によれば、静的分析サブユニット1011はソースコードの静的コード構造に対して分析を行って、静的コード構造に関する演算回路制約を生成でき、そのうち、静的コード構造はソースコードの実行期間内で不変である。 According to an embodiment of the present invention, the static analysis subunit 1011 can analyze the static code structure of the source code to generate arithmetic circuit constraints for the static code structure, wherein the static code structure is It is immutable within the execution period of the source code.

図4に示すように、静的分析サブユニット1011は静的分析によって、ソースコードのコード構造に基づいて抽象構文木を生成し、そして、コード構造の間の依存関係を分析できる。抽象構文木(Abstract Syntax Tree、AST)はソースコード構文構造の1種の抽象表現であり、それはツリー状の形式でソースコードの構文構造を表現し、ツリーにおける各ノードは何れもソースコードにおける1つのコード構造を表す。なお、抽象構文木が当業者にとって既知であるため、説明の便宜のため、ここではその詳しい説明を省略する。 As shown in FIG. 4, the static analysis subunit 1011 can generate an abstract syntax tree based on the code structure of the source code through static analysis, and analyze the dependencies between the code structures. An Abstract Syntax Tree (AST) is a kind of abstract representation of the source code syntactic structure, which expresses the syntactic structure of the source code in a tree-like form, and each node in the tree is one in the source code. represents a single code structure. Since the abstract syntax tree is known to those skilled in the art, detailed description thereof is omitted here for convenience of description.

図4に示すように、本発明の実施例によれば、静的分析サブユニット1011はソースコードを分析して不確定性を有するコード構造を見つけ、これによって、不確定性を有するコード構造を修正できる。何故なら、ゼロ知識証明の演算回路制約システムにおいて、演算回路の制約数及び乗算回路ゲートが必ず確定したものであり、かつ変更不可なものであるからである。不確定なコード構造が存在すれば、プログラムの関数コードに異なるパラメータを代入するときに、コード構造が異なるようになるため、演算回路も異なるようになる。よって、プログラムのソースコードの不確定なコード構造を分析する必要がある。 As shown in FIG. 4, according to an embodiment of the present invention, static analysis subunit 1011 analyzes source code to find code structures with uncertainty, thereby identifying code structures with uncertainty. can be fixed. This is because, in the zero-knowledge proof arithmetic circuit constraint system, the number of constraints of the arithmetic circuit and the multiplication circuit gates are always fixed and cannot be changed. If an indeterminate code structure exists, the code structure will be different when different parameters are assigned to the function code of the program, and therefore the arithmetic circuits will also be different. Therefore, it is necessary to analyze the uncertain code structure of the program's source code.

図4に示すように、本発明の実施例によれば、不確定性を有するコード構造は、リターン結果無しの再帰呼び出し(再帰的に関数を呼び出すことを再帰呼び出し(recursive call)と呼ぶ)のコード構造、無限ループのコード構造、及び指向が不確定な分岐のコード構造のうちの少なくとも1つを含む。本発明の実施例によれば、ソースコードにこのような不確定性を有する構造がある場合、開発者がこのようなコード構造を変更又は削除するように提案できる。 As shown in FIG. 4, according to an embodiment of the present invention, a code structure with indeterminacy is a recursive call without a return result (recursively calling a function is called a recursive call). including at least one of a code construct, an infinite loop code construct, and an undetermined branching code construct. According to embodiments of the present invention, if there are structures with such ambiguities in the source code, the developer may be suggested to modify or remove such code structures.

図4に示すように、本発明の実施例によれば、静的分析サブユニット1011は、規則マッチの方式で、静的コード構造について、ソースコードに含まれる変数の乗法公式の形式を有する演算回路制約を生成できる。本発明の実施例によれば、静的コード構造は、順次実行の第一コード構造、指向が固定した分岐(指向一定分岐)の第二コード構造、回数(ループの回数)が固定したループ(回数一定ループ)の第三コード構造、及びインターフェース関数の第四コード構造のうちの少なくとも1つを含み得る。 As shown in FIG. 4, according to an embodiment of the present invention, the static analysis subunit 1011 performs an operation having the form of a multiplication formula of variables contained in the source code on the static code structure in a rule matching manner. Can generate circuit constraints. According to an embodiment of the present invention, the static code structure includes a first code structure of sequential execution, a second code structure of fixed oriented branch (oriented constant branch), and a fixed number of loops (number of loops). and at least one of a third code structure of a constant count loop) and a fourth code structure of an interface function.

図5は本発明の実施例において静的分析サブユニット1011が第一コード構造について実行する例示的な処理を示す図である。 FIG. 5 is a diagram illustrating exemplary processing performed by static analysis subunit 1011 on a first code structure in an embodiment of the present invention.

図5に示すように、本発明の実施例によれば、静的分析サブユニット1011は、順次実行の第一コード構造について、まず、定数(constant)に関する変数(var)を分析し、そして、定数に関するすべての変数値を計算できる。その後、静的分析サブユニット1011は関数のパラメータ(param)とは無関係の変数を除去(filtering)でき、この部分のコードについては演算回路制約を生成することがない。また、静的分析サブユニット1011は関数のパラメータ及びリターン値(Result)とは無関係の変数について演算回路制約を生成しない。その後、静的分析サブユニット1011はすべての代数計算を乗法公式の形式に変換でき、そのうち、各乗法公式は1つの演算回路制約を表す。また、静的分析サブユニット1011は、生成された一連の乗法公式について、変数と定数の乗算の計算を合併して、乗算回路制約の形式を有する演算回路制約を得ることができる。 As shown in FIG. 5, according to an embodiment of the present invention, static analysis subunit 1011 first analyzes variables (var) for constants for the first code structure of sequential execution, and then You can compute all variable values in terms of constants. After that, the static analysis subunit 1011 can filter variables that are unrelated to the function params and do not generate arithmetic circuit constraints for this part of the code. Also, the static analysis subunit 1011 does not generate arithmetic circuit constraints for variables unrelated to function parameters and return values (Result). The static analysis subunit 1011 can then transform all algebraic computations into the form of multiplicative formulas, of which each multiplicative formula represents one arithmetic circuit constraint. The static analysis subunit 1011 can also, for the generated set of multiplication formulas, merge computations of multiplication of variables and constants to obtain arithmetic circuit constraints having the form of multiplication circuit constraints.

例えば、図5に示すように、例示としての第一コード構造は4つの変数(var)a、b、c、dを有し、そのうち、変数a、bは関数のパラメータ(param)と関連しており、変数c、dは定数と関連しており、即ち、それぞれ、12、3の値が与えられている。また、該第一コード構造は中間変数(var)tmp1、tmp2を有し、かつ最終的なリターン値Resultを取得し得る。 For example, as shown in FIG. 5, an exemplary first code structure has four variables (var) a, b, c, and d, of which variables a and b are associated with function parameters (param). and the variables c and d are associated with constants, ie given the values of 12 and 3 respectively. The first code structure also has intermediate variables (var) tmp1, tmp2, and can obtain the final return value Result.

図5に示すように、本発明の実施例によれば、静的分析サブユニット1011は、定数と関連しているすべての変数値を計算し、例えば、14で中間変数tmp2を置換する。上述のように、この部分のコードについて、静的分析サブユニット1011は演算回路制約を生成しない。図5では、演算回路制約の生成に関するソースコードの部分は灰色枠で示されており、演算回路制約の生成とは無関係のソースコードの部分は白色枠で示されている。よって、図5に示すように、静的分析サブユニット1011は、上述の方式で得られた乗法公式を合併することで、該第一コード構造を示すための演算回路制約を取得し、即ち、Result=14*param1*param2である。 As shown in FIG. 5, according to an embodiment of the present invention, static analysis subunit 1011 computes all variable values associated with constants and replaces intermediate variable tmp2 with 14, for example. As described above, static analysis subunit 1011 does not generate arithmetic circuit constraints for this portion of code. In FIG. 5, the portion of the source code related to the generation of the arithmetic circuit constraint is indicated by a gray frame, and the portion of the source code unrelated to the generation of the arithmetic circuit constraint is indicated by a white frame. Therefore, as shown in FIG. 5, the static analysis subunit 1011 obtains arithmetic circuit constraints for indicating the first code structure by merging the multiplication formulas obtained in the above manner, namely: Result=14*param1*param2.

図6は本発明の実施例において静的分析サブユニット1011が第二コード構造について実行する例示的な処理を示す図である。 FIG. 6 shows an exemplary process performed by static analysis subunit 1011 on the second code structure in an embodiment of the present invention.

図6に示すように、本発明の実施例によれば、ソースコードの分岐判断語句(ステートメント)が確定したものであり、即ち、静的コードである場合、静的分析サブユニット1011は具体的に実行される分岐を計算して、乗算回路制約を直接生成できる。 As shown in FIG. 6, according to an embodiment of the present invention, if the source code's branch decision statements (statements) are definite, i.e., static code, the static analysis subunit 1011 specifically You can directly generate the multiplier circuit constraint by computing the branch taken to .

また、本発明の実施例によれば、ソースコードの分岐判断ステートメントが関数のパラメータと関連しており、即ち、動的コードである場合、静的分析サブユニット1011はすべての分岐構造をリストし、かつ各分岐について、範囲証明の乗算回路制約、及び該分岐の内部コードの乗算回路制約を生成できる。 Also, according to an embodiment of the present invention, the static analysis subunit 1011 lists all branch structures when the branch decision statements in the source code are associated with parameters of functions, i.e. dynamic code. , and for each branch, a range proof multiplication circuit constraint and an internal code multiplication circuit constraint for that branch can be generated.

例えば、図6に示すように、分岐判断ステートメントは、関数のパラメータparam1の値が10よりも大きいかに基づいて、異なる2つの分岐を指向する。よって、図6に示すように、静的分析サブユニット1011は、この2つの分岐構造の範囲証明の乗算回路制約“param1>10”と“param1<=(≦)10”、及び、この2つの分岐構造の内部コードの乗算回路制約“Result=param1*param2”と“Result=param1*param3”を生成できる。 For example, as shown in FIG. 6, the branch decision statement directs two different branches based on whether the value of the function's parameter param1 is greater than ten. Therefore, as shown in FIG. 6, the static analysis subunit 1011 applies the range proof multiplication circuit constraints “param1>10” and “param1<=(≦)10” of the two branch structures, and the two Multiplication circuit constraints “Result=param1*param2” and “Result=param1*param3” of the branch structure internal code can be generated.

図7は本発明の実施例において静的分析サブユニット1011が第三コード構造について実行する例示的な処理を示す図である。 FIG. 7 shows an exemplary process performed by static analysis subunit 1011 on the third code structure in an embodiment of the present invention.

図7に示すように、本発明の実施例によれば、固定した回数のループの第三コード構造について、ソースコードにおけるループの回数lengthが定数である場合、静的分析サブユニット1011は、ループの内部コードについて乗算回路制約を生成でき、かつ毎回のループについて、同じ回路制約を繰り返して生成でき、そのうち、繰り返した(重複した)回数は上述の定数である。また、ソースコードにおけるループの回数lengthが変数である場合、以下に説明する動的分析サブユニット1012は関連する乗算回路制約を生成する。 As shown in FIG. 7, according to an embodiment of the present invention, for a third code structure with a fixed number of loops, if the number of loops length in the source code is constant, the static analysis subunit 1011 performs the loop , and for each loop, the same circuit constraint can be generated repeatedly, the number of repetitions (duplicates) being the aforementioned constant. Also, if the number of loops length in the source code is a variable, the dynamic analysis subunit 1012 described below generates the associated multiplier circuit constraints.

図8は本発明の実施例において静的分析サブユニット1011が第四コード構造について実行する例示的な処理を示す図である。 FIG. 8 shows an exemplary process performed by static analysis subunit 1011 on the fourth code structure in an embodiment of the present invention.

図8に示すように、本発明の実施例によれば、ソースコードにインターフェース関数の第四コード構造、例えば、アプリケーションプログラムインターフェース(API)関数が存在すれば、静的分析サブユニット1011は直接、データベースのうちからAPI関数の回路制約を得ることができる。本発明の実施例によれば、第四コード構造の演算回路制約は予め確定されても良い。例えば、本発明の実施例によれば、各API関数の回路制約は、上述の静的分析サブユニット1011が第一乃至第三コード構造について回路制約を生成する方法によって事前生成され、かつデータベースに格納されても良い。 As shown in FIG. 8, according to an embodiment of the present invention, if a source code has a fourth code structure of an interface function, such as an application program interface (API) function, the static analysis subunit 1011 directly: Circuit constraints for API functions can be obtained from the database. According to embodiments of the present invention, the arithmetic circuit constraints of the fourth code structure may be pre-determined. For example, according to an embodiment of the present invention, circuit constraints for each API function are pre-generated by the method static analysis subunit 1011 described above generates circuit constraints for the first through third code structures, and stored in a database. May be stored.

ここで図3に戻り、本発明の実施例によれば、動的分析サブユニット1012は、ソースコードの動的コード構造を実行して、動的コード構造に関する演算回路制約を生成でき、そのうち、動的コード構造はソースコードの実行期間内で変数に応じて動的に変化する。 Returning now to FIG. 3, according to an embodiment of the present invention, the dynamic analysis subunit 1012 can execute the dynamic code structure of the source code to generate arithmetic circuit constraints for the dynamic code structure, among which: A dynamic code structure changes dynamically according to variables during the execution of the source code.

図9は本発明の実施例において動的分析サブユニット1012が実行する例示的な処理を示す図である。 FIG. 9 illustrates exemplary processing performed by the dynamic analysis subunit 1012 in an embodiment of the invention.

図9に示すように、本発明の実施例によれば、動的分析サブユニット1012は、関数のソースコードに対して動的実行を行い、コードにおける動的構造のサイズ、例えば、動的アレイの長さ、ループの回数、実行される特定の分岐、再帰呼び出しの回数などを記録できる。 As shown in FIG. 9, according to an embodiment of the present invention, the dynamic analysis subunit 1012 performs dynamic execution on the source code of a function to determine the size of dynamic structures in the code, such as dynamic arrays. You can record the length of the , the number of loops, the specific branch taken, the number of recursive calls, etc.

本発明の実施例によれば、動的分析サブユニット1012により分析される動的コード構造は、変数を含むアレイの第五コード構造、非一定回数のループの第六コード構造、非一定指向の分岐の第七コード構造、再帰呼び出しの第八コード構造のうちの少なくとも1つを含んでも良い。 According to an embodiment of the present invention, the dynamic code structures analyzed by the dynamic analysis subunit 1012 are: a fifth code structure of arrays containing variables; a sixth code structure of non-constant number of loops; At least one of a seventh code structure of branching and an eighth code structure of recursive call may be included.

また、本発明の実施例によれば、動的分析サブユニット1012は、ソースコードにおいて、例えば、コードのインストルメンテーション(code instrumentation)により、各コード変数の割り当てを記憶できる。コードのインストルメンテーションは1種の基本的な動的テスト方法であり、ソースコードに幾つかのステートメントを追加することで、プログラムに対しての実行、変数の変化などの状況のチェックを実現するために用いられ、プログラムの制御流及びデータ流情報を得ることができる。なお、コードのインストルメンテーションは当業者にとって既知であるので、説明の便宜のため、ここではその詳しい説明を省略する。 Also, according to embodiments of the present invention, the dynamic analysis subunit 1012 can store the assignment of each code variable in the source code, eg, by code instrumentation. Code instrumentation is a basic dynamic testing method, which adds some statements to the source code to check the execution of the program, the change of variables, etc. can be used to obtain program control flow and data flow information. It should be noted that code instrumentation is well known to those skilled in the art and will not be described in detail here for the sake of convenience.

また、図9に示すように、本発明の他の実施例によれば、動的分析サブユニット1012は動的コード構造における変数の値を用いて演算回路制約における回路変数に対して値(割り当て)を与えることができる。 Also, as shown in FIG. 9, according to another embodiment of the present invention, the dynamic analysis subunit 1012 uses values of variables in the dynamic code structure to assign values to circuit variables in arithmetic circuit constraints. ) can be given.

図10は本発明の実施例において動的分析サブユニット1012が第五から第八コード構造について実行する例示的な処理を示す図である。 FIG. 10 is a diagram illustrating exemplary processing performed by the dynamic analysis subunit 1012 for fifth through eighth code structures in an embodiment of the present invention.

図10に示すように、本発明の実施例によれば、動的分析サブユニット1012は例えば、動的コード構造を実行するときに、上述の静的分析サブユニット1011の静的分析結果を使用して、動的コード構造に関する演算回路制約を生成できる。 As shown in FIG. 10, according to an embodiment of the present invention, dynamic analysis subunit 1012 uses the static analysis results of static analysis subunit 1011 described above, for example, when executing dynamic code structures. can be used to generate arithmetic circuit constraints for dynamic code structures.

具体的には、変数を含むアレイの第五コード構造の具体例は是動的アレイであっても良い。図10に示すように、本発明の実施例によれば、動的分析サブユニット1012は、動的コードの実行の結果に基づいて、アレイのサイズ、アレイの長さ、及びアレイ内のコード変数を確定できる。その後、動的分析サブユニット1012は、静的分析サブユニット1011が得た回路制約(静的分析結果)のうちから、アレイ変数と関連している乗算回路制約を選択できる。 Specifically, a fifth code construct embodiment of an array containing variables may be a positive array. As shown in FIG. 10, according to an embodiment of the present invention, the dynamic analysis subunit 1012 determines the size of the array, the length of the array, and the code variables within the array based on the results of executing the dynamic code. can be determined. The dynamic analysis subunit 1012 can then select the multiplication circuit constraints associated with the array variables from among the circuit constraints (static analysis results) obtained by the static analysis subunit 1011 .

例えば、本発明の実施例によれば、動的分析サブユニット1012は、動的アレイの変数を固定し、かつ静的分析サブユニット1011が得た乗算回路制約のうちから、アレイ変数と関連している乗算回路制約を選ぶことができる。 For example, according to an embodiment of the present invention, the dynamic analysis subunit 1012 fixes the variables of the dynamic array and associates the array variables from among the multiplier circuit constraints obtained by the static analysis subunit 1011. You can choose a multiplier circuit constraint that

また、図10に示すように、本発明の実施例によれば、非固定回数のループの第六コード構造(即ち、動的ループ構造)について、動的分析サブユニット1012は、動的コードの実行の結果に基づいて、ループの回数を決定できる。その後、動的分析サブユニット1012は、静的分析サブユニット1011が得たループの内部の乗算回路制約を繰り返しても良く、繰り返しの回数はループの回数と同じである。 Also, as shown in FIG. 10, according to an embodiment of the present invention, for a sixth code structure (ie, a dynamic loop structure) of a loop with a non-fixed number of times, the dynamic analysis subunit 1012 Based on the results of execution, the number of loops can be determined. The dynamic analysis subunit 1012 may then iterate the multiplier circuit constraint inside the loop obtained by the static analysis subunit 1011, the number of iterations being the same as the number of loops.

また、図10に示すように、本発明の実施例によれば、非固定指向の分岐の第七コード構造(即ち、動的分岐構造)について、動的分析サブユニット1012は、動的コードの実行の結果に基づいて、動的実行の特定の分岐を決定できる。その後、動的分析サブユニット1012は、静的分析サブユニット1011が得たすべての分岐の乗算回路制約(静的分析結果)のうちから、該特定の分岐の乗算回路制約を選択し、かつ、同様に該特定の分岐の範囲証明の乗算回路制約を付加できる。 Also, as shown in FIG. 10, according to an embodiment of the present invention, for the seventh code structure of non-fixed oriented branching (i.e., dynamic branching structure), the dynamic analysis subunit 1012 performs dynamic code A particular branch of dynamic execution can be determined based on the results of the execution. Then, the dynamic analysis subunit 1012 selects the multiplication circuit constraint of the particular branch from among all the branch multiplication circuit constraints (static analysis results) obtained by the static analysis subunit 1011, and Similarly, one can add a range proof multiplication circuit constraint for that particular branch.

また、図10に示すように、本発明の実施例によれば、再帰呼び出しの第八コード構造について、動的分析サブユニット1012は、動的コードの実行の結果に基づいて、再帰呼出しの回数を決定できる。その後、動的分析サブユニット1012は、静的分析サブユニット1011の静的分析結果に基づいて関数の内部の乗算回路制約を取得し、その後、再帰関数のすべての乗算回路制約を繰り返すことができ、繰り返しの回数は再帰呼び出しの回数と同じである。また、本発明の実施例によれば、動的分析サブユニット1012はさらに、再帰呼出しパラメータが再帰関数の代入パラメータと同じであることを確保できる追加の関連制約を付加する必要がある。 Also, as shown in FIG. 10, according to an embodiment of the present invention, for an eighth code structure of recursive calls, the dynamic analysis subunit 1012 calculates the number of recursive calls based on the results of executing the dynamic code. can be determined. Then the dynamic analysis subunit 1012 can obtain the internal multiplication circuit constraints of the function based on the static analysis results of the static analysis subunit 1011, and then iterate all the multiplication circuit constraints of the recursive function. , the number of iterations is the same as the number of recursive calls. Also, according to embodiments of the present invention, the dynamic analysis subunit 1012 also needs to add additional relevant constraints that can ensure that the recursive call parameters are the same as the recursive function's assignment parameters.

上述のような演算回路制約生成ユニット101の構成及び機能によれば、静的コード分析に基づいて、例えば、順次構造、すべての分岐、ループ、API関数呼び出しのために乗算回路制約を生成でき、また、動的コード実行に基づいて、例えば、動的アレイ、動的ループ、具体的に実行される分岐、再帰関数のために乗算回路制約を生成できる。また、動的実行のプロセスではコード変数の割り当てを記録し得る。 According to the configuration and function of the arithmetic circuit constraint generation unit 101 as described above, multiplication circuit constraints can be generated, for example, for sequential structures, all branches, loops, API function calls, based on static code analysis, Multiplier circuit constraints can also be generated for dynamic arrays, dynamic loops, specifically executed branches, recursive functions, for example, based on dynamic code execution. Also, the process of dynamic execution may record the allocation of code variables.

ここで図1に戻り、本発明の実施例によれば、ゼロ知識証明生成ユニット102は、演算回路制約生成ユニット101が生成した演算回路制約を使用して、ゼロ知識証明を生成でき、そのうち、ゼロ知識証明は、演算回路制約に基づいて形成された多項式により構築される。 Returning now to FIG. 1, according to an embodiment of the present invention, the zero-knowledge proof generation unit 102 can use the arithmetic circuit constraints generated by the arithmetic circuit constraint generation unit 101 to generate zero-knowledge proofs, wherein: Zero-knowledge proofs are constructed by polynomials formed based on arithmetic circuit constraints.

図11は本発明の実施例においてゼロ知識証明生成ユニット102が実行する例示的な処理を示す図である。 FIG. 11 is a diagram illustrating exemplary processing performed by the zero-knowledge proof generation unit 102 in an embodiment of the present invention.

具体的には、図11に示すように、本発明の実施例によれば、インターフェース関数の第四コード構造について、複数の異なるインターフェース関数呼び出しが存在する場合、ゼロ知識証明生成ユニット102はゼロ知識証明を同時に生成できる。 Specifically, as shown in FIG. 11, according to an embodiment of the present invention, for the fourth code structure of an interface function, if there are multiple different interface function calls, the zero-knowledge proof generation unit 102 generates a zero-knowledge proof Proofs can be generated at the same time.

また、図11に示すように、本発明の実施例によれば、非固定回数のループの第六コード構造について、ゼロ知識証明生成ユニット102は、重複した動的ループ構造について、累積証明を使用してゼロ知識証明を生成できる。 Also, as shown in FIG. 11, according to an embodiment of the present invention, for the sixth code structure of loops with a non-fixed number of loops, the zero-knowledge proof generation unit 102 uses cumulative proofs for overlapping dynamic loop structures. to generate a zero-knowledge proof.

同様に、図11に示すように、本発明の実施例によれば、再帰呼び出しの第八コード構造について、ゼロ知識証明生成ユニット102は、重複した再帰呼び出し構造について、累積証明を使用してゼロ知識証明を生成できる。 Similarly, as shown in FIG. 11, according to an embodiment of the present invention, for the eighth code structure of the recursive call, the zero-knowledge proof generation unit 102 uses cumulative proofs to zero Proof of knowledge can be generated.

以下、図12及び図13に基づいて、ゼロ知識証明生成ユニット102が累積証明を使用してゼロ知識証明を生成する処理についてより詳しく説明する。 Hereinafter, based on FIGS. 12 and 13, the process of generating zero-knowledge proof using cumulative proof by zero-knowledge proof generation unit 102 will be described in more detail.

また、図11に示すように、本発明の実施例によれば、順次実行の第一コード構造、固定指向の分岐の第二コード構造、固定回数のループの第三コード構造、変数を含むアレイの第五コード構造、及び非固定指向の分岐の第七コード構造について、ゼロ知識証明生成ユニット102は従来のゼロ知識プロトコルを使用してゼロ知識証明を生成できる。 Also shown in FIG. 11, according to an embodiment of the present invention, a first code structure for sequential execution, a second code structure for fixed-oriented branching, a third code structure for fixed-number of loops, an array containing variables , and the seventh code structure of non-fixed-oriented branches, the zero-knowledge proof generation unit 102 can generate zero-knowledge proofs using conventional zero-knowledge protocols.

その後、ゼロ知識証明生成ユニット102は、上述の第一から第八コード構造のゼロ知識証明を1つのゼロ知識証明として合併できる。 After that, the zero-knowledge proof generation unit 102 can merge the zero-knowledge proofs of the above first to eighth code structures as one zero-knowledge proof.

上述のように、本発明の実施例によれば、複数のコード構造の乗算回路制約が異なる(例えば、第四コード構造である)場合、ゼロ知識証明生成ユニット102は従来のゼロ知識プロトコルを使用して、各コード構造のために、ゼロ知識証明を同時に生成することで、証明の生成時間を短縮できる。また、複数のコード構造の回路制約が同じ(例えば、第六コード構造及び第八コード構造)である場合、ゼロ知識証明生成ユニット102は累積証明を使用してゼロ知識証明を生成できる。 As described above, according to embodiments of the present invention, zero-knowledge proof generation unit 102 uses a conventional zero-knowledge protocol when the code structures have different multiplier circuit constraints (e.g., a fourth code structure). Then, for each code structure, zero-knowledge proofs can be generated simultaneously, thereby reducing proof generation time. Also, if the circuit constraints of multiple code structures are the same (eg, the sixth code structure and the eighth code structure), the zero-knowledge proof generation unit 102 can use cumulative proofs to generate the zero-knowledge proof.

具体的には、本発明の実施例によれば、第六コード構造又は第八コード構造について、ゼロ知識証明生成ユニット102は、その演算回路制約に基づく多項式の累積をそのゼロ知識証明として使用できる。 Specifically, according to an embodiment of the present invention, for the sixth code structure or the eighth code structure, the zero-knowledge proof generation unit 102 can use the accumulation of polynomials based on its arithmetic circuit constraints as its zero-knowledge proof. .

本発明の実施例によれば、累積証明は複数の重複したコード構造のために1つのゼロ知識証明を生成することで、演算回路制約の数を減少させ、ゼロ知識証明の生成時間を短縮できる。非固定回数のループの第六コード構造及び再帰呼出しの第八コード構造について、ゼロ知識証明生成ユニット102は累積証明を使用して、ゼロ知識証明の生成を加速化できる。 According to embodiments of the present invention, cumulative proofs generate one zero-knowledge proof for multiple duplicated code structures, thereby reducing the number of arithmetic circuit constraints and shortening the zero-knowledge proof generation time. . For the sixth code structure of a loop with a non-fixed number of times and the eighth code structure of a recursive call, the zero-knowledge proof generation unit 102 can use cumulative proofs to accelerate the generation of zero-knowledge proofs.

図12は本発明の実施例においてゼロ知識証明生成ユニット102が実行する例示的な累積証明生成処理を示す図である。 FIG. 12 illustrates an exemplary cumulative proof generation process performed by zero-knowledge proof generation unit 102 in an embodiment of the present invention.

本発明の実施例によれば、累積証明のアルゴリズムは次のとおりである。 According to an embodiment of the present invention, the cumulative proof algorithm is as follows.

上述のように、コード構造の演算回路制約は3つの多項式によりL(x)*R(x)=O(x)と表すことができる。 As mentioned above, the code structure arithmetic circuit constraint can be expressed by three polynomials as L(x)*R(x)=O(x).

よって、生成されるゼロ知識証明は3つの多項式L(x)、R(x)、O(x)を含み得る。多項式L(x)は Thus, the generated zero-knowledge proof may contain three polynomials L(x), R(x), O(x). The polynomial L(x) is

Figure 2023110884000002
と表すことができ、そのうち、vは演算回路の変数の割り当てを示し、l(x)は演算回路変数の係数を示し、nは演算回路の変数の数を示す。多項式R(x)及びO(x)は多項式L(x)と同じ方式で表すことができ、即ち、
Figure 2023110884000002
where v i indicates the assignment of variables of the arithmetic circuit, l i (x) indicates the coefficients of the variables of the arithmetic circuit, and n indicates the number of variables of the arithmetic circuit. Polynomials R(x) and O(x) can be expressed in the same way as polynomial L(x), i.e.

Figure 2023110884000003
及び
Figure 2023110884000003
as well as

Figure 2023110884000004
である。
Figure 2023110884000004
is.

図12に示すように、多項式L(x)、R(x)、O(x)のうちの各々が1つのコード構造の演算回路制約を表す。例えば、同じコード構造について、演算回路の変数の係数は同じであり、異なる点は演算回路の変数の割り当て(値)vである。よって、本発明の実施例によれば、ゼロ知識証明生成ユニット102は、同じ演算回路の変数の係数に基づいて、異なるコード構造の演算回路制約の多項式を合併することで、2つの多項式A(X)、B(X)を、最終的な累積のゼロ知識証明として得ることができる。 As shown in FIG. 12, each of the polynomials L(x), R(x), O(x) represents the arithmetic circuit constraints of one code structure. For example, for the same code structure, the coefficients of the arithmetic circuit variables are the same, and the difference is the assignment (value) v i of the arithmetic circuit variables. Therefore, according to an embodiment of the present invention, the zero-knowledge proof generation unit 102 combines two polynomials A( X), B(X) can be obtained as the final cumulative zero-knowledge proof.

図13は本発明の実施例においてゼロ知識証明生成ユニット102が実行する累積証明処理の一例を示す図である。 FIG. 13 is a diagram showing an example of cumulative proof processing executed by the zero-knowledge proof generation unit 102 in the embodiment of the present invention.

図13に示すように、2つの演算回路制約(2a+b)*b=a及び(4a-b)*b=aについて、その中には演算回路の変数a及びbが存在する。変数aの係数は1次多項式で表すことができ、かつ方程式を解く(即ち、多項式の各項の係数c及びcを求める)ことで、変数aの係数多項式がl(x)=2xであると確定できる。2つの同じ回路制約構造が存在する場合、それらのゼロ知識証明情報が同じ係数多項式を含むが、演算回路制約の変数aの値が異なる(即ち、図13におけるa_value1及びa_value2である)ので、累積の方式でそれらを合併できる。 As shown in FIG. 13, for two arithmetic circuit constraints (2a+b)*b=a and (4a−b)*b=a, there are arithmetic circuit variables a and b. The coefficients of the variable a can be represented by a first degree polynomial, and by solving the equation (i.e., finding the coefficients c0 and c1 for each term of the polynomial), the coefficient polynomials of the variable a can be expressed as l a (x)= 2x can be determined. If there are two identical circuit constraint structures, their zero-knowledge proof information contains the same coefficient polynomial, but the values of the arithmetic circuit constraint variable a are different (i.e., a_value1 and a_value2 in FIG. 13), so the accumulation You can merge them in the form of

本発明の実施例によれば、ゼロ知識証明生成ユニット102は、重複した構造がない乗算回路制約について、ゼロ知識証明を同時に生成でき、また、重複した構造がある乗算回路制約について、累積証明を使用してゼロ知識証明を生成でき、これによって、証明の生成時間を短縮できる。 According to an embodiment of the present invention, the zero-knowledge proof generation unit 102 can simultaneously generate zero-knowledge proofs for multiplication circuit constraints without duplicate structures, and cumulative proofs for multiplication circuit constraints with duplicate structures. can be used to generate zero-knowledge proofs, which can reduce proof generation time.

本発明はさらに、実行可能なソースコードを、該ソースコードの実行プロセスの正確性を検証するためのゼロ知識証明に変換するためのデータ処理方法を提供する。図14は、本発明の実施例におけるデータ処理方法1400のフローチャートである。 The present invention further provides a data processing method for converting executable source code into zero-knowledge proofs for verifying the correctness of the execution process of the source code. FIG. 14 is a flowchart of a data processing method 1400 according to an embodiment of the invention.

データ処理方法1400はステップS1401でスタートする。 The data processing method 1400 starts at step S1401.

その後、ステップS1402において、ソースコードを自動で分析してソースコードをコード構造に分解し、かつコード構造を記述する演算回路制約を生成する。ステップS1402における処理については、例えば、上述の図1から図13をもとに説明したデータ処理装置100に含まれる演算回路制約生成ユニット101によって実現され得るので、ここではその詳しい説明を省略する。 Then, in step S1402, the source code is automatically analyzed to decompose the source code into code structures, and arithmetic circuit constraints describing the code structures are generated. The processing in step S1402 can be realized, for example, by the arithmetic circuit constraint generation unit 101 included in the data processing apparatus 100 described above with reference to FIGS. 1 to 13, so detailed description thereof will be omitted here.

その後、ステップS1403において、演算回路制約を使用してゼロ知識証明を生成し、そのうち、ゼロ知識証明は、演算回路制約に基づいて形成される多項式により構築される。ステップS1403における処理については、例えば、上述の図1乃至図13に基づいて説明したデータ処理装置100に含まれるゼロ知識証明生成ユニット102によって実現され得るので、ここではその詳しい説明を省略する。 Then, in step S1403, the arithmetic circuit constraints are used to generate a zero-knowledge proof, wherein the zero-knowledge proof is constructed by polynomials formed based on the arithmetic circuit constraints. The processing in step S1403 can be realized, for example, by the zero-knowledge proof generation unit 102 included in the data processing apparatus 100 described above with reference to FIGS. 1 to 13, so detailed description thereof will be omitted here.

最後に、データ処理方法1400はステップS1404でエンドする。 Finally, the data processing method 1400 ends at step S1404.

本発明における、実行可能なソースコードを、該ソースコードの実行プロセスの正確性を検証するためのゼロ知識証明に変換するためのデータ処理技術によれば、例えば、ブロックチェーンアーキテクチャベースのデータ処理プロセスに適用されるときに、複雑なオンチェーンの業務ロジックをオフチェーンの計算にトランスファーでき、かつ自動でオフチェーンの計算及びその関連するデータのためにゼロ知識証明を生成できるため、オフチェーンの計算の正確性を確保できる。特に、該データ処理技術は、オフチェーンの計算に係るソースコードを自動で分析して計算プロセスを回路制約に変換でき、かつ上述のような、コンカレント証明及び累積証明を生成する最適化のゼロ知識証明プロトコルを使用して証明を生成できる。このようにして、安全性を確保することができると同時に、ブロックチェーンの計算コストを削減することもできる。 According to the data processing technology for converting executable source code into zero-knowledge proof for verifying the correctness of the execution process of the source code in the present invention, for example, a blockchain architecture-based data processing process off-chain computation, as it can transfer complex on-chain business logic to off-chain computation and automatically generate zero-knowledge proofs for off-chain computation and its associated data when applied to can ensure the accuracy of In particular, the data processing technology can automatically analyze the source code for off-chain computations to translate the computational process into circuit constraints, and zero-knowledge optimization for generating concurrent proofs and cumulative proofs, as described above. Proof protocols can be used to generate proofs. In this way, the security can be ensured and at the same time the computational cost of the blockchain can be reduced.

図15は本発明の実施例におけるデータ処理方法1400及びデータ処理装置100を実現し得る汎用マシン1500の構成図である。汎用マシン1500は例えば、コンピュータシステムであり得る。なお、汎用マシン1500は例示に過ぎず、本発明のデータ処理方法及びデータ処理装置の使用範囲又は機能を限定するものではない。 FIG. 15 is a configuration diagram of a general-purpose machine 1500 that can implement the data processing method 1400 and data processing apparatus 100 in the embodiment of the present invention. General purpose machine 1500 may be, for example, a computer system. Note that the general-purpose machine 1500 is merely an example, and does not limit the scope of use or the functions of the data processing method and data processing apparatus of the present invention.

図15では、中央処理装置(CPU)1501は、ROM1502に記憶されるプログラム又は記憶部1508からRAM1503にロッドされているプログラムに基づいて各種の処理を行う。RAM1503では、ニーズに応じて、CPU1501が各種の処理を行うときに必要なデータなどを記憶することができる。CPU1501、ROM1502及びRAM1503は、バス1504を経由して互いに接続される。入力/出力インターフェース1505もバス1504に接続される。 In FIG. 15, a central processing unit (CPU) 1501 performs various processes based on programs stored in a ROM 1502 or programs loaded from a storage unit 1508 to a RAM 1503 . The RAM 1503 can store data necessary for the CPU 1501 to perform various processes according to needs. The CPU 1501 , ROM 1502 and RAM 1503 are interconnected via a bus 1504 . Input/output interface 1505 is also connected to bus 1504 .

また、入力/出力インターフェース1505にはさらに、次のような部品が接続され、即ち、キーボードなどを含む入力部1506、液晶表示器(LCD)などのような表示器及びスピーカーなどを含む出力部1507、ハードディスクなどを含む記憶部1508、ネットワーク・インターフェース・カード、例えば、LANカード、モデムなどを含む通信部1509である。通信部1509は、例えば、インターネット、LANなどのネットワークを経由して通信処理を行う。ドライブ1510は、ニーズに応じて、入力/出力インターフェース1505に接続されても良い。取り外し可能な媒体1511、例えば、半導体メモリなどは、必要に応じて、ドライブ1510にセットされることにより、その中から読み取られたコンピュータプログラムを記憶部1508にインストールすることができる。 The input/output interface 1505 is further connected with the following components: an input unit 1506 including a keyboard, etc., an output unit 1507 including a display such as a liquid crystal display (LCD) and a speaker. , a storage unit 1508 including a hard disk, etc., and a communication unit 1509 including a network interface card such as a LAN card, a modem, and the like. A communication unit 1509 performs communication processing via a network such as the Internet or LAN, for example. Drives 1510 may be connected to input/output interface 1505 as desired. A removable medium 1511 , such as a semiconductor memory, can be set in the drive 1510 as necessary to install a computer program read therefrom into the storage unit 1508 .

また、本発明はさらに、マシン可読命令コードを含むプログラムプロダクトを提供する。このような命令コードは、マシンにより読み取られ実行されるときに、上述の本発明の実施形態における方法を実行することができる。それ相応に、このようなプログラムプロダクトをキャリー(carry)する、例えば、磁気ディスク(フロッピーディスク(登録商標)を含む)、光ディスク(CD-ROM及びDVDを含む)、光磁気ディスク(MD(登録商標)を含む)、及び半導体記憶装置などの各種の記憶媒体も本発明に含まれる。 Additionally, the present invention further provides a program product including machine-readable instruction code. Such instruction codes, when read and executed by a machine, are capable of performing the methods in the embodiments of the present invention described above. Correspondingly, for carrying such program products, for example magnetic disks (including floppy disks), optical disks (including CD-ROMs and DVDs), magneto-optical disks (MD®) ), and various storage media such as semiconductor storage devices are also included in the present invention.

上述の記憶媒体は、例えば、磁気ディスク、光ディスク、光磁気ディスク、半導体記憶装置などを含んでも良いが、これらに限定されない。 The storage medium described above may include, for example, a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor storage device, etc., but is not limited to these.

また、上述の方法における各操作(処理)は、各種のマシン可読記憶媒体に記憶されるコンピュータ実行可能なプログラムの方式で実現することもできる。 Each operation (process) in the above-described method can also be implemented in the form of a computer-executable program stored on various machine-readable storage media.

また、以上の実施例などに関し、さらに以下のように付記として開示する。 In addition, the above examples and the like are further disclosed as supplementary notes as follows.

(付記1)
実行可能なソースコードを、前記ソースコードの実行プロセスの正確性を検証するためのゼロ知識証明に変換するためのデータ処理装置であって、
前記ソースコードを自動で分析することで前記ソースコードをコード構造に分解し、そして、前記コード構造を記述する演算回路制約を生成するように構成される演算回路制約生成ユニット;及び
前記演算回路制約を使用して前記ゼロ知識証明を生成するように構成されるゼロ知識証明生成ユニットを含み、
そのうち、前記ゼロ知識証明は、前記演算回路制約に基づいて形成される多項式によって構築される、装置。
(Appendix 1)
A data processing apparatus for converting executable source code into zero-knowledge proofs for verifying the correctness of an execution process of said source code, comprising:
an arithmetic circuit constraint generation unit configured to automatically analyze the source code to decompose the source code into code structures and to generate arithmetic circuit constraints that describe the code structures; and a zero-knowledge proof generation unit configured to generate the zero-knowledge proof using
An apparatus, wherein said zero-knowledge proof is constructed by polynomials formed based on said arithmetic circuit constraints.

(付記2)
付記1に記載のデータ処理装置であって、
前記ソースコードは、ブロックチェーンアーキテクチャにおいて、アプリケーションに関するデータに対してオフチェーンの事前処理を行うために用いられる、装置。
(Appendix 2)
The data processing device according to Appendix 1,
The apparatus, wherein the source code is used to perform off-chain pre-processing on data related to an application in a blockchain architecture.

(付記3)
付記1に記載のデータ処理装置であって、
前記演算回路制約は、前記ソースコードに含まれる変数の乗法公式の形式を有する、装置。
(Appendix 3)
The data processing device according to Appendix 1,
The apparatus, wherein the arithmetic circuit constraint has the form of a multiplication formula for variables contained in the source code.

(付記4)
付記1乃至3のうちの何れか1項に記載のデータ処理装置であって、
前記演算回路制約生成ユニットは、
前記ソースコードの静的コード構造を分析して前記静的コード構造についての演算回路制約を生成するように構成される静的分析サブユニットであって、そのうち、前記静的コード構造は前記ソースコードの実行期間内で不変である、静的分析サブユニット;及び
前記ソースコードの動的コード構造を実行して前記動的コード構造についての演算回路制約を生成するように構成される動的分析サブユニットであって、そのうち、前記動的コード構造は前記ソースコードの実行期間内で変数に応じて動的に変化する、動的分析サブユニットを含む、装置。
(Appendix 4)
The data processing device according to any one of Appendices 1 to 3,
The arithmetic circuit constraint generation unit includes:
a static analysis subunit configured to analyze a static code structure of the source code to generate operational circuit constraints for the static code structure, wherein the static code structure is the source code and a dynamic analysis subunit configured to execute dynamic code structures of said source code to generate arithmetic circuit constraints for said dynamic code structures. A unit comprising a dynamic analysis subunit, wherein said dynamic code structure dynamically changes according to a variable within execution of said source code.

(付記5)
付記4に記載のデータ処理装置であって、
前記静的分析サブユニットは、前記ソースコードを分析して不確定性を有するコード構造を見つけ、そして、不確定性を有する前記コード構造を修正する、装置。
(Appendix 5)
The data processing device according to appendix 4,
The apparatus, wherein the static analysis subunit analyzes the source code to find code structures with ambiguity and corrects the code structures with ambiguity.

(付記6)
付記5に記載のデータ処理装置であって、
不確定性を有する前記コード構造は、リターン結果がない再帰呼出しのコード構造、無限ループのコード構造、及び指向が不確定な分岐のコード構造のうちの少なくとも1つを含む、装置。
(Appendix 6)
The data processing device according to appendix 5,
The apparatus, wherein the code structure with uncertainty includes at least one of a code structure of a recursive call with no return result, a code structure of an infinite loop, and a code structure of an uncertainly oriented branch.

(付記7)
付記4に記載のデータ処理装置であって、
前記静的コード構造は、順次実行の第一コード構造、指向が固定した分岐の第二コード構造、回数が固定したループの第三コード構造、及びインターフェース関数の第四コード構造のうちの少なくとも1つを含む、装置。
(Appendix 7)
The data processing device according to appendix 4,
The static code structure is at least one of a first code structure for sequential execution, a second code structure for branch with fixed orientation, a third code structure for loop with fixed count, and a fourth code structure for interface function. equipment, including

(付記8)
付記7に記載のデータ処理装置であって、
前記第四コード構造の演算回路制約は事前決定されている、装置。
(Appendix 8)
The data processing device according to appendix 7,
The apparatus, wherein arithmetic circuit constraints of the fourth code structure are predetermined.

(付記9)
付記4に記載のデータ処理装置であって、
前記動的コード構造は、変数を含むアレイの第五コード構造、回数が固定しないループの第六コード構造、指向が固定しない分岐の第七コード構造、及び再帰呼び出しの第八コード構造のうちの少なくとも1つを含む、装置。
(Appendix 9)
The data processing device according to appendix 4,
The dynamic code structure comprises a fifth code structure of an array containing variables, a sixth code structure of a loop with an unfixed count, a seventh code structure of an unfixed branch, and an eighth code structure of a recursive call. An apparatus comprising at least one.

(付記10)
付記4に記載のデータ処理装置であって、
前記動的分析サブユニットは、前記動的コード構造を実行するときに、静的分析サブユニットの静的分析結果を使用して、前記動的コード構造についての演算回路制約を生成する、装置。
(Appendix 10)
The data processing device according to appendix 4,
The apparatus, wherein the dynamic analysis subunit uses static analysis results of the static analysis subunit to generate arithmetic circuit constraints for the dynamic code structure when executing the dynamic code structure.

(付記11)
付記9に記載のデータ処理装置であって、
前記第六コード構造又は前記第八コード構造について、前記ゼロ知識証明生成ユニットは、その演算回路制約に基づく多項式の累積を使用してそのゼロ知識証明とする、装置。
(Appendix 11)
The data processing device according to Appendix 9,
The apparatus, wherein for the sixth code structure or the eighth code structure, the zero-knowledge proof generation unit uses accumulation of polynomials based on the arithmetic circuit constraints to make the zero-knowledge proof.

(付記12)
実行可能なソースコードを、前記ソースコードの実行プロセスの正確性を検証するためのゼロ知識証明に変換するためのデータ処理方法であって、
前記ソースコードを自動で分析して前記ソースコードをコード構造に分解し、そして、前記コード構造を記述する演算回路制約を生成し;及び
前記演算回路制約を使用して前記ゼロ知識証明を生成することを含み、
そのうち、前記ゼロ知識証明は、前記演算回路制約に基づいて形成される多項式によって構築される、方法。
(Appendix 12)
A data processing method for converting executable source code into zero-knowledge proofs for verifying the correctness of an execution process of said source code, comprising:
automatically analyzing the source code to decompose the source code into code structures, and generating arithmetic circuit constraints that describe the code structures; and generating the zero-knowledge proof using the arithmetic circuit constraints. including
A method wherein said zero-knowledge proof is constructed by a polynomial formed based on said arithmetic circuit constraint.

(付記13)
付記12に記載のデータ処理方法であって、
前記ソースコードは、ブロックチェーンアーキテクチャにおいて、アプリケーションに関するデータに対してオフチェーンの事前処理を行うために用いられる、方法。
(Appendix 13)
The data processing method according to Appendix 12,
The method, wherein the source code is used for off-chain pre-processing of data for an application in a blockchain architecture.

(付記14)
付記12に記載のデータ処理方法であって、
前記演算回路制約は、前記ソースコードに含まれる変数の乗法公式の形式を有する、方法。
(Appendix 14)
The data processing method according to Appendix 12,
The method, wherein the arithmetic circuit constraint has the form of a multiplicative formula for variables contained in the source code.

(付記15)
付記12乃至14のうちの何れか1項に記載のデータ処理方法であって、
前記ソースコードを自動で分析して前記ソースコードをコード構造に分解し、そして、前記コード構造を記述する演算回路制約を生成することは、
前記ソースコードの静的コード構造を分析して前記静的コード構造についての演算回路制約を生成し、そのうち、前記静的コード構造は前記ソースコードの実行期間内で不変であり;及び
前記ソースコードの動的コード構造を実行して前記動的コード構造についての演算回路制約を生成し、そのうち、前記動的コード構造は前記ソースコードの実行期間内で変数に応じて動的に変化することを含む、方法。
(Appendix 15)
15. The data processing method according to any one of Appendices 12 to 14,
automatically analyzing the source code to decompose the source code into code structures and generating arithmetic circuit constraints describing the code structures;
analyzing a static code structure of the source code to generate arithmetic circuit constraints for the static code structure, wherein the static code structure is unchanged during execution of the source code; and to generate arithmetic circuit constraints for the dynamic code structure, wherein the dynamic code structure dynamically changes according to variables during execution of the source code including, method.

(付記16)
付記15に記載のデータ処理方法であって、
前記ソースコードの静的コード構造を分析することは、前記ソースコードを分析して不確定性を有するコード構造を見つけ、そして、不確定性を有する前記コード構造を修正することを含む、方法。
(Appendix 16)
The data processing method according to appendix 15,
A method, wherein analyzing static code structures of the source code includes analyzing the source code to find code structures with ambiguity and modifying the code structures with ambiguity.

(付記17)
付記16に記載のデータ処理方法であって、
不確定性を有する前記コード構造は、リターン結果がない再帰呼び出しのコード構造、無限ループのコード構造、及び指向が不確定な分岐のコード構造のうちの少なくとも1つを含む、方法。
(Appendix 17)
The data processing method according to Appendix 16,
The method, wherein the code constructs with uncertainty include at least one of code constructs of recursive calls with no return results, code constructs of infinite loops, and code constructs of undetermined oriented branches.

(付記18)
付記15に記載のデータ処理方法であって、
前記静的コード構造は、順次実行の第一コード構造、指向が固定した分岐の第二コード構造、回数が固定したループの第三コード構造、インターフェース関数の第四コード構造のうちの少なくとも1つを含む、方法。
(Appendix 18)
The data processing method according to appendix 15,
The static code structure is at least one of a first code structure for sequential execution, a second code structure for branch with fixed orientation, a third code structure for loop with fixed count, and a fourth code structure for interface function. A method, including

(付記19)
付記15に記載のデータ処理方法であって、
前記動的コード構造は、変数を含むアレイの第五コード構造、回数が固定しないループの第六コード構造、指向が固定しない分岐の第七コード構造、及び再帰呼び出しの第八コード構造のうちの少なくとも1つを含む、方法。
(Appendix 19)
The data processing method according to appendix 15,
The dynamic code structure comprises a fifth code structure of an array containing variables, a sixth code structure of a loop with an unfixed count, a seventh code structure of an unfixed branch, and an eighth code structure of a recursive call. A method comprising at least one.

(付記20)
コンピュータ可読記憶媒体であって、
プログラムが記憶されており、
前記プログラムは、コンピュータにより実行されるときに、前記コンピュータに、データ処理方法を実行させ、
前記データ処理方法は、実行可能なソースコードを、前記ソースコードの実行プロセスの正確性を検証するためのゼロ知識証明に変換するために用いられ、かつ、
前記ソースコードを自動で分析して前記ソースコードをコード構造に分解し、そして、前記コード構造を記述する演算回路制約を生成し;及び
前記演算回路制約を使用して前記ゼロ知識証明を生成することを含み、
そのうち、前記ゼロ知識証明は、前記演算回路制約に基づいて形成される多項式によって構築される、記憶媒体。
(Appendix 20)
A computer readable storage medium,
the program is stored
the program, when executed by a computer, causes the computer to perform a data processing method;
The data processing method is used to convert executable source code into zero-knowledge proofs for verifying the correctness of an execution process of the source code, and
automatically analyzing the source code to decompose the source code into code structures, and generating arithmetic circuit constraints that describe the code structures; and generating the zero-knowledge proof using the arithmetic circuit constraints. including
A storage medium, wherein the zero-knowledge proof is constructed by a polynomial formed based on the arithmetic circuit constraint.

以上、本発明の好ましい実施形態を説明したが、本発明はこの実施形態に限定されず、本発明の趣旨を離脱しない限り、本発明に対するあらゆる変更は、本発明の技術的範囲に属する。 Although the preferred embodiment of the present invention has been described above, the present invention is not limited to this embodiment, and all modifications to the present invention fall within the technical scope of the present invention as long as they do not depart from the gist of the present invention.

Claims (10)

実行可能なソースコードを、前記ソースコードの実行プロセスの正確性を検証するためのゼロ知識証明に変換するためのデータ処理装置であって、
前記ソースコードを自動で分析して前記ソースコードをコード構造に分解し、前記コード構造を記述する演算回路制約を生成するように構成される演算回路制約生成ユニット;及び
前記演算回路制約を使用して前記ゼロ知識証明を生成するように構成されるゼロ知識証明生成ユニットを含み、
前記ゼロ知識証明は、前記演算回路制約に基づいて形成される多項式によって構築される、データ処理装置。
A data processing apparatus for converting executable source code into zero-knowledge proofs for verifying the correctness of an execution process of said source code, comprising:
an operational circuit constraint generation unit configured to automatically analyze the source code to decompose the source code into code structures and generate operational circuit constraints that describe the code structures; and using the operational circuit constraints. a zero-knowledge proof generation unit configured to generate the zero-knowledge proof in
The data processing device, wherein the zero-knowledge proof is constructed by polynomials formed based on the arithmetic circuit constraints.
請求項1に記載のデータ処理装置であって、
前記ソースコードは、ブロックチェーンアーキテクチャにおいて、アプリケーションに関するデータに対してオフチェーンの事前処理を行うために用いられる、データ処理装置。
The data processing device according to claim 1,
A data processing apparatus, wherein the source code is used to perform off-chain pre-processing on data related to an application in a blockchain architecture.
請求項1に記載のデータ処理装置であって、
前記演算回路制約は、前記ソースコードに含まれる変数の乗法公式の形式を有する、データ処理装置。
The data processing device according to claim 1,
The data processing apparatus, wherein the arithmetic circuit constraint has the form of a multiplication formula for variables contained in the source code.
請求項1乃至3のうちの何れか1項に記載のデータ処理装置であって、
前記演算回路制約生成ユニットは、
前記ソースコードの静的コード構造を分析して前記静的コード構造についての演算回路制約を生成するように構成される静的分析サブユニットであって、前記静的コード構造は前記ソースコードの実行期間内で不変である、静的分析サブユニット;及び
前記ソースコードの動的コード構造を実行して前記動的コード構造についての演算回路制約を生成するように構成される動的分析サブユニットであって、前記動的コード構造は前記ソースコードの実行期間内で変数に応じて動的に変化する、動的分析サブユニットを含む、データ処理装置。
The data processing device according to any one of claims 1 to 3,
The arithmetic circuit constraint generation unit includes:
a static analysis subunit configured to analyze a static code structure of said source code to generate operational circuit constraints for said static code structure, said static code structure being an execution of said source code; a static analysis subunit that is invariant in time; and a dynamic analysis subunit that is configured to execute a dynamic code structure of said source code to generate arithmetic circuit constraints for said dynamic code structure. A data processing apparatus, comprising a dynamic analysis subunit, wherein said dynamic code structure dynamically changes according to variables during execution of said source code.
請求項4に記載のデータ処理装置であって、
前記静的分析サブユニットは、前記ソースコードを分析して不確定性を有するコード構造を見つけ、不確定性を有する前記コード構造を修正する、データ処理装置。
The data processing device according to claim 4,
A data processing apparatus, wherein the static analysis subunit analyzes the source code to find code structures with ambiguity and corrects the code structures with ambiguity.
請求項4に記載のデータ処理装置であって、
前記静的コード構造は、順次実行の第一コード構造、指向が固定した分岐の第二コード構造、回数が固定したループの第三コード構造、及びインターフェース関数の第四コード構造のうちの少なくとも1つを含む、データ処理装置。
The data processing device according to claim 4,
The static code structure is at least one of a first code structure for sequential execution, a second code structure for branch with fixed orientation, a third code structure for loop with fixed count, and a fourth code structure for interface function. data processing equipment, including
請求項4に記載のデータ処理装置であって、
前記動的コード構造は、変数を含むアレイの第五コード構造、回数が固定しないループの第六コード構造、指向が固定しない分岐の第七コード構造、及び再帰呼び出しの第八コード構造のうちの少なくとも1つを含む、データ処理装置。
The data processing device according to claim 4,
The dynamic code structure comprises a fifth code structure of an array containing variables, a sixth code structure of a loop with an unfixed count, a seventh code structure of an unfixed branch, and an eighth code structure of a recursive call. Data processing apparatus, including at least one.
請求項4に記載のデータ処理装置であって、
前記動的分析サブユニットは、前記動的コード構造を実行するときに、静的分析サブユニットの静的分析結果を使用して、前記動的コード構造についての演算回路制約を生成する、データ処理装置。
The data processing device according to claim 4,
data processing, wherein the dynamic analysis subunit uses static analysis results of a static analysis subunit to generate arithmetic circuit constraints for the dynamic code structure when executing the dynamic code structure; Device.
請求項7に記載のデータ処理装置であって、
前記第六コード構造又は前記第八コード構造について、前記ゼロ知識証明生成ユニットは、その演算回路制約に基づく多項式の累積を、そのゼロ知識証明として使用する、データ処理装置。
The data processing device according to claim 7,
A data processing apparatus, wherein for the sixth code structure or the eighth code structure, the zero-knowledge proof generation unit uses the accumulation of polynomials based on its arithmetic circuit constraints as its zero-knowledge proof.
実行可能なソースコードを、前記ソースコードの実行プロセスの正確性を検証するためのゼロ知識証明に変換するためのデータ処理方法であって、
前記ソースコードを自動で分析して前記ソースコードをコード構造に分解し、前記コード構造を記述する演算回路制約を生成し;及び
前記演算回路制約を使用して前記ゼロ知識証明を生成することを含み、
前記ゼロ知識証明は、前記演算回路制約に基づいて形成される多項式によって構築される、データ処理方法。
A data processing method for converting executable source code into zero-knowledge proofs for verifying the correctness of an execution process of said source code, comprising:
automatically analyzing the source code to decompose the source code into code structures, generating arithmetic circuit constraints that describe the code structures; and generating the zero-knowledge proof using the arithmetic circuit constraints. including
A data processing method, wherein the zero-knowledge proof is constructed by a polynomial formed based on the arithmetic circuit constraint.
JP2023007773A 2022-01-28 2023-01-23 Data processing device and data processing method Pending JP2023110884A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210108791.4A CN116560668A (en) 2022-01-28 2022-01-28 Data processing apparatus and data processing method
CN202210108791.4 2022-01-28

Publications (1)

Publication Number Publication Date
JP2023110884A true JP2023110884A (en) 2023-08-09

Family

ID=87490379

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2023007773A Pending JP2023110884A (en) 2022-01-28 2023-01-23 Data processing device and data processing method

Country Status (2)

Country Link
JP (1) JP2023110884A (en)
CN (1) CN116560668A (en)

Also Published As

Publication number Publication date
CN116560668A (en) 2023-08-08

Similar Documents

Publication Publication Date Title
Haghighat Symbolic analysis for parallelizing compilers
US5963739A (en) Method for verifying the total correctness of a program with mutually recursive procedures
US7376547B2 (en) Systems and methods that facilitate quantum computer simulation
Van Dongen et al. Aligning modeled and observed behavior: A compromise between computation complexity and quality
US6553362B2 (en) Case-reduced verification condition generation system and method using weakest precondition operator expressed using strongest postcondition operators
Rocha et al. Model-based test case generation from UML sequence diagrams using extended finite state machines
Fournet et al. A certified compiler for verifiable computing
Börger The ASM method for system design and analysis. A tutorial introduction
Reis et al. Tezla, an intermediate representation for static analysis of michelson smart contracts
Aleeva Designing a parallel programs on the base of the conception of Q-determinant
Darabi et al. A verification technique for deterministic parallel programs
Gomes et al. Generation of co-simulation algorithms subject to simulator contracts
Blech et al. Certifying compilers using higher-order theorem provers as certificate checkers
Sottile et al. Static analysis techniques for semiautomatic synthesis of message passing software skeletons
Namjoshi et al. A self-certifying compilation framework for webassembly
JP2023110884A (en) Data processing device and data processing method
Letychevskyi et al. Algebraic virtual machine project
CN114510414B (en) Method and system for formalized verification of intelligent contract function attribute based on symbol execution
WO2022227869A1 (en) Locate neural network performance hot spots
Lai et al. Defining and verifying behaviour of domain specific language with fUML
US11210087B2 (en) System and method for interprocedural analysis
Kleine Büning et al. Using DimSpec for bounded and unbounded software model checking
Zhang et al. Formal verification of optimizing compilers
Martin et al. Definition of the DISPEL Language
Belyaev et al. LuNA-ICLU compiler for automated generation of iterative fragmented programs