Lines Matching refs:enc
1929 static int test_aead_vec_cfg(const char *driver, int enc, in test_aead_vec_cfg() argument
1941 const char *op = enc ? "encryption" : "decryption"; in test_aead_vec_cfg()
1997 input[1].iov_base = enc ? (void *)vec->ptext : (void *)vec->ctext; in test_aead_vec_cfg()
1998 input[1].iov_len = enc ? vec->plen : vec->clen; in test_aead_vec_cfg()
2000 vec->alen + (enc ? vec->plen : in test_aead_vec_cfg()
2002 vec->alen + (enc ? vec->clen : in test_aead_vec_cfg()
2015 enc ? vec->plen : vec->clen, iv); in test_aead_vec_cfg()
2019 err = enc ? crypto_aead_encrypt(req) : crypto_aead_decrypt(req); in test_aead_vec_cfg()
2025 if (req->cryptlen != (enc ? vec->plen : vec->clen) || in test_aead_vec_cfg()
2036 if (req->cryptlen != (enc ? vec->plen : vec->clen)) in test_aead_vec_cfg()
2095 err = verify_correct_output(&tsgls->dst, enc ? vec->ctext : vec->ptext, in test_aead_vec_cfg()
2096 enc ? vec->clen : vec->plen, in test_aead_vec_cfg()
2097 vec->alen, enc || !cfg->inplace); in test_aead_vec_cfg()
2112 static int test_aead_vec(const char *driver, int enc, in test_aead_vec() argument
2121 if (enc && vec->novrfy) in test_aead_vec()
2127 err = test_aead_vec_cfg(driver, enc, vec, vec_name, in test_aead_vec()
2142 err = test_aead_vec_cfg(driver, enc, vec, vec_name, in test_aead_vec()
2543 static int test_aead(const char *driver, int enc, in test_aead() argument
2552 err = test_aead_vec(driver, enc, &suite->vecs[i], i, req, in test_aead()
2614 static int test_cipher(struct crypto_cipher *tfm, int enc, in test_cipher() argument
2630 if (enc == ENCRYPT) in test_cipher()
2641 input = enc ? template[i].ptext : template[i].ctext; in test_cipher()
2642 result = enc ? template[i].ctext : template[i].ptext; in test_cipher()
2675 if (enc) in test_cipher()
2701 static int test_skcipher_vec_cfg(const char *driver, int enc, in test_skcipher_vec_cfg() argument
2712 const char *op = enc ? "encryption" : "decryption"; in test_skcipher_vec_cfg()
2747 if (vec->generates_iv && !enc) in test_skcipher_vec_cfg()
2763 input.iov_base = enc ? (void *)vec->ptext : (void *)vec->ctext; in test_skcipher_vec_cfg()
2780 err = enc ? crypto_skcipher_encrypt(req) : crypto_skcipher_decrypt(req); in test_skcipher_vec_cfg()
2841 err = verify_correct_output(&tsgls->dst, enc ? vec->ctext : vec->ptext, in test_skcipher_vec_cfg()
2865 static int test_skcipher_vec(const char *driver, int enc, in test_skcipher_vec() argument
2881 err = test_skcipher_vec_cfg(driver, enc, vec, vec_name, in test_skcipher_vec()
2896 err = test_skcipher_vec_cfg(driver, enc, vec, vec_name, in test_skcipher_vec()
3114 static int test_skcipher(const char *driver, int enc, in test_skcipher() argument
3123 err = test_skcipher_vec(driver, enc, &suite->vecs[i], i, req, in test_skcipher()