Modular Arithmetic order of operations In an assignment, I am given $E_K(M) = M + K \pmod {26}$. This formula is to be applied twice in a formal proof, so that we have $E_a(E_b(M)) =\ ...$. What I'm wondering is; is the original given formula equal to $(M + K)\pmod{26}$, or $M + (K \mod{26})$? This will obviously make a big difference down the line.
I do suspect the first ($(M + K)\pmod{26}$), however I want to be certain before I move forward in my proof.
NB: I did not tag this as homework as this is not actually part of the problem, rather just a clarification.

I suspect that what is meant is $(M+K)\bmod 26$, where $\bmod$ is the operator, especially if this is in a cryptographic context. More careful writers reserve the parenthesized notation $\pmod{26}$ for the relation of congruence modulo $26$, using it only in connection with $\equiv$, as in $27\equiv 53\pmod{26}$.
Thus, if $M=K=27$, the intended result is probably $54\bmod 26=2$, not $27+(27\bmod 26)=28$.
