IPLOSTW10KemEngine's problem
Status: Beta
Brought to you by:
adecaro
IPLOSTW10KemEngine upon encryption (in the process method) adds three values to the output (cipher text):
bytes.write(M.toBytes());
bytes.write(c1.toBytes());
bytes.write(c2.toBytes());
During decryption it does not know that there is M before C1 in the cipher text, and it reads M as a first line of C1 using setFromBytes operation. Therefore, values C1 and C2 are read wrongly, and decrypted text is completely different from the original plain text.
Solution: remove "bytes.write(M.toBytes());"