Function lbcrypto::ReduceRotation

Function Documentation

uint32_t lbcrypto::ReduceRotation(int32_t index, uint32_t slots)

Ensures that the index for rotation is positive and between 0 and slots - 1.

Parameters
  • index – signed rotation amount.

  • slots – number of slots and size of vector that is rotated.

Returns

the equivalent non-negative rotation index modulo slots