Lines Matching full:iv
335 static int gcm_encrypt(struct aead_request *req, char *iv, int assoclen) in gcm_encrypt() argument
353 put_unaligned_be32(2, iv + GCM_AES_IV_SIZE); in gcm_encrypt()
374 dg, iv, ctx->aes_key.key_enc, nrounds, in gcm_encrypt()
398 static int gcm_decrypt(struct aead_request *req, char *iv, int assoclen) in gcm_decrypt() argument
419 put_unaligned_be32(2, iv + GCM_AES_IV_SIZE); in gcm_decrypt()
444 dg, iv, ctx->aes_key.key_enc, in gcm_decrypt()
466 u8 iv[AES_BLOCK_SIZE]; in gcm_aes_encrypt() local
468 memcpy(iv, req->iv, GCM_AES_IV_SIZE); in gcm_aes_encrypt()
469 return gcm_encrypt(req, iv, req->assoclen); in gcm_aes_encrypt()
474 u8 iv[AES_BLOCK_SIZE]; in gcm_aes_decrypt() local
476 memcpy(iv, req->iv, GCM_AES_IV_SIZE); in gcm_aes_decrypt()
477 return gcm_decrypt(req, iv, req->assoclen); in gcm_aes_decrypt()
504 u8 iv[AES_BLOCK_SIZE]; in rfc4106_encrypt() local
506 memcpy(iv, ctx->nonce, RFC4106_NONCE_SIZE); in rfc4106_encrypt()
507 memcpy(iv + RFC4106_NONCE_SIZE, req->iv, GCM_RFC4106_IV_SIZE); in rfc4106_encrypt()
510 gcm_encrypt(req, iv, req->assoclen - GCM_RFC4106_IV_SIZE); in rfc4106_encrypt()
517 u8 iv[AES_BLOCK_SIZE]; in rfc4106_decrypt() local
519 memcpy(iv, ctx->nonce, RFC4106_NONCE_SIZE); in rfc4106_decrypt()
520 memcpy(iv + RFC4106_NONCE_SIZE, req->iv, GCM_RFC4106_IV_SIZE); in rfc4106_decrypt()
523 gcm_decrypt(req, iv, req->assoclen - GCM_RFC4106_IV_SIZE); in rfc4106_decrypt()