Quadibloc S is a block cipher with a 64-bit block, based on the original QUADIBLOC, but including in its f-function one feature from Quadibloc II, while omitting the use of S-box S2 on the half of the block being modified.

The version with four rounds is being specifically proposed here. Since each f-function involves three table lookups, even this could be considered to be comparable, at least in the time taken, to 12-round DES. That means that six rounds (comparable to 18) would be acceptably fast: but the four round version is being considered specifically to examine what sort of cryptanalytic attacks are possible.

It may be that Quadibloc S with eight rounds, except for the fact of a 64-bit block size, would be secure enough for actual use. Certainly, it should be secure with sixteen rounds, being comparable to original QUADIBLOC. Also, a key schedule is used that should be more secure than that of the original QUADIBLOC, but much less complicated than that of Quadibloc II.

Each round proceeds as follows:

A copy of the right half, which will actually be unchanged by this round, is taken.

This now describes the f-function:

The copy is XORed with the round's first subkey (subkey 1 for round 1, subkey 4 for round 2, to subkey 10 for round 4).

Then, each byte is replaced by its substitute in S-box 1, whose contents are given in the section on Euler's Constant and the Quadibloc S-Boxes.

The bits of the result, considered to be numbered from 1 (most significant bit of the first, leftmost byte) to 32 (least significant bit of the last, rightmost byte) following the pattern in DES, are to be transposed so that these bits are then in the order below, still labelled with their previous positions:

1 2 27 28 21 22 15 16 9 10 3 4 29 30 23 24 17 18 11 12 5 6 31 32 25 26 19 20 13 14 7 8

The result is then XORed with the second subkey for the round. Then, S-box S1 and the bit transposition are applied again, and the result of that is XORed with the third subkey for the round.

Then, the four bytes of the result are replaced with their substitutes in a key-dependent S-box. This produces the final result, which is XORed with the left half of the block. This change to the value of the block is the end product of the round. Finally, in all rounds but the last one, the two halves of the block are swapped.

The operation of a round of Quadibloc S is illustrated by this diagram:

The key consists of four or more bytes.

The first step of key generation is this: appended to the key, after its last byte, is a byte equal to the inverse, the bitwise negation, or one's complement, of the XOR of all the bytes of the original key. This ensures the key as expanded does not consist entirely of zeroes.

Bytes are then generated from the key by chain addition. This means that a byte is generated as follows: the sum, modulo 256, of the first two bytes of the key is the generated result; and it is also appended to the end of the key, whose first byte is then removed. (Note that the cipher itself uses XOR only, and not addition modulo 256.)

The method of producing subkey bytes is a degenerate form of the MacLaren-Marsaglia generator. An array with 256 byte positions, called A(0) to A(255), is filled by generating 256 bytes by means of chain addition.

Then, a subkey byte is generated as follows:

Generate two bytes by chain addition. Call these bytes p and q.

The byte to be used in a subkey is the current value of A(q).

Replace A(q) with p.

The key-dependent S-box is generated concurrently with subkey generation. Two additional arrays, B(0) to B(255) and C(0) to C(255), are used in this process.

These two arrays are initialized so that B(0) contains 0, B(1) contains 1, and so on, and C also contains the 255 byte values in order as well.

Then, each time a value is stored in a location of A, both the 256 initial values, and the value stored in A(q) each time a subkey byte is generated, the following procedure is performed:

Let p be the value being stored in the array A, and let q be the index in A of where it is being stored.

If B(q) equals p, then we are finished.

Otherwise:

Store the value of B(q) in v.

Swap element q and element C(p) of array B. (Element C(p) of array B will equal p.)

Store the value of C(p) in w.

Store q in C(p) (since B(q) now has p stored in it), and store w in C(v) (since our swap placed v, the former value of B(q), in B(w) which originally contained p).

Once all the subkeys are generated, starting from the first (most significant) byte of subkey 1, and ending with the last (least significant) byte of subkey 12, the contents of the array B are used as the key-dependent S-box.

The following is output from a short BASIC program which implements four-round Quadibloc S.

Keys and the block are shown as sequences of bytes, from first to last, represented as decimal numbers from 0 to 255, for simplicity in programming.

Encipherment of an all-zero block with a four-byte all-zero key. Subkeys for the given key are: 1 ) 98 96 250 128 2 ) 239 154 244 76 3 ) 131 160 14 28 4 ) 0 255 116 10 5 ) 215 163 226 153 6 ) 64 16 220 185 7 ) 239 162 182 164 8 ) 127 62 65 112 9 ) 102 221 47 175 10 ) 0 0 255 159 11 ) 21 0 136 184 12 ) 241 165 38 64 The key-dependent S-box contains: 255 63 67 102 181 6 238 9 231 139 89 59 13 253 208 134 66 250 230 254 241 22 246 118 75 170 236 240 200 234 195 148 46 7 74 114 131 50 68 152 92 78 100 202 117 247 227 90 73 141 218 130 164 104 201 179 15 91 228 105 84 190 43 160 21 18 26 232 58 251 83 166 169 226 199 119 177 115 244 77 111 162 137 204 8 248 189 154 38 159 187 225 132 71 39 161 165 198 217 125 110 194 41 155 11 153 51 35 86 25 184 72 252 135 101 211 235 85 23 203 167 242 5 168 120 133 172 124 31 213 107 109 223 140 149 147 122 47 245 49 20 69 237 150 210 174 196 197 138 145 193 54 206 82 99 81 17 129 126 30 188 29 171 96 144 1 128 37 123 176 14 10 143 151 219 3 142 79 16 60 45 221 182 209 76 183 34 94 27 93 70 175 121 65 61 156 19 186 173 28 214 205 103 229 2 192 52 88 56 215 108 220 157 55 243 136 44 207 42 113 180 116 249 32 33 98 106 158 212 222 163 146 185 178 112 53 4 36 62 95 57 12 87 233 239 97 127 40 216 80 224 64 24 0 48 191 Plaintext block is: 0 0 0 0 0 0 0 0 Right half after first subkey is: 98 96 250 128 Right half after first S/P stage: 42 72 142 117 Right half after second subkey is: 197 210 122 57 Right half after second S/P stage: 174 235 31 169 Right half after third subkey is: 45 75 17 181 f-function output: 247 119 250 221 Block after round 1 is: 0 0 0 0 247 119 250 221 Right half after first subkey is: 247 136 142 215 Right half after first S/P stage: 250 22 190 199 Right half after second subkey is: 45 181 92 94 Right half after second S/P stage: 43 0 180 25 Right half after third subkey is: 107 16 104 160 f-function output: 35 66 11 188 Block after round 2 is: 247 119 250 221 35 66 11 188 Right half after first subkey is: 204 224 189 24 Right half after first S/P stage: 55 146 122 31 Right half after second subkey is: 72 172 59 111 Right half after second S/P stage: 150 191 152 23 Right half after third subkey is: 240 98 183 184 f-function output: 57 217 209 76 Block after round 3 is: 35 66 11 188 206 174 43 145 Right half after first subkey is: 206 174 212 14 Right half after first S/P stage: 32 81 143 194 Right half after second subkey is: 53 81 7 122 Right half after second S/P stage: 110 12 227 37 Right half after third subkey is: 159 169 197 101 f-function output: 30 176 186 194 Enciphered block is: 61 242 177 126 206 174 43 145 Encipherment, with the same 32-bit key of all zeroes, of the 64-bit block 0000000000000000000000000000000000000000000000000000000000000001 Plaintext block is: 0 0 0 0 0 0 0 1 Right half after first subkey is: 98 96 250 129 Right half after first S/P stage: 26 64 140 245 Right half after second subkey is: 245 218 120 185 Right half after second S/P stage: 154 185 226 46 Right half after third subkey is: 25 25 236 50 f-function output: 170 170 4 218 Block after round 1 is: 0 0 0 1 170 170 4 218 Right half after first subkey is: 170 85 112 208 Right half after first S/P stage: 52 64 47 151 Right half after second subkey is: 227 227 205 14 Right half after second S/P stage: 39 0 195 243 Right half after third subkey is: 103 16 31 74 f-function output: 155 66 148 199 Block after round 2 is: 170 170 4 218 155 66 148 198 Right half after first subkey is: 116 224 34 98 Right half after first S/P stage: 79 157 125 61 Right half after second subkey is: 48 163 60 77 Right half after second S/P stage: 27 65 178 232 Right half after third subkey is: 125 156 157 71 f-function output: 133 17 129 166 Block after round 3 is: 155 66 148 198 47 187 133 124 Right half after first subkey is: 47 187 122 227 Right half after first S/P stage: 140 227 55 41 Right half after second subkey is: 153 227 191 145 Right half after second S/P stage: 215 41 195 194 Right half after third subkey is: 38 140 229 130 f-function output: 68 20 222 107 Enciphered block is: 223 86 74 173 47 187 133 124 Encipherment of an all-zero block with the key 00000000000000000000000000000001 Subkeys for the given key are: 1 ) 113 110 181 254 2 ) 123 250 8 142 3 ) 80 161 177 11 4 ) 56 251 144 61 5 ) 73 225 29 205 6 ) 181 16 190 1 7 ) 123 179 56 142 8 ) 222 26 255 191 9 ) 67 237 3 76 10 ) 242 175 217 77 11 ) 0 27 125 190 12 ) 222 139 114 248 The key-dependent S-box contains: 15 5 43 125 188 7 209 68 60 63 193 19 221 102 40 2 175 150 159 85 70 146 184 251 151 246 232 104 26 87 157 34 233 243 215 203 95 162 59 56 136 211 164 208 52 0 16 244 35 4 140 99 69 235 30 107 90 138 72 122 117 212 36 83 88 191 49 134 121 183 42 75 222 169 39 163 119 135 62 132 155 128 67 118 80 82 130 247 3 120 139 194 133 160 105 181 1 97 223 57 214 170 110 17 6 154 248 114 38 230 24 237 148 255 54 89 166 147 53 115 204 20 200 219 64 210 152 71 224 182 174 93 185 220 201 250 149 37 179 171 143 186 156 41 58 73 196 234 161 131 213 86 92 245 207 11 231 81 45 153 189 98 126 55 218 195 27 238 112 44 65 111 100 48 18 167 12 10 29 124 47 91 101 226 46 216 252 253 78 206 198 187 144 22 127 173 108 199 14 165 229 239 61 141 9 76 28 225 113 142 84 177 241 197 94 236 137 116 217 66 109 31 190 129 254 106 240 79 202 25 180 178 50 33 205 13 228 21 176 51 74 249 123 227 242 172 145 168 96 192 77 23 8 32 158 103 Plaintext block is: 0 0 0 0 0 0 0 0 Right half after first subkey is: 113 110 181 254 Right half after first S/P stage: 171 207 58 116 Right half after second subkey is: 208 53 50 250 Right half after second S/P stage: 181 120 192 147 Right half after third subkey is: 229 217 113 152 f-function output: 25 116 255 92 Block after round 1 is: 0 0 0 0 25 116 255 92 Right half after first subkey is: 33 143 111 97 Right half after first S/P stage: 109 240 44 94 Right half after second subkey is: 36 17 49 147 Right half after second S/P stage: 158 76 216 205 Right half after third subkey is: 43 92 102 204 f-function output: 208 133 110 9 Block after round 2 is: 25 116 255 92 208 133 110 9 Right half after first subkey is: 171 54 86 135 Right half after first S/P stage: 238 34 203 94 Right half after second subkey is: 48 56 52 225 Right half after second S/P stage: 50 141 65 164 Right half after third subkey is: 113 96 66 232 f-function output: 255 1 49 50 Block after round 3 is: 208 133 110 9 230 117 206 110 Right half after first subkey is: 20 218 23 35 Right half after first S/P stage: 130 158 232 13 Right half after second subkey is: 130 133 149 179 Right half after second S/P stage: 14 74 147 130 Right half after third subkey is: 208 193 225 122 f-function output: 113 22 106 200 Enciphered block is: 161 147 4 193 230 117 206 110

[Next] [Up] [Previous] [Index]

Next

Start of Section

Skip to Next Section

Skip to Next Chapter

Table of Contents

Main Page