MCPcopy Create free account
hub / github.com/PolyhedraZK/ExpanderCompilerCollection / xor

Function xor

expander_compiler/tests/keccak_gf2_vec.rs:135–142  ·  view source on GitHub ↗
(api: &mut impl RootAPI<C>, a: Vec<Variable>, b: Vec<Variable>)

Source from the content-addressed store, hash-verified

133}
134
135fn xor<C: Config>(api: &mut impl RootAPI<C>, a: Vec<Variable>, b: Vec<Variable>) -> Vec<Variable> {
136 let nbits = a.len();
137 let mut bits_res = vec![api.constant(0); nbits];
138 for i in 0..nbits {
139 bits_res[i] = api.add(a[i].clone(), b[i].clone());
140 }
141 bits_res
142}
143
144fn and<C: Config>(api: &mut impl RootAPI<C>, a: Vec<Variable>, b: Vec<Variable>) -> Vec<Variable> {
145 let nbits = a.len();

Callers 2

xor_inFunction · 0.70
keccak_fFunction · 0.70

Calls 3

lenMethod · 0.45
addMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected