What would be the proper order of operations for OTP encryption/decryption when using subtraction and mod 10? E.g. P - K = C or K - P = C
Most of the sources I have seen do not cover this topic or I didn't grasp the principles behind this encryption well enough. From what I gather it shouldn't matter as long as the pad key numbers (K) are truly random.
PLAINCODE: 65417 OTP PAD(-): 47757 ----------------- CIPHER: 28760
EDIT: From some tests I see that. When used for encryption, whether P + K or K + P to decrypt the original message you need to do C - K, otherwise K - C will not return P. When used for encryption, P - K since C + K will return P, otherwise K + C will not return the original plaincode.
Can someone please explain whether using subtraction or addition for encryption one has a security advantage over the other.