I try to use the num-bigint crate to implement such a formula ( ( a ^ b ) % c ), where a, b and c are integers of an arbitrary length and ^ the operation of exponentiation, and % the operation of finding the reminder. But I faced two problems.
- seems num-bigint does not have single function implementing
( ( a ^ b ) % c )optimally - num-bigint is not zero-copy. To make an instance of
BigUintyou need to make a copy of the original dataVec <u8>, and then copy the result again fromBigUinttoVec <u8>.
Is it possible to solve these problems within this module? If not, please advise another module?