I am asking about how to implement a large number modulus in TEAL code.
Here I have a number of 256 bits waiting for mod computation. But, TEAL only support uint64, meaning that this size of 256-bit integer is not supported. My primitive idea is to store the number into 4 chunks, where each chunk stores 64 bits. Then, the mod action will be executed by reading & updating the values in the four chunks repeatedly.
Theoretically my large number modulus is feasible, but in practice this might be time costly, and the size of TEAL code will be very large. Is there any easier way to do that task?