* \license GPLv3 or later
*
*/
-#ifndef DES_H_
-#define DES_H_
+#ifndef __DES_H_
+#define __DES_H_
+
+#include <stdint.h>
+#include <string.h>
/* the FIPS 46-3 (1999-10-25) name for triple DES is triple data encryption algorithm so TDEA.
* Also we only implement the three key mode */
* \param in pointer to the block (64 bit = 8 byte) where the ciphertext is read from
* \param key pointer to the key (64 bit = 8 byte)
*/
-void des_dec(void* out, const void* in, const void* key);
+//void des_dec(void* out, const void* in, const void* key);
+void des_dec(void* out, const void* in, const uint8_t* key);
/** \fn void tdes_enc(void* out, const void* in, const void* key)
* \brief encrypt a block with Tripple-DES
* \param in pointer to the block (64 bit = 8 byte) where the plaintext is read from
* \param key pointer to the key (192 bit = 24 byte)
*/
-void tdes_enc(void* out, const void* in, const void* key);
+//void tdes_enc(void* out, const void* in, const void* key);
+void tdes_enc(void* out, void* in, const void* key);
/** \fn void tdes_dec(void* out, const void* in, const void* key)
* \brief decrypt a block with Tripple-DES
* \param in pointer to the block (64 bit = 8 byte) where the ciphertext is read from
* \param key pointer to the key (192 bit = 24 byte)
*/
- void tdes_dec(void* out, const void* in, const void* key);
-
+ //void tdes_dec(void* out, const void* in, const void* key);
+ void tdes_dec(void* out, void* in, const uint8_t* key);
+
void tdes_2key_enc(void* out, const void* in, size_t length, const void* key, unsigned char iv[8]);
void tdes_2key_dec(void* out, const void* in, size_t length, const void* key, unsigned char iv[8]);
-#endif /*DES_H_*/
-
// Copied from des.h in desfire imp.
typedef unsigned long DES_KS[16][2]; /* Single-key DES key schedule */
typedef unsigned long DES3_KS[48][2]; /* Triple-DES key schedule */
-
extern int Asmversion; /* 1 if we're linked with an asm version, 0 if C */
+
+#endif /*DES_H_*/