25 #define _MSB_UINT64_T 0x80000000000000L
32 virtual void XOR(BYTE* out, BYTE* ina, BYTE* inb) = 0;
33 virtual void XOR_DOUBLE_B(BYTE* out, BYTE* ina, BYTE* inb) = 0;
44 void XOR(BYTE* out, BYTE* ina, BYTE* inb) {
45 (((UINT64_T*) (out))[0] = ((UINT64_T*) (ina))[0] ^ ((UINT64_T*) (inb))[0]);
46 (((UINT16_T*) (out))[4] = ((UINT16_T*) (ina))[4] ^ ((UINT16_T*) (inb))[4]);
48 void XOR_DOUBLE_B(BYTE* out, BYTE* ina, BYTE* inb) {
50 (((UINT64_T*) (out))[0] = ((UINT64_T*) (ina))[0] ^ ((UINT64_T*) (inb))[0]<<1);
51 ((UINT16_T*) (out))[4] = ((UINT16_T*) (ina))[4] ^ ((((UINT16_T*) (inb))[4]<<1) ^ (!!(((UINT64_T*) (inb))[0] & _MSB_UINT64_T)));
65 void XOR(BYTE* out, BYTE* ina, BYTE* inb) {
66 (((UINT64_T*) (out))[0] = ((UINT64_T*) (ina))[0] ^ ((UINT64_T*) (inb))[0]);
67 (((UINT32_T*) (out))[3] = ((UINT32_T*) (ina))[3] ^ ((UINT32_T*) (inb))[3]);
69 void XOR_DOUBLE_B(BYTE* out, BYTE* ina, BYTE* inb) {
70 (((UINT64_T*) (out))[0] = ((UINT64_T*) (ina))[0] ^ ((UINT64_T*) (inb))[0]<<1);
71 (((UINT32_T*) (out))[3] = ((UINT32_T*) (ina))[3] ^ ((UINT32_T*) (inb))[3]<<1);
72 (((UINT32_T*) (out))[3] = ((UINT32_T*) (ina))[3] ^ (((UINT32_T*) (inb))[3]<<1) ^ (!!(((UINT64_T*) (inb))[0] & _MSB_UINT64_T)));
81 void XOR(BYTE* out, BYTE* ina, BYTE* inb) {
82 (((UINT64_T*) (out))[0] = ((UINT64_T*) (ina))[0] ^ ((UINT64_T*) (inb))[0]);
83 (((UINT64_T*) (out))[1] = ((UINT64_T*) (ina))[1] ^ ((UINT64_T*) (inb))[1]);
85 void XOR_DOUBLE_B(BYTE* out, BYTE* ina, BYTE* inb) {
86 (((UINT64_T*) (out))[0] = ((UINT64_T*) (ina))[0] ^ ((UINT64_T*) (inb))[0]<<1);
87 (((UINT64_T*) (out))[1] = ((UINT64_T*) (ina))[1] ^ (((UINT64_T*) (inb))[1]<<1) ^ (!!(((UINT64_T*) (inb))[0] & _MSB_UINT64_T)));
97 void XOR(BYTE* out, BYTE* ina, BYTE* inb) {
98 (((UINT64_T*) (out))[0] = ((UINT64_T*) (ina))[0] ^ ((UINT64_T*) (inb))[0]);
99 (((UINT64_T*) (out))[1] = ((UINT64_T*) (ina))[1] ^ ((UINT64_T*) (inb))[1]);
100 (((UINT64_T*) (out))[2] = ((UINT64_T*) (ina))[2] ^ ((UINT64_T*) (inb))[2]);
103 void XOR_DOUBLE_B(BYTE* out, BYTE* ina, BYTE* inb) {
104 (((UINT64_T*) (out))[0] = ((UINT64_T*) (ina))[0] ^ ((UINT64_T*) (inb))[0]<<1);
105 (((UINT64_T*) (out))[1] = ((UINT64_T*) (ina))[1] ^ (((UINT64_T*) (inb))[1]<<1) ^ (!!(((UINT64_T*) (inb))[0] & _MSB_UINT64_T)));
106 (((UINT64_T*) (out))[2] = ((UINT64_T*) (ina))[2] ^ (((UINT64_T*) (inb))[2]<<1) ^ (!!(((UINT64_T*) (inb))[1] & _MSB_UINT64_T)));
117 void XOR(BYTE* out, BYTE* ina, BYTE* inb) {
118 (((UINT64_T*) (out))[0] = ((UINT64_T*) (ina))[0] ^ ((UINT64_T*) (inb))[0]);
119 (((UINT64_T*) (out))[1] = ((UINT64_T*) (ina))[1] ^ ((UINT64_T*) (inb))[1]);
120 (((UINT64_T*) (out))[2] = ((UINT64_T*) (ina))[2] ^ ((UINT64_T*) (inb))[2]);
121 (((UINT64_T*) (out))[3] = ((UINT64_T*) (ina))[3] ^ ((UINT64_T*) (inb))[3]);
123 void XOR_DOUBLE_B(BYTE* out, BYTE* ina, BYTE* inb) {
124 (((UINT64_T*) (out))[0] = ((UINT64_T*) (ina))[0] ^ ((UINT64_T*) (inb))[0]<<1);
125 (((UINT64_T*) (out))[1] = ((UINT64_T*) (ina))[1] ^ (((UINT64_T*) (inb))[1]<<1) ^ (!!(((UINT64_T*) (inb))[0] & _MSB_UINT64_T)));
126 (((UINT64_T*) (out))[2] = ((UINT64_T*) (ina))[2] ^ (((UINT64_T*) (inb))[2]<<1) ^ (!!(((UINT64_T*) (inb))[1] & _MSB_UINT64_T)));
127 (((UINT64_T*) (out))[3] = ((UINT64_T*) (ina))[3] ^ (((UINT64_T*) (inb))[3]<<1) ^ (!!(((UINT64_T*) (inb))[2] & _MSB_UINT64_T)));
131 static void InitYaoKey(
YaoKey** key,
int symbits) {
132 if (symbits == ST.symbits)
134 else if (symbits == MT.symbits)
136 else if (symbits == LT.symbits)
138 else if (symbits == XLT.symbits)
140 else if (symbits == XXLT.symbits)