#include "des-base.h"
#include "des.h"
#include "des3.h"
+#include "permute.h"
#include "gcipher.h"
/*----- Global variables --------------------------------------------------*/
void des3_eblk(const des3_ctx *k, const uint32 *s, uint32 *d)
{
+#define REGWD 32
+ typedef uint32 regty;
+
uint32 x = s[0], y = s[1];
DES_IP(x, y);
DES_EBLK(k->a.k, x, y, x, y);
DES_EBLK(k->c.k, x, y, x, y);
DES_IPINV(x, y);
d[0] = x, d[1] = y;
+
+#undef REGWD
}
void des3_dblk(const des3_ctx *k, const uint32 *s, uint32 *d)
{
+#define REGWD 32
+ typedef uint32 regty;
+
uint32 x = s[0], y = s[1];
DES_IP(x, y);
DES_DBLK(k->c.k, x, y, x, y);
DES_DBLK(k->a.k, x, y, x, y);
DES_IPINV(x, y);
d[0] = x, d[1] = y;
+
+#undef REGWD
}
BLKC_TEST(DES3, des3)