Lines Matching full:plain
100 int aes_encrypt(void *ctx, const u8 *plain, u8 *crypt) in aes_encrypt() argument
103 return aes_ecb_encrypt(plain, crypt, skey) == CRYPT_OK ? 0 : -1; in aes_encrypt()
129 int aes_decrypt(void *ctx, const u8 *crypt, u8 *plain) in aes_decrypt() argument
132 return aes_ecb_encrypt(plain, (u8 *) crypt, skey) == CRYPT_OK ? 0 : -1; in aes_decrypt()
354 int crypto_cipher_encrypt(struct crypto_cipher *ctx, const u8 *plain, in crypto_cipher_encrypt() argument
360 if (plain != crypt) in crypto_cipher_encrypt()
361 os_memcpy(crypt, plain, len); in crypto_cipher_encrypt()
368 res = cbc_encrypt(plain, crypt, len, &ctx->u.cbc); in crypto_cipher_encrypt()
379 u8 *plain, size_t len) in crypto_cipher_decrypt() argument
384 if (plain != crypt) in crypto_cipher_decrypt()
385 os_memcpy(plain, crypt, len); in crypto_cipher_decrypt()
387 ctx->u.rc4.used_bytes, plain, len); in crypto_cipher_decrypt()
392 res = cbc_decrypt(crypt, plain, len, &ctx->u.cbc); in crypto_cipher_decrypt()
617 u8 *plain, size_t *plain_len) in crypto_public_key_decrypt_pkcs1() argument
624 res = rsa_exptmod(crypt, crypt_len, plain, &len, PK_PUBLIC, in crypto_public_key_decrypt_pkcs1()
642 plain[0] != 0x00 || plain[1] != 0x01 || plain[2] != 0xff) { in crypto_public_key_decrypt_pkcs1()
648 pos = plain + 3; in crypto_public_key_decrypt_pkcs1()
649 while (pos < plain + len && *pos == 0xff) in crypto_public_key_decrypt_pkcs1()
651 if (pos - plain - 2 < 8) { in crypto_public_key_decrypt_pkcs1()
658 if (pos + 16 /* min hash len */ >= plain + len || *pos != 0x00) { in crypto_public_key_decrypt_pkcs1()
664 len -= pos - plain; in crypto_public_key_decrypt_pkcs1()
667 os_memmove(plain, pos, len); in crypto_public_key_decrypt_pkcs1()