File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
tfhe/src/integer/server_key/radix_parallel Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -391,12 +391,13 @@ impl ServerKey {
391
391
}
392
392
BarrelShifterOperation :: LeftRotate => {
393
393
let shifted = ( input << shift_within_block) % self . message_modulus ( ) . 0 ;
394
- let wrapped = input >> ( shift_within_block) ;
394
+ let wrapped = input >> ( message_bits_per_block - shift_within_block) ;
395
395
shifted | wrapped
396
396
}
397
397
BarrelShifterOperation :: RightRotate => {
398
398
let shifted = input >> shift_within_block;
399
- let wrapped = ( input << shift_within_block) % self . message_modulus ( ) . 0 ;
399
+ let wrapped = ( input << ( message_bits_per_block - shift_within_block) )
400
+ % self . message_modulus ( ) . 0 ;
400
401
wrapped | shifted
401
402
}
402
403
BarrelShifterOperation :: RightShift => {
You can’t perform that action at this time.
0 commit comments