Lines Matching refs:bit

95 	#error C_block structure assumes 8 bit characters
101 * This avoids use of bit fields (your compiler may be sloppy with them).
108 * define "B64" to be the declaration for a 64 bit integer.
133 * representation is to store one bit per byte in an array of bytes. Bit N of
137 * bit 1 in the MSB of the first byte, but that is particularly noxious so we
138 * bit-reverse each byte so that bit 1 is the LSB of the first byte, bit 8 is
139 * the MSB of the first byte. Specifically, the 64-bit input data and key are
140 * converted to LSB format, and the output 64-bit block is converted back into
148 * the 48 bits are maintained as eight 6 bit groups, one per byte, which
151 * bit 1 of the 48 bit E expansion is stored as the "4"-valued bit of the
152 * first byte in the eight byte representation, bit 2 of the 48 bit value is
153 * the "8"-valued bit, and so on.) In fact, a combined "SPE"-box lookup is
154 * used, in which the output is the 64 bit result of an S-box lookup which
156 * iteration. Two 32-bit wide tables, SPE[0] and SPE[1], are used for this
157 * lookup. Since each byte in the 48 bit path is a multiple of four, indexed
162 * To speed up bit-parallel operations (such as XOR), the 8 byte
163 * representation is "union"ed with 32 bit values "i0" and "i1", and, on
164 * machines which support it, a 64 bit value "b64". This data structure,
175 * 64-bit datatype since the relative order of i0 and i1 are unknown. It
177 * 12 bits can be stored in a 16-bit field with 3 low-order zeroes and 1
178 * high-order zero, providing fast indexing into a 64-bit wide SPE.) On the
179 * other hand, 64-bit datatypes are currently rare, and a 12-bit SPE lookup
185 * 64-bit input. For each byte we give a 64-bit output that has the bits in
189 * table is used which looks up 16 4-bit "chunks" rather than 8 8-bit chunks.
198 * a 32->64 bit transformation, and then collecting the 32 odd-numbered
203 * This is done by two trivial 48->32 bit compressions to obtain
204 * a 64-bit block (the bit numbering is given in the "CIFP" table)
205 * followed by a 64->64 bit "cleanup" transformation. (It would
206 * be possible to group the bits in the 64-bit block so that 2
207 * identical 32->32 bit transformations could be used instead,
213 * This admittedly baroque 64->64 bit transformation is used to
231 * The salting is a simple permutation applied to the 48-bit result of E.
232 * Specifically, if bit i (1 <= i <= 24) of the salt is set then bits i and
233 * i+24 of the result are swapped. The salt is thus a 24 bit number, with
238 * permutation. Fortunately, the conditional bit swapping requires only
247 /* long is often faster than a 32-bit bit field */
261 * Convert twenty-four-bit long in host-order
274 * These macros may someday permit efficient use of 64-bit integers.
384 static unsigned char S[8][64] = { /* 48->32 bit substitution tables */
427 static unsigned char P32Tr[] = { /* 32-bit permutation function */
492 for (k = 0; k < chars_out*8; k++) { /* each output bit position */
493 l = p[k] - 1; /* where this bit comes from */
495 continue; /* output bit is always 0 */
496 i = l>>LGCHUNKBITS; /* which chunk this bit comes from */
497 l = 1<<(l&(CHUNKBITS-1)); /* mask for this bit */
522 * PC1ROT - bit reverse, then PC1, then Rotate, then PC2.
593 * Compression, then final permutation, then bit reverse.
678 * iterations of DES, using the the given 24-bit salt and the pre-computed key