Commit Graph
7 Commits
Author SHA1 Message Date
破娃酱 ea9c7b093a Refine Encryption module (#717)
- use EncryptorInfo struct instead of Dictionary<string, int[]>>
2016-09-13 22:16:37 -05:00
noisyfox e6e9fc8588 Refactor to make OTA code more independent and clear.
and misc changes
2016-09-03 08:57:33 +08:00
noisyfox 4c5376ce0b Remove unnecessary call to InitKey. 2016-09-03 08:57:31 +08:00
Syrone Wong e30487207b Add error message
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-08-17 17:02:30 +08:00
Syrone Wong 8637277c27 Cleanup
- drop unused using directive
- add a comment

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-08-17 15:58:00 +08:00
Syrone Wong 21618ef08d Cleanup
- Drop redundant code.
  I should read code carefully, mbed TLS will set operation
  when invoking mbedtls_cipher_setkey(), the last param
  const mbedtls_operation_t operation is what we want.
- minor changes

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-08-14 22:29:48 +08:00
Syrone Wong 2fafc52def Refine encryption(#655)
* Refine encryption

- Add AES-CTR, blowfish and camellia ciphers

aes-256-ctr
aes-192-ctr
aes-128-ctr
bf-cfb
camellia-128-cfb
camellia-192-cfb
camellia-256-cfb

- Merge the previous PolarSSL and MbedTLS
- Switch to MbedTLS's cipher layer functions
- Add workaround to set cipher operation(encrypt/decrypt)

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>

* Add function to get MbedTLS cipher context size

and drop hard-coded ctx sizes

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-08-13 14:28:09 +08:00