the idea is from the paper: https://ieeexplore.ieee.org/document/8966174

L. Keleman, D. Matić, M. Popović and I. Kaštelan, "Secure firmware update in embedded systems," 2019 IEEE 9th International Conference on Consumer Electronics (ICCE-Berlin), Berlin, Germany, 2019, pp. 16-19, doi: 10.1109/ICCE-Berlin47944.2019.8966174.

the codes are written under Python2.7. However, I think I need to convert them to Python3 later....

requirement: pip install pycryptodome