1- Setup Phase
The first phase in our system is the setup phase. This phase should be run by a trusted party.
The setup phase is crucial for generating the necessary cryptographic parameters. During this phase, a trusted party generates public parameters, . We have defined 18 setting classes for our proving system.
Fields utilized in ZKP:
(Goldilock-): where
(Sophie Germain-): a prime number where both p and (2p+1) are prime.
Condition for the field utilized in function-hiding ZKP system:
and
1
2
32
35
4
4 | (1,588,861 -1 ) 35 | (1,588,861 -1 )
2
4
32
37
8
8 | (4,767,673 -1 ) 37 | (4,767,673 -1 )
3
8
32
41
16
16 | (5,087,281 -1 ) 41 | (5,087,281 -1 )
4
16
32
49
32
32 | (2,460,193 -1 ) 49 | (2,460,193 -1 )
5
32
32
65
64
64 | (6,227,521 -1 ) 65 | (6,227,521 -1 )
6
64
32
97
128
128 | (10,243,201 -1 ) 97 | (10,243,201 -1 )
7
128
32
161
256
2,060,801 (Sophie Germain)
256 | (2,060,801 -1 ) 161 | (2,060,801 -1 )
8
256
32
289
512
14,056,961 (Sophie Germain)
512 | (14,056,961 -1 ) 289 | (14,056,961 -1 )
9
512
32
545
1,024
138,403,841 (Sophie Germain)
1,024 | (138,403,841 -1 ) 545 | (138,403,841 -1 )
10
1,024
32
1,057
2,048
270,592,001 (sophie Germain)
2,048 | (270,592,001 -1 ) 1,057 | (270,592,001 -1 )
11
2,048
32
2,081
4,096
272,760,833 (Sophie Germain)
4,096 | (272,760,833 -1 ) 2,081 | (272,760,833 -1 )
12
4,096
32
4,129
8,192
14,071,103,489 (Sophie Germain)
8,192 | (14,071,103,489 -1 ) 4,129 | (14,071,103,489 -1 )
13
8,192
32
8,225
16,384
673,792,001 (Sophie Germain)
16,384 | (673,792,001 -1 ) 8,225 | (673,792,001 -1 )
14
16,384
32
16,417
32,768
59,174,748,161 (Sophie Germain)
32,768 | (59,174,748,16 -1 ) 16,417 | (59,174,748,16 -1 )
15
32,768
32
32,801
65,536
236,461,096,961 (Sophie Germain)
65,536 | (236,461,096,961 -1 ) 32,801 | (236,461,096,961 -1 )
16
65,536
32
65,569
131,072
42,971,299,841 (Sophie Germain)
131,072 | (42,971,299,841 -1 ) 65,569 | (42,971,299,841 -1 )
Function-hiding functional commitment Scheme
Function-hiding functional commitment scheme enables the Prover to commit to a secret function and later without revealing any other information about , proves that for public and . This scheme is a tuple that contains two major phases, proof of function relation (PFR) phase and algebraic holographic proof (AHP) phase.
Major Phase 1 - A proof of function relation (PFR)
A proof of function relation, , shows that a committed relation is a function.
Major Phase 2 - An algebraic holographic proof (AHP)
An algebraic holographic proof, , is scheme where the prover without revealing any information about function , proves that for public and .
Both PFR and AHP will be compiled to a standard interactive protocol using a univariate polynomial commitment, , scheme. A is a commitment scheme for with maximum degree and coefficients in the field . It supports an argument of knowledge for proving the correct evaluation of a committed polynomial at a given point. This scheme is a tuple .
In the following section, we will review the setup phase of our system. We also provide an example to clarify the method.
1-1- PFR and AHP Setup
: This function outputs where is security parameter and the set
where is the maximum supported index size. Also, considering , is the degree bound for polynomial in round of . is the number of rounds in , and . Moreover, considering , is the number of polynomials that the Prover sends to the Verifier in round of . Considering , is the degree bound for polynomial that the Prover sends to the Verifier in round of . is the number of rounds in . Considering , where is the number polynomials that the Prover sends to the Verifier in round of .
Note that and for all , . Also, there are rounds in where in
Round : , for , Round 1: , , , , , , , Round 2: , , , Round 3: , , , Round 4: , and .
Therefore, where is maximum of number of non-zero entries of matrices , and corresponding with arithmetic circuit of function with gates. Also, and are multiplicative subgroups of field with order and , where and is the the size of input . Note that all the computations are in filed with order prime number . is a random number in . Also, are the intermediate values (witness) which are created when executing a program. where is the number of components in input which are changed during the program execution.
For example, if polynomial commitment scheme is used in our scheme, where and are commitment key and verifying key, respectively. Here is a secret element and must be discarded after the . Also, is a generator of field with large prime order such that . Also, is maximum degree of polynomials that wants to be committed.
The above mentioned system is programmed in C++ and Rust. The code is available at: https://github.com/FidesInnova/zkiot
The output of this code are and keys stored in a json file and formatted as below.
1-2- Setup.json File Format
class
: Represents the classification or category of the configuration. In the context of ZKP, this might indicate the number of gates in the ZKP circuit, defining the complexity or size of the cryptographic proof structure.iot_developer_name:
The name of the company or developer responsible for creating and maintaining the IoT solution. This field identifies the entity behind the development of the IoT system.iot_device_name
: The name or model of the IoT device. This uniquely identifies the device within the ecosystem and provides a user-friendly label for reference.device_hardware_version
Specifies the version of the hardware used in the IoT device. This is useful for tracking compatibility, updates, and troubleshooting hardware-related issues.firmware_version
Denotes the version of the firmware installed on the IoT device. Firmware is the software that directly interfaces with the hardware, and this versioning helps manage updates and ensure proper functionality.code_block:
A two-element array representing the starting and ending line numbers in theprogram.s
file. This range defines the specific section of the code for which the ZKP is being generated. This enables granular control over which parts of the program are included in the proof.
References
[1] Function-hiding Paper: Boneh, Dan, Wilson Nguyen, and Alex Ozdemir. "Efficient functional commitments: How to commit to a private function." Cryptology ePrint Archive (2021).
[2] Marlin Paper: Chiesa, A., Hu, Y., Maller, M., Mishra, P., Vesely, N., & Ward, N. (2020). Marlin: Preprocessing zkSNARKs with universal and updatable SRS. In Advances in Cryptology–EUROCRYPT 2020: 39th Annual International Conference on the Theory and Applications of Cryptographic Techniques, Zagreb, Croatia, May 10–14, 2020, Proceedings, Part I 39 (pp. 738-768). Springer International Publishing.
[3] Function-hiding with SIS Paper: de Castro, Leo, and Chris Peikert. "Functional commitments for all functions, with transparent setup and from SIS." Annual International Conference on the Theory and Applications of Cryptographic Techniques. Cham: Springer Nature Switzerland, 2023.
[4] Lookup table Paper: Gabizon, Ariel, and Zachary J. Williamson. "plookup: A simplified polynomial protocol for lookup tables." Cryptology ePrint Archive (2020).
[5] Lattice-based Function-hiding Paper: Wee, Hoeteck, and David J. Wu. "Lattice-based functional commitments: Fast verification and cryptanalysis." International Conference on the Theory and Application of Cryptology and Information Security. Singapore: Springer Nature Singapore, 2023.
[6] KZG Polynomial Commitment: A. Kate, G. M. Zaverucha, and I. Goldberg. Constant-size commitments to polynomials and their applications. In International conference on the theory and application of cryptology and information security, pages 177–194. Springer, 2010.
Last updated