Skip to content

How to generate a circuit containing out-of-circuit or fixed information? #160

Description

@supercrush

I want to generate a simple circuit, which appends a single '0' (out-of-circuit information) at end of the bitstream.

Code:

    Integer in(1,1, ALICE);
    Integer p(1,0,PUBLIC);  //out-of-circuit information
    Integer out(2,0,PUBLIC);
    

    out[0] = in[0];
    out[1] = p[0];
    std::cout << out.reveal<string>(PUBLIC) << std::endl;

generated circuit:

3 4
1 0 2
                                                                                                                                                                                              
2 1 0 0 1 XOR    
2 1 1 0 2 XOR
2 1 1 0 3 XOR

x1 = XOR(x0, x0) // result is 0
x2 = XOR(x1, x0) // result depends on x0
x3 = XOR(x1, x0) // result depends on x0

The output doesn't contain any information of out-of-circuit information. The result of the two outputs x2, x3 is always the same as the input x0 and the out-of-circuit information is missing. What is the correct way to generate a circuit containing out-of-circuit information like appending a fix '0' at the end of the bitstream?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions