|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSFE.BOAL.Circuit
SFE.PF.UC
SFE.PF.UCsel
public class UCsel
Universal Circuit based on selection blocks.
sizeof(UCsel) = k^2 + k ( 2 u + v - 2 ) - v As this UC construction grows quadratically in k it is only useful for k < 1000 ! However it is good for demonstration purposes because of very simple construction. For the i-th gate (i=1..k) select for each of the two gate inputs the corresponding input value with a selection block that selects from all inputs and the outputs of previous k g < i. For each output select the corresponding of the k outputs of all k with a selection block.
Field Summary |
---|
Fields inherited from class SFE.PF.UC |
---|
Ggates, Xgates, Ygates |
Constructor Summary | |
---|---|
UCsel()
|
Method Summary | |
---|---|
int |
countGates()
Count number of gates of UC. |
int |
estimateGates(int ins,
int outs,
int k)
Estimate number of gates of UC. |
Gate[] |
extractCircuit(Gate[] outputs)
Extract circuit representation of UC. |
void |
generate(int u,
int v,
int k)
Generate UC for circuit of given shape. |
void |
program(int[] ins,
int[] outs,
SFE.PF.ParseGate[] parsegates)
Program UC with given circuit. |
Methods inherited from class SFE.PF.UC |
---|
generateEncCircuit, generateUC, translateIO |
Methods inherited from class SFE.BOAL.Circuit |
---|
addGate, cextractEncPayload, cextractSecPayload, cinjectEncPayload, cinjectSecPayload, cmeasureEncPayload, cmeasureSecPayload, evalCircuit, evalGarbledCircuit, getGate, isCorrect, printCircuit |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UCsel()
Method Detail |
---|
public int countGates()
UC
countGates
in class UC
public int estimateGates(int ins, int outs, int k)
UC
estimateGates
in class UC
ins
- #inputsouts
- #outputsk
- #gates of circuit
public Gate[] extractCircuit(Gate[] outputs)
UC
extractCircuit
in class UC
public void generate(int u, int v, int k)
UC
generate
in class UC
u
- #inputsv
- #outputsk
- #gatespublic void program(int[] ins, int[] outs, SFE.PF.ParseGate[] parsegates)
UC
program
in class UC
ins
- inputsouts
- outputsparsegates
- gates of circuit
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |