A + B mod n seems much easier than this.
The method proposed is just A - B mod n. The two are entirely equivalent.
Yup
The method proposed is just A - B mod n. The two are entirely equivalent.