Currently OP MOD is considered nonstandard in the Bitcoin protocol, but we can for example combine OP SHA1 and OP GREATERTHAN to gain a similar effect.
How can we combine OP_SHA1 and OP_GREATERTHAN to calculate modulus? Or in other words, how can we do the following things using bitcoin scripting:
Start with counter 0, keep adding 1 and stop if OP_GREATERTHAN for
Write counter increments
atimes in clockwise order and modulus is last number.
Example: 8 mod 4 will result in 1 2 3 0 1 2 3 0 which is zero.