Lines Matching refs:plain

99 void aes_encrypt(void *ctx, const u8 *plain, u8 *crypt)  in aes_encrypt()  argument
102 aes_ecb_encrypt(plain, crypt, skey); in aes_encrypt()
128 void aes_decrypt(void *ctx, const u8 *crypt, u8 *plain) in aes_decrypt() argument
131 aes_ecb_encrypt(plain, (u8 *) crypt, skey); in aes_decrypt()
350 int crypto_cipher_encrypt(struct crypto_cipher *ctx, const u8 *plain, in crypto_cipher_encrypt() argument
356 if (plain != crypt) in crypto_cipher_encrypt()
357 os_memcpy(crypt, plain, len); in crypto_cipher_encrypt()
364 res = cbc_encrypt(plain, crypt, len, &ctx->u.cbc); in crypto_cipher_encrypt()
375 u8 *plain, size_t len) in crypto_cipher_decrypt() argument
380 if (plain != crypt) in crypto_cipher_decrypt()
381 os_memcpy(plain, crypt, len); in crypto_cipher_decrypt()
383 ctx->u.rc4.used_bytes, plain, len); in crypto_cipher_decrypt()
388 res = cbc_decrypt(crypt, plain, len, &ctx->u.cbc); in crypto_cipher_decrypt()
613 u8 *plain, size_t *plain_len) in crypto_public_key_decrypt_pkcs1() argument
620 res = rsa_exptmod(crypt, crypt_len, plain, &len, PK_PUBLIC, in crypto_public_key_decrypt_pkcs1()
638 plain[0] != 0x00 || plain[1] != 0x01 || plain[2] != 0xff) { in crypto_public_key_decrypt_pkcs1()
644 pos = plain + 3; in crypto_public_key_decrypt_pkcs1()
645 while (pos < plain + len && *pos == 0xff) in crypto_public_key_decrypt_pkcs1()
647 if (pos - plain - 2 < 8) { in crypto_public_key_decrypt_pkcs1()
654 if (pos + 16 /* min hash len */ >= plain + len || *pos != 0x00) { in crypto_public_key_decrypt_pkcs1()
660 len -= pos - plain; in crypto_public_key_decrypt_pkcs1()
663 os_memmove(plain, pos, len); in crypto_public_key_decrypt_pkcs1()