Lines Matching full:nonce
71 } nonce; member
72 unsigned int nonce_size; /* nonce bytes filled so far */
498 /* Nonce is passed as first VMAC_NONCEBYTES bytes of data */ in vmac_update()
501 memcpy(&dctx->nonce.bytes[dctx->nonce_size], p, n); in vmac_update()
573 * The VMAC specification requires a nonce at least 1 bit shorter than in vmac_final()
575 * nonce. We define the unused bit to be the first one and require that in vmac_final()
578 if (dctx->nonce.bytes[0] & 0x80) in vmac_final()
584 /* Generate pseudorandom pad by encrypting the nonce */ in vmac_final()
586 index = dctx->nonce.bytes[VMAC_NONCEBYTES - 1] & 1; in vmac_final()
587 dctx->nonce.bytes[VMAC_NONCEBYTES - 1] &= ~1; in vmac_final()
588 crypto_cipher_encrypt_one(tctx->cipher, dctx->nonce.bytes, in vmac_final()
589 dctx->nonce.bytes); in vmac_final()
590 pad = be64_to_cpu(dctx->nonce.pads[index]); in vmac_final()