• Home
  • Raw
  • Download

Lines Matching refs:walk

1315 static int ecb_crypt(struct blkcipher_desc *desc, struct blkcipher_walk *walk,  in ecb_crypt()  argument
1324 err = blkcipher_walk_virt(desc, walk); in ecb_crypt()
1326 while ((nbytes = walk->nbytes)) { in ecb_crypt()
1327 u8 *wsrc = walk->src.virt.addr; in ecb_crypt()
1328 u8 *wdst = walk->dst.virt.addr; in ecb_crypt()
1354 err = blkcipher_walk_done(desc, walk, nbytes); in ecb_crypt()
1363 struct blkcipher_walk walk; in ecb_encrypt() local
1365 blkcipher_walk_init(&walk, dst, src, nbytes); in ecb_encrypt()
1366 return ecb_crypt(desc, &walk, camellia_enc_blk, camellia_enc_blk_2way); in ecb_encrypt()
1372 struct blkcipher_walk walk; in ecb_decrypt() local
1374 blkcipher_walk_init(&walk, dst, src, nbytes); in ecb_decrypt()
1375 return ecb_crypt(desc, &walk, camellia_dec_blk, camellia_dec_blk_2way); in ecb_decrypt()
1379 struct blkcipher_walk *walk) in __cbc_encrypt() argument
1383 unsigned int nbytes = walk->nbytes; in __cbc_encrypt()
1384 u128 *src = (u128 *)walk->src.virt.addr; in __cbc_encrypt()
1385 u128 *dst = (u128 *)walk->dst.virt.addr; in __cbc_encrypt()
1386 u128 *iv = (u128 *)walk->iv; in __cbc_encrypt()
1398 u128_xor((u128 *)walk->iv, (u128 *)walk->iv, iv); in __cbc_encrypt()
1405 struct blkcipher_walk walk; in cbc_encrypt() local
1408 blkcipher_walk_init(&walk, dst, src, nbytes); in cbc_encrypt()
1409 err = blkcipher_walk_virt(desc, &walk); in cbc_encrypt()
1411 while ((nbytes = walk.nbytes)) { in cbc_encrypt()
1412 nbytes = __cbc_encrypt(desc, &walk); in cbc_encrypt()
1413 err = blkcipher_walk_done(desc, &walk, nbytes); in cbc_encrypt()
1420 struct blkcipher_walk *walk) in __cbc_decrypt() argument
1424 unsigned int nbytes = walk->nbytes; in __cbc_decrypt()
1425 u128 *src = (u128 *)walk->src.virt.addr; in __cbc_decrypt()
1426 u128 *dst = (u128 *)walk->dst.virt.addr; in __cbc_decrypt()
1476 u128_xor(dst, dst, (u128 *)walk->iv); in __cbc_decrypt()
1477 *(u128 *)walk->iv = last_iv; in __cbc_decrypt()
1485 struct blkcipher_walk walk; in cbc_decrypt() local
1488 blkcipher_walk_init(&walk, dst, src, nbytes); in cbc_decrypt()
1489 err = blkcipher_walk_virt(desc, &walk); in cbc_decrypt()
1491 while ((nbytes = walk.nbytes)) { in cbc_decrypt()
1492 nbytes = __cbc_decrypt(desc, &walk); in cbc_decrypt()
1493 err = blkcipher_walk_done(desc, &walk, nbytes); in cbc_decrypt()
1519 struct blkcipher_walk *walk) in ctr_crypt_final() argument
1523 u8 *src = walk->src.virt.addr; in ctr_crypt_final()
1524 u8 *dst = walk->dst.virt.addr; in ctr_crypt_final()
1525 unsigned int nbytes = walk->nbytes; in ctr_crypt_final()
1529 camellia_enc_blk_xor(ctx, keystream, walk->iv); in ctr_crypt_final()
1532 be128_to_u128(&ctrblk, (be128 *)walk->iv); in ctr_crypt_final()
1534 u128_to_be128((be128 *)walk->iv, &ctrblk); in ctr_crypt_final()
1538 struct blkcipher_walk *walk) in __ctr_crypt() argument
1542 unsigned int nbytes = walk->nbytes; in __ctr_crypt()
1543 u128 *src = (u128 *)walk->src.virt.addr; in __ctr_crypt()
1544 u128 *dst = (u128 *)walk->dst.virt.addr; in __ctr_crypt()
1548 be128_to_u128(&ctrblk, (be128 *)walk->iv); in __ctr_crypt()
1592 u128_to_be128((be128 *)walk->iv, &ctrblk); in __ctr_crypt()
1599 struct blkcipher_walk walk; in ctr_crypt() local
1602 blkcipher_walk_init(&walk, dst, src, nbytes); in ctr_crypt()
1603 err = blkcipher_walk_virt_block(desc, &walk, CAMELLIA_BLOCK_SIZE); in ctr_crypt()
1605 while ((nbytes = walk.nbytes) >= CAMELLIA_BLOCK_SIZE) { in ctr_crypt()
1606 nbytes = __ctr_crypt(desc, &walk); in ctr_crypt()
1607 err = blkcipher_walk_done(desc, &walk, nbytes); in ctr_crypt()
1610 if (walk.nbytes) { in ctr_crypt()
1611 ctr_crypt_final(desc, &walk); in ctr_crypt()
1612 err = blkcipher_walk_done(desc, &walk, 0); in ctr_crypt()