A
A
alsmile2018-02-19 11:19:19
linux
alsmile, 2018-02-19 11:19:19

How is sha256sum calculated when updating YI Lite action camera firmware (LUA disassembly)?

Device or OS, firmware: YI Lite Action Camera, Linux, ARM
I ask for help in disassembling a script written in LUA and understanding the hash sum calculation algorithm. The hash sum itself is SHA-256 and is written in the last 32 bytes of the firmware file itself, but it does not match the sha256sum of the entire file, as well as the file minus the last 32 bytes. Calculated in a tricky way. Below is the update script, in which this is all happening, and a crookedly disassembled file.
1) Source update_sd.lua (LUA, version 5.3)
2) I crookedly disassembled file ( update_sd.lua.txt )

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question