summaryrefslogtreecommitdiff
path: root/utils/imxtools/sbtools/crypto.cpp (follow)
Commit message (Collapse)AuthorAge
* imxtools/sbtools: switch SHA1 implementation to Crypto++Amaury Pouly2017-01-16
| | | | | | | The current implementation was custom and super slow. Since we use Crypto++ anyway, we might as well get use a good implementation. Change-Id: I761ad7401653471e54000e1c2bc3d9882378112f
* imxtools/sbtools: switch AES implementation to Crypto++Amaury Pouly2017-01-16
| | | | | | | | Instead of having our own copy of the AES code, use a good library to do that. Crypto++ is well-maintained, supports a lot of ciphers, works on many OSes, and is optimized for many architectures. Change-Id: I7d7d24b47993206d7338c5f9bac8bbdd3915a667
* imxtools/sbtools: rework cryptographyAmaury Pouly2017-01-16
It was a mess, a mix of crypto_* and cbc_mac calls. I made everything call crypto functions, and also separate key setup from cryptographic operations, this will be useful to speed up the code in the upcoming commits. Drop support for "usbotp" key, since the crypto code for that was never mainlined and we can always get the keys from a device as long as we have code execution (using the DCP debug registers). Change-Id: I7aa24d12207ffb744225d1b9cc7cb1dc7281dd22