diff --git a/src/ext/oblivc/obliv_bits.c b/src/ext/oblivc/obliv_bits.c index cd5ac7c00..ad5891b0a 100644 --- a/src/ext/oblivc/obliv_bits.c +++ b/src/ext/oblivc/obliv_bits.c @@ -2102,8 +2102,12 @@ bool revealOblivBool(bool * dest, __obliv_c__bool src, int party) bool revealOblivBoolArray(bool *dest, const __obliv_c__bool * src, size_t n, int party) { bool rv = true; - for (size_t ii = 0; ii < n; ii++) - { rv &= revealOblivBool(&dest[ii], src[ii], party); } + if(party != 1) + for (size_t ii = 0; ii < n; ii++) + { rv &= revealOblivBool(&dest[ii], src[ii], 2); } + if(party != 2) + for (size_t ii = 0; ii < n; ii++) + { rv &= revealOblivBool(&dest[ii], src[ii], 1); } return rv; }