Lines Matching refs:plain
51 static int test_lib_chacha(u8 *revert, u8 *cipher, u8 *plain) in test_lib_chacha() argument
72 chacha_crypt_arch(chacha_state, cipher, plain, data_size, 20); in test_lib_chacha()
126 static int test_skcipher(char *name, u8 *revert, u8 *cipher, u8 *plain) in test_skcipher() argument
173 sg_init_one(&sk.sginp, plain, data_size); in test_skcipher()
238 u8 *plain = NULL, *revert = NULL; in chacha_s390_test_init() local
246 plain = vmalloc(data_size); in chacha_s390_test_init()
247 if (!plain) { in chacha_s390_test_init()
252 memset(plain, 'a', data_size); in chacha_s390_test_init()
253 get_random_bytes(plain, (data_size > 256 ? 256 : data_size)); in chacha_s390_test_init()
278 16, 1, plain, in chacha_s390_test_init()
282 ret = test_skcipher("chacha20-generic", revert, cipher_generic, plain); in chacha_s390_test_init()
286 if (memcmp(plain, revert, data_size)) { in chacha_s390_test_init()
297 ret = test_skcipher("chacha20-s390", revert, cipher_s390, plain); in chacha_s390_test_init()
301 if (memcmp(plain, revert, data_size)) { in chacha_s390_test_init()
321 test_lib_chacha(revert, cipher_s390, plain); in chacha_s390_test_init()
323 if (memcmp(plain, revert, data_size)) { in chacha_s390_test_init()
342 if (plain) in chacha_s390_test_init()
343 vfree(plain); in chacha_s390_test_init()