X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/3ad48540d4d77f50cc62d16acb78f17019ef431d..2d42ea1e4dfb86bd9a68bf46354f03a990f85fed:/client/loclass/des.h diff --git a/client/loclass/des.h b/client/loclass/des.h index 907d56b1..460beaf0 100644 --- a/client/loclass/des.h +++ b/client/loclass/des.h @@ -28,7 +28,13 @@ #define POLARSSL_DES_H //#include "config.h" - +/** + * \def POLARSSL_CIPHER_MODE_CBC + * + * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers. + */ +#define POLARSSL_CIPHER_MODE_CBC + #include #if defined(_MSC_VER) && !defined(EFIX64) && !defined(EFI32) @@ -72,6 +78,25 @@ typedef struct uint32_t sk[96]; /*!< 3DES subkeys */ } des3_context; +/* + * Triple-DES key schedule (112-bit, encryption) + */ +int des3_set2key_enc( des3_context *ctx, const unsigned char key[DES_KEY_SIZE * 2] ); + +/* + * Triple-DES key schedule (112-bit, decryption) + */ +int des3_set2key_dec( des3_context *ctx, const unsigned char key[DES_KEY_SIZE * 2] ); + +/* + * Triple-DES key schedule (168-bit, encryption) + */ +int des3_set3key_enc( des3_context *ctx, const unsigned char key[DES_KEY_SIZE * 3] ); + +/* + * Triple-DES key schedule (168-bit, decryption) + */ +int des3_set3key_dec( des3_context *ctx, const unsigned char key[DES_KEY_SIZE * 3] ); /** * \brief Set key parity on the given key to odd.