Fork of François Berder Crypto, fixed AES CBC and small rework
Dependents: AES_example shaun_larada Smartage
Fork of Crypto by
cipher/TDES.h@16:4399e2e6260b, 2015-01-28 (annotated)
- Committer:
- Geremia
- Date:
- Wed Jan 28 17:55:13 2015 +0000
- Revision:
- 16:4399e2e6260b
- Parent:
- 8:a090264e9b2d
AES: bugfixed CBC, added PCBC (i could add CFB and OFB if needed), added public setIV(), moved keyExpansion() to public, in and out buffers can be the same
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
feb11 | 7:2dbbdfb08123 | 1 | #ifndef TDES_H |
feb11 | 7:2dbbdfb08123 | 2 | #define TDES_H |
feb11 | 7:2dbbdfb08123 | 3 | |
feb11 | 8:a090264e9b2d | 4 | #include "DES.h" |
feb11 | 8:a090264e9b2d | 5 | |
feb11 | 8:a090264e9b2d | 6 | class TDES : public BlockCipher |
feb11 | 8:a090264e9b2d | 7 | { |
feb11 | 8:a090264e9b2d | 8 | public : |
feb11 | 8:a090264e9b2d | 9 | |
feb11 | 8:a090264e9b2d | 10 | TDES(uint8_t *key1, uint8_t *key2, uint8_t *key3); |
feb11 | 8:a090264e9b2d | 11 | TDES(uint8_t *key1, uint8_t *key2, uint8_t *key3, uint8_t *iv); |
feb11 | 8:a090264e9b2d | 12 | |
feb11 | 8:a090264e9b2d | 13 | private : |
feb11 | 8:a090264e9b2d | 14 | |
feb11 | 8:a090264e9b2d | 15 | virtual void encryptBlock(uint8_t *out, uint8_t *in); |
feb11 | 8:a090264e9b2d | 16 | virtual void decryptBlock(uint8_t *out, uint8_t *in); |
feb11 | 8:a090264e9b2d | 17 | |
feb11 | 8:a090264e9b2d | 18 | |
feb11 | 8:a090264e9b2d | 19 | DES a,b,c; |
feb11 | 8:a090264e9b2d | 20 | }; |
feb11 | 8:a090264e9b2d | 21 | |
feb11 | 7:2dbbdfb08123 | 22 | #endif |