How Pinocchio works

Jun 13 at 10:10 AM
I am a Master student and I am currently carrying out a research on verification of outsourced computation. I have gone through the Pinocchio paper which is quite difficult to understand. I also tried downloading the Pinocchio program and tried to run it on a windows machine but I have not been able to get it working.

Please I am interested in knowing how Pinocchio transforms a simple program to a verifiable one, for example if I write a simple binary search or find program in C and I need to make it verifiable, how does the software modify the code and which extra parameters will be added to make it verifiable? I will be very glad if you can assist me on this.

I am particularly interested in how it transforms this program to make it verifiable:

include<stdio.h>

include<stdlib.h>

include<string.h>

//Our main function.
int main(int argc, char *argv[]) {
    int result, errno;

    if(argc < 3 || argc > 3) {
            Usage(argv[0]);
            exit(1);
    }

    //Use system("cls") on windows
    //Use system("clear") on Unix/Linux
    system("cls");

    result = Search_in_File(argv[1], argv[2]);
    if(result == -1) {
            perror("Error");
            printf("Error number = %d\n", errno);
            exit(1);
    }
    return(0);
}

void Usage(char *filename) {
    printf("Usage: %s <file> <string>\n", filename);
}
Usage(argv[0]);
int Search_in_File(char *fname, char *str) {
    FILE *fp;
    int line_num = 1;
    int find_result = 0;
    char temp[512];

    //gcc users
    //if((fp = fopen(fname, "r")) == NULL) {
    //      return(-1);
    //}

    }       

    while(fgets(temp, 512, fp) != NULL) {
            if((strstr(temp, str)) != NULL) {
                    printf("A match found on line: %d\n", line_num);
}
            line_num++;
    }

    if(find_result == 0) {
            printf("\nSorry, couldn't find a match.\n");
    }

    //Close the file if still open.
    if(fp) {
            fclose(fp);
    }
    return(0);
}
Coordinator
Jun 16 at 1:55 AM
Hi Kolade,

Thanks for your interest in our work. The Pinocchio paper should provide information about the high-level ideas and the implementation. You may want to read the earlier Gennaro et al. EuroCrypt paper (and/or the corresponding tech report on ePrint) for more on the theoretical underpinnings. For the implementation, I would suggest looking through the README, the Wiki, and the code itself to get a better understanding of what’s happening. You can also look at the intermediate files generated from small examples to better understand what’s going on.

-Bryan