Lines Matching refs:enc
1920 static int test_aead_vec_cfg(int enc, const struct aead_testvec *vec, in test_aead_vec_cfg() argument
1932 const char *op = enc ? "encryption" : "decryption"; in test_aead_vec_cfg()
1988 input[1].iov_base = enc ? (void *)vec->ptext : (void *)vec->ctext; in test_aead_vec_cfg()
1989 input[1].iov_len = enc ? vec->plen : vec->clen; in test_aead_vec_cfg()
1991 vec->alen + (enc ? vec->plen : in test_aead_vec_cfg()
1993 vec->alen + (enc ? vec->clen : in test_aead_vec_cfg()
2006 enc ? vec->plen : vec->clen, iv); in test_aead_vec_cfg()
2010 err = enc ? crypto_aead_encrypt(req) : crypto_aead_decrypt(req); in test_aead_vec_cfg()
2016 if (req->cryptlen != (enc ? vec->plen : vec->clen) || in test_aead_vec_cfg()
2027 if (req->cryptlen != (enc ? vec->plen : vec->clen)) in test_aead_vec_cfg()
2086 err = verify_correct_output(&tsgls->dst, enc ? vec->ctext : vec->ptext, in test_aead_vec_cfg()
2087 enc ? vec->clen : vec->plen, in test_aead_vec_cfg()
2088 vec->alen, enc || !cfg->inplace); in test_aead_vec_cfg()
2103 static int test_aead_vec(int enc, const struct aead_testvec *vec, in test_aead_vec() argument
2111 if (enc && vec->novrfy) in test_aead_vec()
2117 err = test_aead_vec_cfg(enc, vec, vec_name, in test_aead_vec()
2132 err = test_aead_vec_cfg(enc, vec, vec_name, in test_aead_vec()
2529 static int test_aead(int enc, const struct aead_test_suite *suite, in test_aead() argument
2537 err = test_aead_vec(enc, &suite->vecs[i], i, req, tsgls); in test_aead()
2599 static int test_cipher(struct crypto_cipher *tfm, int enc, in test_cipher() argument
2615 if (enc == ENCRYPT) in test_cipher()
2626 input = enc ? template[i].ptext : template[i].ctext; in test_cipher()
2627 result = enc ? template[i].ctext : template[i].ptext; in test_cipher()
2660 if (enc) in test_cipher()
2686 static int test_skcipher_vec_cfg(int enc, const struct cipher_testvec *vec, in test_skcipher_vec_cfg() argument
2697 const char *op = enc ? "encryption" : "decryption"; in test_skcipher_vec_cfg()
2732 if (vec->generates_iv && !enc) in test_skcipher_vec_cfg()
2748 input.iov_base = enc ? (void *)vec->ptext : (void *)vec->ctext; in test_skcipher_vec_cfg()
2765 err = enc ? crypto_skcipher_encrypt(req) : crypto_skcipher_decrypt(req); in test_skcipher_vec_cfg()
2826 err = verify_correct_output(&tsgls->dst, enc ? vec->ctext : vec->ptext, in test_skcipher_vec_cfg()
2850 static int test_skcipher_vec(int enc, const struct cipher_testvec *vec, in test_skcipher_vec() argument
2865 err = test_skcipher_vec_cfg(enc, vec, vec_name, in test_skcipher_vec()
2880 err = test_skcipher_vec_cfg(enc, vec, vec_name, in test_skcipher_vec()
3097 static int test_skcipher(int enc, const struct cipher_test_suite *suite, in test_skcipher() argument
3105 err = test_skcipher_vec(enc, &suite->vecs[i], i, req, tsgls); in test_skcipher()