I am currently implementing Shamir's ID Based signature scheme as defined in the original paper (archive link). The sign and verify operation are defined as follows:
Sign: $s = g * r^{f(t,m)} (\mod n)$
Verification: $s^e = i * t^{f(t, m)} (\mod n)$
I have some troubles to convert this to Java code, because I am unsure about the order of evaluation, i.e., I am unsure, what the modulus refers to in this context, the hole right hand side (including the multiplication) or the exponentiation operation, only?
PS: This post is related to this question.