Lines Matching refs:d
308 # define block_copy_nn(d, s, l) memcpy(d, s, l) argument
309 # define block_copy(d, s) memcpy(d, s, N_BLOCK) argument
311 # define block_copy_nn(d, s, l) copy_block_nn(d, s, l) argument
312 # define block_copy(d, s) copy_block(d, s) argument
315 static void copy_block( void *d, const void *s ) in copy_block() argument
318 ((uint32_t*)d)[ 0] = ((uint32_t*)s)[ 0]; in copy_block()
319 ((uint32_t*)d)[ 1] = ((uint32_t*)s)[ 1]; in copy_block()
320 ((uint32_t*)d)[ 2] = ((uint32_t*)s)[ 2]; in copy_block()
321 ((uint32_t*)d)[ 3] = ((uint32_t*)s)[ 3]; in copy_block()
323 ((uint8_t*)d)[ 0] = ((uint8_t*)s)[ 0]; in copy_block()
324 ((uint8_t*)d)[ 1] = ((uint8_t*)s)[ 1]; in copy_block()
325 ((uint8_t*)d)[ 2] = ((uint8_t*)s)[ 2]; in copy_block()
326 ((uint8_t*)d)[ 3] = ((uint8_t*)s)[ 3]; in copy_block()
327 ((uint8_t*)d)[ 4] = ((uint8_t*)s)[ 4]; in copy_block()
328 ((uint8_t*)d)[ 5] = ((uint8_t*)s)[ 5]; in copy_block()
329 ((uint8_t*)d)[ 6] = ((uint8_t*)s)[ 6]; in copy_block()
330 ((uint8_t*)d)[ 7] = ((uint8_t*)s)[ 7]; in copy_block()
331 ((uint8_t*)d)[ 8] = ((uint8_t*)s)[ 8]; in copy_block()
332 ((uint8_t*)d)[ 9] = ((uint8_t*)s)[ 9]; in copy_block()
333 ((uint8_t*)d)[10] = ((uint8_t*)s)[10]; in copy_block()
334 ((uint8_t*)d)[11] = ((uint8_t*)s)[11]; in copy_block()
335 ((uint8_t*)d)[12] = ((uint8_t*)s)[12]; in copy_block()
336 ((uint8_t*)d)[13] = ((uint8_t*)s)[13]; in copy_block()
337 ((uint8_t*)d)[14] = ((uint8_t*)s)[14]; in copy_block()
338 ((uint8_t*)d)[15] = ((uint8_t*)s)[15]; in copy_block()
342 static void copy_block_nn( uint8_t * d, const uint8_t *s, uint8_t nn ) in copy_block_nn() argument
346 *d++ = *s++; in copy_block_nn()
349 static void xor_block( void *d, const void *s ) in xor_block() argument
352 ((uint32_t*)d)[ 0] ^= ((uint32_t*)s)[ 0]; in xor_block()
353 ((uint32_t*)d)[ 1] ^= ((uint32_t*)s)[ 1]; in xor_block()
354 ((uint32_t*)d)[ 2] ^= ((uint32_t*)s)[ 2]; in xor_block()
355 ((uint32_t*)d)[ 3] ^= ((uint32_t*)s)[ 3]; in xor_block()
357 ((uint8_t*)d)[ 0] ^= ((uint8_t*)s)[ 0]; in xor_block()
358 ((uint8_t*)d)[ 1] ^= ((uint8_t*)s)[ 1]; in xor_block()
359 ((uint8_t*)d)[ 2] ^= ((uint8_t*)s)[ 2]; in xor_block()
360 ((uint8_t*)d)[ 3] ^= ((uint8_t*)s)[ 3]; in xor_block()
361 ((uint8_t*)d)[ 4] ^= ((uint8_t*)s)[ 4]; in xor_block()
362 ((uint8_t*)d)[ 5] ^= ((uint8_t*)s)[ 5]; in xor_block()
363 ((uint8_t*)d)[ 6] ^= ((uint8_t*)s)[ 6]; in xor_block()
364 ((uint8_t*)d)[ 7] ^= ((uint8_t*)s)[ 7]; in xor_block()
365 ((uint8_t*)d)[ 8] ^= ((uint8_t*)s)[ 8]; in xor_block()
366 ((uint8_t*)d)[ 9] ^= ((uint8_t*)s)[ 9]; in xor_block()
367 ((uint8_t*)d)[10] ^= ((uint8_t*)s)[10]; in xor_block()
368 ((uint8_t*)d)[11] ^= ((uint8_t*)s)[11]; in xor_block()
369 ((uint8_t*)d)[12] ^= ((uint8_t*)s)[12]; in xor_block()
370 ((uint8_t*)d)[13] ^= ((uint8_t*)s)[13]; in xor_block()
371 ((uint8_t*)d)[14] ^= ((uint8_t*)s)[14]; in xor_block()
372 ((uint8_t*)d)[15] ^= ((uint8_t*)s)[15]; in xor_block()
376 static void copy_and_key( void *d, const void *s, const void *k ) in copy_and_key() argument
379 ((uint32_t*)d)[ 0] = ((uint32_t*)s)[ 0] ^ ((uint32_t*)k)[ 0]; in copy_and_key()
380 ((uint32_t*)d)[ 1] = ((uint32_t*)s)[ 1] ^ ((uint32_t*)k)[ 1]; in copy_and_key()
381 ((uint32_t*)d)[ 2] = ((uint32_t*)s)[ 2] ^ ((uint32_t*)k)[ 2]; in copy_and_key()
382 ((uint32_t*)d)[ 3] = ((uint32_t*)s)[ 3] ^ ((uint32_t*)k)[ 3]; in copy_and_key()
384 ((uint8_t*)d)[ 0] = ((uint8_t*)s)[ 0] ^ ((uint8_t*)k)[ 0]; in copy_and_key()
385 ((uint8_t*)d)[ 1] = ((uint8_t*)s)[ 1] ^ ((uint8_t*)k)[ 1]; in copy_and_key()
386 ((uint8_t*)d)[ 2] = ((uint8_t*)s)[ 2] ^ ((uint8_t*)k)[ 2]; in copy_and_key()
387 ((uint8_t*)d)[ 3] = ((uint8_t*)s)[ 3] ^ ((uint8_t*)k)[ 3]; in copy_and_key()
388 ((uint8_t*)d)[ 4] = ((uint8_t*)s)[ 4] ^ ((uint8_t*)k)[ 4]; in copy_and_key()
389 ((uint8_t*)d)[ 5] = ((uint8_t*)s)[ 5] ^ ((uint8_t*)k)[ 5]; in copy_and_key()
390 ((uint8_t*)d)[ 6] = ((uint8_t*)s)[ 6] ^ ((uint8_t*)k)[ 6]; in copy_and_key()
391 ((uint8_t*)d)[ 7] = ((uint8_t*)s)[ 7] ^ ((uint8_t*)k)[ 7]; in copy_and_key()
392 ((uint8_t*)d)[ 8] = ((uint8_t*)s)[ 8] ^ ((uint8_t*)k)[ 8]; in copy_and_key()
393 ((uint8_t*)d)[ 9] = ((uint8_t*)s)[ 9] ^ ((uint8_t*)k)[ 9]; in copy_and_key()
394 ((uint8_t*)d)[10] = ((uint8_t*)s)[10] ^ ((uint8_t*)k)[10]; in copy_and_key()
395 ((uint8_t*)d)[11] = ((uint8_t*)s)[11] ^ ((uint8_t*)k)[11]; in copy_and_key()
396 ((uint8_t*)d)[12] = ((uint8_t*)s)[12] ^ ((uint8_t*)k)[12]; in copy_and_key()
397 ((uint8_t*)d)[13] = ((uint8_t*)s)[13] ^ ((uint8_t*)k)[13]; in copy_and_key()
398 ((uint8_t*)d)[14] = ((uint8_t*)s)[14] ^ ((uint8_t*)k)[14]; in copy_and_key()
399 ((uint8_t*)d)[15] = ((uint8_t*)s)[15] ^ ((uint8_t*)k)[15]; in copy_and_key()
401 block_copy(d, s); in copy_and_key()
402 xor_block(d, k); in copy_and_key()
406 static void add_round_key( uint8_t d[N_BLOCK], const uint8_t k[N_BLOCK] ) in add_round_key()
408 xor_block(d, k); in add_round_key()