skerkour / kerkour.com

(Ab)using technology for fun & profit. Programming, Hacking & Entrepreneurship @ https://kerkour.com
https://kerkour.com
Apache License 2.0
463 stars 63 forks source link

Logic in streaming decryption isn't quite right #6

Closed itamarst closed 2 years ago

itamarst commented 2 years ago

In particular, at https://github.com/skerkour/kerkour.com/blob/main/2021/rust_file_encryption/src/main.rs#L147, if original file size was exactly multiple of 500, the code won't identify the last chunk correctly.

Thanks for your helpful articles!

sylvain101010 commented 2 years ago

Good catch, it's now fixed :)