summaryrefslogtreecommitdiff
path: root/missing
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-01 06:05:21 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-01 06:05:21 +0000
commit1258bc559b23c2075b8758484736674d0dab8b0d (patch)
tree2275615f8a44942cc66954ff7a67ba7cb4ddde14 /missing
parent9cfc17a210aa1b1fc5ce5dcbffb5783ba1289892 (diff)
downloadruby-1258bc559b23c2075b8758484736674d0dab8b0d.tar.gz
des_tables.c
* missing/crypt_r.c: initialize DES tables statically. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'missing')
-rw-r--r--missing/crypt_r.c116
-rw-r--r--missing/des_tables.c1612
2 files changed, 1723 insertions, 5 deletions
diff --git a/missing/crypt_r.c b/missing/crypt_r.c
index d5a16ac57a..d55937865f 100644
--- a/missing/crypt_r.c
+++ b/missing/crypt_r.c
@@ -149,6 +149,7 @@ permute(const unsigned char *cp, C_block *out, register const C_block *p, int ch
STATIC void prtab(const char *s, const unsigned char *t, int num_rows);
#endif
+#ifdef DUMP
/* ===== (mostly) Standard DES Tables ==================== */
static const unsigned char IP[] = { /* initial permutation */
@@ -186,11 +187,13 @@ static const unsigned char PC1[] = { /* permuted choice table 1 */
14, 6, 61, 53, 45, 37, 29,
21, 13, 5, 28, 20, 12, 4,
};
+#endif
static const unsigned char Rotates[] = { /* PC1 rotation schedule */
1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1,
};
+#ifdef DUMP
/* note: each "row" of PC2 is left-padded with bits that make it invertible */
static const unsigned char PC2[] = { /* permuted choice table 2 */
9, 18, 14, 17, 11, 24, 1, 5,
@@ -285,6 +288,7 @@ static const unsigned char CIFP[] = { /* compressed/interleaved permutation */
41, 42, 43, 44, 57, 58, 59, 60,
45, 46, 47, 48, 61, 62, 63, 64,
};
+#endif
static const unsigned char itoa64[] = /* 0..63 => ascii-64 */
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
@@ -305,6 +309,7 @@ static const unsigned char a64toi[256] = {
A64TOI64(0x00), A64TOI64(0x40),
};
+#ifdef DUMP
/* ===== Tables that are initialized at run time ==================== */
typedef struct {
@@ -327,8 +332,6 @@ typedef struct {
} des_tables_t;
static des_tables_t des_tables[1];
-static const C_block constdatablock; /* encryption constant */
-
#define des_tables ((const des_tables_t *)des_tables)
#define PC1ROT (des_tables->PC1ROT)
#define PC2ROT (des_tables->PC2ROT)
@@ -336,13 +339,20 @@ static const C_block constdatablock; /* encryption constant */
#define SPE (des_tables->SPE)
#define CF6464 (des_tables->CF6464)
+STATIC void init_des(void);
+STATIC void init_perm(C_block perm[64/CHUNKBITS][1<<CHUNKBITS], unsigned char p[64], int chars_in, int chars_out);
+
+#else
+#include "des_tables.c"
+#define init_des() ((void)0)
+#endif
+
+static const C_block constdatablock; /* encryption constant */
+
#define KS (data->KS)
#define cryptresult (data->cryptresult)
#define des_ready (data->initialized)
-STATIC void init_des(void);
-STATIC void init_perm(C_block perm[64/CHUNKBITS][1<<CHUNKBITS], unsigned char p[64], int chars_in, int chars_out);
-
static void des_setkey_r(const unsigned char *key, struct crypt_data *data);
static void des_cipher_r(const unsigned char *in, unsigned char *out, long salt, int num_iter, struct crypt_data *data);
@@ -600,6 +610,7 @@ des_cipher_r(const unsigned char *in, unsigned char *out, long salt, int num_ite
#undef cryptresult
#undef des_ready
+#ifdef DUMP
/*
* Initialize various tables. This need only be done once. It could even be
* done at compile time, if the compiler were capable of that sort of thing.
@@ -764,6 +775,7 @@ init_perm(C_block perm[64/CHUNKBITS][1<<CHUNKBITS],
}
}
}
+#endif
/*
* "setkey" routine (for backwards compatibility)
@@ -840,3 +852,97 @@ prtab(const char *s, const unsigned char *t, int num_rows)
(void)printf("\n");
}
#endif
+
+#ifdef DUMP
+#ifndef numberof
+#define numberof(array) (int )(sizeof(array) / sizeof((array)[0]))
+#endif
+void
+dump_block(const C_block *block)
+{
+ int i;
+ printf("{{");
+ for (i = 0; i < numberof(block->b); ++i) {
+ printf("%3d,", block->b[i]);
+ }
+ printf("}},\n");
+}
+
+int
+main(void)
+{
+ int i, j, k;
+ init_des();
+ printf("/* Initial key schedule permutation */\n");
+ printf("static const C_block PC1ROT[64/CHUNKBITS][1<<CHUNKBITS] = {\n");
+ for (i = 0; i < numberof(PC1ROT); ++i) {
+ printf("\t{\n");
+ for (j = 0; j < numberof(PC1ROT[0]); ++j) {
+ printf("\t\t");
+ dump_block(&PC1ROT[i][j]);
+ }
+ printf("\t},\n");
+ }
+ printf("};\n\n");
+
+ printf("/* Subsequent key schedule rotation permutations */\n");
+ printf("static const C_block PC2ROT[2][64/CHUNKBITS][1<<CHUNKBITS] = {\n");
+ for (i = 0; i < numberof(PC2ROT); ++i) {
+ printf("\t{\n");
+ for (j = 0; j < numberof(PC2ROT[0]); ++j) {
+ printf("\t\t{\n");
+ for (k = 0; k < numberof(PC2ROT[0][0]); ++k) {
+ printf("\t\t\t");
+ dump_block(&PC2ROT[i][j][k]);
+ }
+ printf("\t\t},\n");
+ }
+ printf("\t},\n");
+ }
+ printf("};\n\n");
+
+ printf("/* Initial permutation/expansion table */\n");
+ printf("static const C_block IE3264[32/CHUNKBITS][1<<CHUNKBITS] = {\n");
+ for (i = 0; i < numberof(IE3264); ++i) {
+ printf("\t{\n");
+ for (j = 0; j < numberof(IE3264[0]); ++j) {
+ printf("\t\t");
+ dump_block(&IE3264[i][j]);
+ }
+ printf("\t},\n");
+ }
+ printf("};\n\n");
+
+ printf("/* Table that combines the S, P, and E operations. */\n");
+ printf("static const long SPE[2][8][64] = {\n");
+ for (i = 0; i < numberof(SPE); ++i) {
+ printf("\t{\n");
+ for (j = 0; j < numberof(SPE[0]); ++j) {
+ int r = 0;
+ printf("\t\t{");
+ for (k = 0; k < numberof(SPE[0][0]); ++k) {
+ if (r == 0) printf("\n\t\t\t");
+ printf("%10ld,", SPE[i][j][k]);
+ if (++r == 4) r = 0;
+ }
+ printf("\n\t\t},\n");
+ }
+ printf("\t},\n");
+ }
+ printf("};\n\n");
+
+ printf("/* compressed/interleaved => final permutation table */\n");
+ printf("static const C_block CF6464[64/CHUNKBITS][1<<CHUNKBITS] = {\n");
+ for (i = 0; i < numberof(CF6464); ++i) {
+ printf("\t{\n");
+ for (j = 0; j < numberof(CF6464[0]); ++j) {
+ printf("\t\t");
+ dump_block(&CF6464[i][j]);
+ }
+ printf("\t},\n");
+ }
+ printf("};\n\n");
+
+ return 0;
+}
+#endif
diff --git a/missing/des_tables.c b/missing/des_tables.c
new file mode 100644
index 0000000000..dc04e1b780
--- /dev/null
+++ b/missing/des_tables.c
@@ -0,0 +1,1612 @@
+/* Initial key schedule permutation */
+static const C_block PC1ROT[64/CHUNKBITS][1<<CHUNKBITS] = {
+ {
+ {{ 0, 0, 0, 0, 0, 0, 0, 0,}},
+ {{ 0, 0, 0, 0, 0, 0, 0, 0,}},
+ {{ 0, 0, 1, 0, 0, 0, 0, 0,}},
+ {{ 0, 0, 1, 0, 0, 0, 0, 0,}},
+ {{ 0, 0, 0, 1, 0, 0, 0, 0,}},
+ {{ 0, 0, 0, 1, 0, 0, 0, 0,}},
+ {{ 0, 0, 1, 1, 0, 0, 0, 0,}},
+ {{ 0, 0, 1, 1, 0, 0, 0, 0,}},
+ {{ 0, 0, 0, 0, 0, 16, 0, 0,}},
+ {{ 0, 0, 0, 0, 0, 16, 0, 0,}},
+ {{ 0, 0, 1, 0, 0, 16, 0, 0,}},
+ {{ 0, 0, 1, 0, 0, 16, 0, 0,}},
+ {{ 0, 0, 0, 1, 0, 16, 0, 0,}},
+ {{ 0, 0, 0, 1, 0, 16, 0, 0,}},
+ {{ 0, 0, 1, 1, 0, 16, 0, 0,}},
+ {{ 0, 0, 1, 1, 0, 16, 0, 0,}},
+ },
+ {
+ {{ 0, 0, 0, 0, 0, 0, 0, 0,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0, 36, 32,}},
+ },
+ {
+ {{ 0, 0, 0, 0, 0, 0, 0, 0,}},
+ {{ 32, 0, 0, 0, 0, 0, 0, 0,}},
+ {{ 0, 0, 0, 4, 0, 0, 0, 0,}},
+ {{ 32, 0, 0, 4, 0, 0, 0, 0,}},
+ {{ 0, 0,128, 0, 0, 0, 0, 0,}},
+ {{ 32, 0,128, 0, 0, 0, 0, 0,}},
+ {{ 0, 0,128, 4, 0, 0, 0, 0,}},
+ {{ 32, 0,128, 4, 0, 0, 0, 0,}},
+ {{ 0, 8, 0, 0, 0, 0, 0, 0,}},
+ {{ 32, 8, 0, 0, 0, 0, 0, 0,}},
+ {{ 0, 8, 0, 4, 0, 0, 0, 0,}},
+ {{ 32, 8, 0, 4, 0, 0, 0, 0,}},
+ {{ 0, 8,128, 0, 0, 0, 0, 0,}},
+ {{ 32, 8,128, 0, 0, 0, 0, 0,}},
+ {{ 0, 8,128, 4, 0, 0, 0, 0,}},
+ {{ 32, 8,128, 4, 0, 0, 0, 0,}},
+ },
+};
+
+/* Subsequent key schedule rotation permutations */
+static const C_block PC2ROT[2][64/CHUNKBITS][1<<CHUNKBITS] = {
+ {
+ {
+ {{ 0, 0, 0, 0, 0, 0, 0, 0,}},
+ {{ 0, 0,128, 0, 0, 0, 0, 0,}},
+ {{ 8, 0, 0, 0, 0, 0, 0, 0,}},
+ {{ 8, 0,128, 0, 0, 0, 0, 0,}},
+ {{ 0, 0, 0, 64, 0, 0, 0, 0,}},
+ {{ 0, 0,128, 64, 0, 0, 0, 0,}},
+ {{ 8, 0, 0, 64, 0, 0, 0, 0,}},
+ {{ 8, 0,128, 64, 0, 0, 0, 0,}},
+ {{ 0, 0, 0, 4, 0, 0, 0, 0,}},
+ {{ 0, 0,128, 4, 0, 0, 0, 0,}},
+ {{ 8, 0, 0, 4, 0, 0, 0, 0,}},
+ {{ 8, 0,128, 4, 0, 0, 0, 0,}},
+ {{ 0, 0, 0, 68, 0, 0, 0, 0,}},
+ {{ 0, 0,128,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0, 0, 8, 0, 0,}},
+ {{ 0, 0, 0, 0, 0, 8, 0, 0,}},
+ {{ 0, 0, 0, 0, 0, 8, 0, 0,}},
+ {{ 0, 0, 0, 0, 0, 8, 4, 0,}},
+ {{ 0, 0, 0, 0, 0, 8, 4, 0,}},
+ {{ 0, 0, 0, 0, 0, 8, 4, 0,}},
+ {{ 0, 0, 0, 0, 0, 8, 4, 0,}},
+ },
+ {
+ {{ 0, 0, 0, 0, 0, 0, 0, 0,}},
+ {{ 0, 0, 0, 0, 0,128, 0, 0,}},
+ {{ 0, 0, 0, 0, 0, 0, 64, 0,}},
+ {{ 0, 0, 0, 0, 0,128, 64, 0,}},
+ {{ 0, 0, 0, 0,128, 0, 0, 0,}},
+ {{ 0, 0, 0, 0,128,128, 0, 0,}},
+ {{ 0, 0, 0, 0,128, 0, 64, 0,}},
+ {{ 0, 0, 0, 0,128,128, 64, 0,}},
+ {{ 0, 0, 0, 0, 0, 4, 0, 0,}},
+ {{ 0, 0, 0, 0, 0,132, 0, 0,}},
+ {{ 0, 0, 0, 0, 0, 4, 64, 0,}},
+ {{ 0, 0, 0, 0, 0,132, 64, 0,}},
+ {{ 0, 0, 0, 0,128, 4, 0, 0,}},
+ {{ 0, 0, 0, 0,128,132, 0, 0,}},
+ {{ 0, 0, 0, 0,128, 4, 64, 0,}},
+ {{ 0, 0, 0, 0,128,132, 64, 0,}},
+ },
+ },
+};
+
+/* Initial permutation/expansion table */
+static const C_block IE3264[32/CHUNKBITS][1<<CHUNKBITS] = {
+ {
+ {{ 0, 0, 0, 0, 0, 0, 0, 0,}},
+ {{ 0, 0, 0, 0, 0, 0, 64, 4,}},
+ {{ 4, 0, 0, 0, 0, 0, 0, 64,}},
+ {{ 4, 0, 0, 0, 0, 0, 64, 68,}},
+ {{ 0, 0, 0, 0, 64, 4, 0, 0,}},
+ {{ 0, 0, 0, 0, 64, 4, 64, 4,}},
+ {{ 4, 0, 0, 0, 64, 4, 0, 64,}},
+ {{ 4, 0, 0, 0,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 0, 0,128, 8, 0,128, 8,}},
+ {{ 0, 0, 0,128, 8,128,136, 8,}},
+ {{ 0, 0, 0, 0,128, 8, 0, 0,}},
+ {{ 0, 0, 0, 0,128,136, 8, 0,}},
+ {{ 0, 0, 0, 0,128, 8,128, 8,}},
+ {{ 0, 0, 0, 0,128,136,136, 8,}},
+ {{ 0, 0, 0,128,136, 8, 0, 0,}},
+ {{ 0, 0, 0,128,136,136, 8, 0,}},
+ {{ 0, 0, 0,128,136, 8,128, 8,}},
+ {{ 0, 0, 0,128,136,136,136, 8,}},
+ },
+ {
+ {{ 0, 0, 0, 0, 0, 0, 0, 0,}},
+ {{ 0,128, 8, 0, 0, 0, 0, 0,}},
+ {{ 0, 0,128, 8, 0, 0, 0, 0,}},
+ {{ 0,128,136, 8, 0, 0, 0, 0,}},
+ {{ 8, 0, 0, 0, 0, 0, 0,128,}},
+ {{ 8,128, 8, 0, 0, 0, 0,128,}},
+ {{ 8, 0,128, 8, 0, 0, 0,128,}},
+ {{ 8,128,136, 8, 0, 0, 0,128,}},
+ {{128, 8, 0, 0, 0, 0, 0, 0,}},
+ {{128,136, 8, 0, 0, 0, 0, 0,}},
+ {{128, 8,128, 8, 0, 0, 0, 0,}},
+ {{128,136,136, 8, 0, 0, 0, 0,}},
+ {{136, 8, 0, 0, 0, 0, 0,128,}},
+ {{136,136, 8, 0, 0, 0, 0,128,}},
+ {{136, 8,128, 8, 0, 0, 0,128,}},
+ {{136,136,136, 8, 0, 0, 0,128,}},
+ },
+};
+
+/* Table that combines the S, P, and E operations. */
+static const long SPE[2][8][64] = {
+ {
+ {
+ 2148040704,2147483648, 0,2148040704,
+ 0,2148040704,2147483648, 0,
+ 2148040704,2148040704,2147483648, 557056,
+ 557056, 0, 0,2147483648,
+ 2147483648, 0, 557056,2148040704,
+ 2148040704,2147483648, 557056, 557056,
+ 0, 557056,2148040704,2147483648,
+ 557056, 557056,2147483648, 0,
+ 0,2148040704, 557056,2147483648,
+ 2148040704,2147483648, 557056, 557056,
+ 2147483648, 557056,2148040704, 0,
+ 2148040704, 0, 0,2147483648,
+ 2148040704,2148040704,2147483648, 557056,
+ 0, 557056,2147483648, 0,
+ 2147483648, 0, 557056,2148040704,
+ 0,2147483648, 557056,2148040704,
+ },
+ {
+ 142606352, 0, 142606336, 0,
+ 16, 142606352, 142606336, 142606336,
+ 142606336, 16, 16, 142606336,
+ 16, 142606336, 0, 16,
+ 0, 142606352, 16, 142606336,
+ 142606352, 0, 0, 16,
+ 142606352, 142606352, 142606336, 16,
+ 0, 0, 142606352, 142606352,
+ 16, 142606336, 142606336, 142606352,
+ 142606352, 16, 16, 0,
+ 0, 142606352, 0, 16,
+ 142606336, 0, 142606352, 142606352,
+ 142606336, 142606336, 0, 16,
+ 16, 142606352, 142606336, 0,
+ 16, 0, 142606352, 142606336,
+ 142606352, 16, 0, 142606336,
+ },
+ {
+ 0,1073745920, 4096, 4096,
+ 1073741824, 0, 4096,1073745920,
+ 4096,1073741824,1073741824, 0,
+ 1073745920, 4096, 0,1073741824,
+ 0,1073741824,1073745920, 4096,
+ 4096,1073745920,1073741824, 0,
+ 1073741824, 4096,1073745920,1073741824,
+ 1073745920, 0, 0,1073745920,
+ 1073745920, 4096, 0,1073741824,
+ 4096,1073741824,1073741824, 4096,
+ 0,1073745920,1073745920,1073741824,
+ 1073741824, 0,1073745920, 0,
+ 1073745920, 0, 0,1073745920,
+ 1073741824, 4096, 4096,1073745920,
+ 4096, 0,1073741824, 4096,
+ 0,1073745920, 4096,1073741824,
+ },
+ {
+ 1048584, 1048576, 8, 1048584,
+ 0, 0, 1048584, 8,
+ 1048576, 8, 0, 1048584,
+ 8, 1048584, 0, 0,
+ 8, 1048576, 1048576, 8,
+ 1048576, 1048584, 0, 1048576,
+ 1048584, 0, 8, 1048576,
+ 1048576, 8, 1048584, 0,
+ 8, 1048584, 0, 8,
+ 1048576, 1048576, 8, 0,
+ 1048584, 0, 1048576, 8,
+ 0, 8, 1048576, 1048576,
+ 0, 1048584, 1048584, 0,
+ 1048584, 8, 1048576, 1048584,
+ 8, 1048576, 0, 1048584,
+ 1048584, 0, 8, 1048576,
+ },
+ {
+ 0, 268435456, 278528, 268714016,
+ 268435488, 278528, 268714016, 268435456,
+ 268435456, 32, 32, 268713984,
+ 278560, 268435488, 268713984, 0,
+ 268713984, 0, 268435488, 278560,
+ 278528, 268714016, 0, 32,
+ 32, 278560, 268714016, 268435488,
+ 268435456, 278528, 278560, 268713984,
+ 268713984, 278560, 268435488, 268435456,
+ 268435456, 32, 32, 278528,
+ 0, 268713984, 268714016, 0,
+ 268714016, 0, 278528, 268435488,
+ 278560, 278528, 0, 268714016,
+ 268435488, 268713984, 278560, 268435456,
+ 268713984, 268435488, 278528, 278560,
+ 32, 268714016, 268435456, 32,
+ },
+ {
+ 1088, 1088, 0, 2097152,
+ 1088, 2097152, 2098240, 0,
+ 2098240, 2098240, 2097152, 0,
+ 2097152, 1088, 0, 2098240,
+ 0, 2098240, 1088, 0,
+ 2097152, 1088, 2097152, 1088,
+ 2098240, 0, 0, 2098240,
+ 1088, 2097152, 2098240, 2097152,
+ 2098240, 0, 2097152, 2098240,
+ 2097152, 1088, 0, 2097152,
+ 0, 2097152, 1088, 0,
+ 1088, 2098240, 2097152, 1088,
+ 2098240, 2097152, 0, 2098240,
+ 1088, 0, 2098240, 0,
+ 2097152, 1088, 2098240, 2097152,
+ 0, 2098240, 1088, 1088,
+ },
+ {
+ 71303168, 8192, 8192, 4,
+ 71311364, 71303172, 71311360, 0,
+ 0, 8196, 8196, 71303168,
+ 4, 71311360, 71303168, 8196,
+ 8196, 71303168, 71303172, 71311364,
+ 0, 8192, 4, 71311360,
+ 71303172, 71311364, 71311360, 4,
+ 71311364, 71303172, 8192, 0,
+ 71311364, 71303168, 71303172, 8196,
+ 71303168, 8192, 0, 71303172,
+ 8196, 71311364, 71311360, 0,
+ 8192, 4, 4, 8192,
+ 0, 8196, 8192, 71311360,
+ 8196, 71303168, 71311364, 0,
+ 71311360, 4, 71303172, 71311364,
+ 4, 71311360, 71303168, 71303172,
+ },
+ {
+ 2176, 536870912, 536873088, 0,
+ 536870912, 2176, 0, 536873088,
+ 2176, 0, 536870912, 536873088,
+ 536873088, 536873088, 2176, 0,
+ 536870912, 536873088, 2176, 536870912,
+ 536873088, 2176, 0, 536870912,
+ 0, 0, 536873088, 2176,
+ 0, 536870912, 536870912, 2176,
+ 0, 536870912, 2176, 536873088,
+ 536873088, 0, 0, 536870912,
+ 2176, 536873088, 536870912, 2176,
+ 536870912, 2176, 2176, 536870912,
+ 536873088, 0, 0, 2176,
+ 536870912, 536873088, 536873088, 0,
+ 2176, 536870912, 536873088, 0,
+ 0, 2176, 536870912, 536873088,
+ },
+ },
+ {
+ {
+ 8200, 8, 536879104, 536879112,
+ 8192, 536870920, 536870920, 536879104,
+ 536870920, 8200, 8200, 536870912,
+ 536879104, 8192, 0, 536870920,
+ 8, 536870912, 8192, 8,
+ 536879112, 8200, 536870912, 8192,
+ 536870912, 0, 8, 536879112,
+ 0, 536879104, 536879112, 0,
+ 0, 536879112, 8192, 536870920,
+ 8200, 8, 536870912, 8192,
+ 536879112, 0, 8, 536879104,
+ 536870920, 536870912, 536879104, 8200,
+ 536879112, 8, 8200, 536879104,
+ 8192, 536870912, 536870920, 0,
+ 8, 8192, 536879104, 8200,
+ 536870912, 536879112, 0, 536870920,
+ },
+ {
+ 71303184, 0, 16, 71303184,
+ 71303168, 0, 71303168, 16,
+ 0, 71303184, 0, 71303168,
+ 16, 71303184, 71303184, 0,
+ 16, 71303168, 71303184, 0,
+ 16, 71303168, 0, 16,
+ 71303168, 16, 71303184, 71303168,
+ 71303168, 16, 0, 71303184,
+ 16, 71303184, 71303168, 16,
+ 71303184, 16, 71303168, 0,
+ 71303168, 0, 16, 71303184,
+ 0, 71303168, 16, 71303168,
+ 71303184, 0, 0, 71303168,
+ 0, 71303184, 16, 71303184,
+ 71303184, 16, 0, 71303168,
+ 71303168, 0, 71303184, 16,
+ },
+ {
+ 268713984, 278532, 0, 268713984,
+ 268435460, 278528, 268713984, 4,
+ 278528, 4, 278532, 268435456,
+ 268713988, 268435456, 268435456, 268713988,
+ 0, 268435460, 278532, 0,
+ 268435456, 268713988, 4, 268713984,
+ 268713988, 278528, 268435460, 278532,
+ 4, 0, 278528, 268435460,
+ 278532, 0, 268435456, 4,
+ 268435456, 268435460, 278532, 268713984,
+ 0, 278532, 4, 268713988,
+ 268435460, 278528, 268713988, 268435456,
+ 268435460, 268713984, 278528, 268713988,
+ 4, 278528, 268713984, 4,
+ 278528, 0, 268713988, 268435456,
+ 268713984, 268435460, 0, 278532,
+ },
+ {
+ 2147484736, 1048576,2147483648,2148533312,
+ 0, 1049664,2148532224,2147484736,
+ 1049664,2148532224, 1048576,2147483648,
+ 2148532224,2147484736, 1088, 1048576,
+ 2148533312, 1088, 0,2147483648,
+ 1088,2148532224, 1049664, 0,
+ 2147483648, 0,2147484736, 1049664,
+ 1048576,2148533312,2148533312, 1088,
+ 2148533312,2147483648, 1088,2148532224,
+ 1088, 1048576,2147483648, 1049664,
+ 2148532224, 0, 0,2147484736,
+ 0,2148533312, 1049664, 0,
+ 1048576,2148533312,2147484736, 1088,
+ 2148533312,2147483648, 1048576,2147484736,
+ 2147484736, 1088, 1049664,2148532224,
+ 2147483648, 1048576,2148532224, 1049664,
+ },
+ {
+ 557056, 0, 0, 557056,
+ 557056, 557056, 0, 557056,
+ 0, 0, 557056, 0,
+ 557056, 557056, 557056, 0,
+ 0, 557056, 0, 0,
+ 557056, 0, 0, 557056,
+ 0, 557056, 557056, 0,
+ 557056, 0, 0, 557056,
+ 557056, 557056, 0, 557056,
+ 0, 0, 557056, 557056,
+ 557056, 0, 557056, 0,
+ 0, 557056, 0, 0,
+ 557056, 0, 0, 557056,
+ 557056, 557056, 0, 0,
+ 0, 557056, 557056, 0,
+ 0, 0, 557056, 557056,
+ },
+ {
+ 142606336, 32, 0, 142606368,
+ 32, 0, 142606336, 32,
+ 0, 142606368, 32, 142606336,
+ 142606336, 142606336, 142606368, 32,
+ 32, 142606336, 142606368, 0,
+ 0, 0, 142606368, 142606368,
+ 142606368, 142606368, 142606336, 0,
+ 0, 32, 32, 142606336,
+ 0, 142606336, 142606336, 32,
+ 142606368, 32, 0, 142606336,
+ 142606336, 0, 142606368, 32,
+ 32, 142606368, 32, 0,
+ 142606368, 32, 32, 142606336,
+ 142606336, 142606368, 32, 0,
+ 0, 142606336, 142606336, 142606368,
+ 142606368, 0, 0, 142606368,
+ },
+ {
+ 0, 0, 4096,1073745920,
+ 1073745920,1073741824, 0, 0,
+ 4096,1073745920,1073741824, 4096,
+ 1073741824, 4096, 4096,1073741824,
+ 1073745920, 0,1073741824,1073745920,
+ 0, 4096,1073745920, 0,
+ 1073745920,1073741824, 4096,1073741824,
+ 1073741824,1073745920, 0, 4096,
+ 1073741824, 4096,1073745920,1073741824,
+ 0, 0, 4096,1073745920,
+ 1073745920,1073741824, 0, 0,
+ 0,1073745920,1073741824, 4096,
+ 0,1073745920, 4096, 0,
+ 1073741824, 0,1073745920, 4096,
+ 4096,1073741824,1073741824,1073745920,
+ 1073745920, 4096, 4096,1073741824,
+ },
+ {
+ 2099328, 2099328, 0, 0,
+ 2097152, 2176, 2099328, 2099328,
+ 0, 2097152, 2176, 0,
+ 2176, 2097152, 2097152, 2099328,
+ 0, 2176, 2176, 2097152,
+ 2099328, 2097152, 0, 2176,
+ 2097152, 2176, 2097152, 2099328,
+ 2176, 0, 2099328, 0,
+ 2176, 0, 2097152, 2099328,
+ 0, 2097152, 0, 2176,
+ 2099328, 2097152, 2097152, 2176,
+ 2099328, 0, 2176, 2097152,
+ 2099328, 2176, 2099328, 2097152,
+ 2176, 0, 2097152, 2099328,
+ 0, 2099328, 2176, 0,
+ 2097152, 2099328, 0, 2176,
+ },
+ },
+};
+
+/* compressed/interleaved => final permutation table */
+static const C_block CF6464[64/CHUNKBITS][1<<CHUNKBITS] = {
+ {
+ {{ 0, 0, 0, 0, 0, 0, 0, 0,}},
+ {{ 0, 0, 0, 0, 0, 0,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