Gentoken Command
gentoken token_file privkey_file hvecontent_file
Description:
Generate a query token with the private key generated in setup and a specific query input.
Parameter Files:
When gentoken completes, this file will contain a serialized QED token.
Use this file when calling the query command.
This file should have been generated by calling setup.
Each line of this file will specify the data for a specific sector of the query.
- For Comparison Query at sector n and integer value v to compare against:
C [v] [n]
E [str] [n]
S [str1] [str2] ... [n]
NOTE:
- Setup determins the number, order and type of query in each HVE sector
- Each query must end with a sector index; the index starts at 0
- Comparison type query takes only postive integer values
- Equality type query takes only string values
- Subset type query takes only string values
- Leaving a sector unpopulated, is equivalent to accepting any value for that sector during encryption
If you are not the party that runs the setup algorithm, you will need to get the following information:
Example of hvecontent_file:
(This example builds on the one given in setup section.)
C 3 0 E hello 1 S foo bar 2
The above three lines will populate the predefined query as follows:
- The first sector is a comparison query populated with the value 3. The query will return success only if the value provided in the encryption is larger than 3.
- The second sector is an equality query populated with the value "hello". The query will return success only if the value provided in the encryption is the same as "hello".
- The third sector is a subset query populated with the values "foo" and "bar". The query will return success only if the value provided in the encryption is "foo" and/or "bar".
NOTE: The three lines in the hvecontent_file can be written in any order, as long as the sector index, i.e. the last integer value in each line, is kept the same. For example the following will also work:
S foo bar 2 C 3 0 E hello 1