Queries on Encrypted Data Library

Encrypt Command

	encrypt cipher_file msgkey_file pubkey_file hvecontent_file

Description:

Generate cipher text with the public key generated in setup and a specific query input.
Generate a session message key, that can be used to decrypt any auxilary files if the query returns success.


Parameter Files:

  • cipher_file:

  • When encrypt completes, this file will contain a serialized QED cipher text.
    Use this file when calling the query command.

  • msgkey_file:

  • When encrypt completes, this file will contain a serialized QED Message Key. The QED Message Key will contain a 160-bit secret that can be used to generate a symmetric key and used to encrypt auxiliary files. This 160-bit secret can be recovered by the party running query if the query is satisfied. For more information on how to do this, please see QED Internals.

  • pubkey_file
  • This file should have been generated by calling setup.

  • hvecontent_file:

  • Each line of this file will specify the data for a specific sector of the query.

    NOTE:
    If you are not the party that runs the setup algorithm, you will need to get the following information:
  • File containing a serialized QED public key
  • Number of queries, i.e. number of HVE sectors
  • For each sector what type of query it holds



  • Example of hvecontent_file:
    (This example builds on the one given in setup section.)
    C 5 0
    E hello 1
    S foo 2
    

    The above three lines will populate the predefined query as follows:


    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 2
    C 5 0
    E hello 1