Lines Matching refs:key_len
336 size_t key_len = EVP_PKEY_size(rsa_key_); in SignUndigested() local
342 if (data_.available_read() > key_len) { in SignUndigested()
344 } else if (data_.available_read() < key_len) { in SignUndigested()
345 keymaster_error_t error = zero_pad_left(&zero_padded, key_len, data_); in SignUndigested()
349 bytes_encrypted = RSA_private_encrypt(key_len, to_encrypt, output->peek_write(), rsa.get(), in SignUndigested()
355 if (data_.available_read() + kPkcs1UndigestedSignaturePaddingOverhead > key_len) { in SignUndigested()
431 size_t key_len = RSA_size(rsa.get()); in VerifyUndigested() local
435 if (data_.available_read() > key_len) return KM_ERROR_INVALID_INPUT_LENGTH; in VerifyUndigested()
436 if (key_len != signature.available_read()) return KM_ERROR_VERIFICATION_FAILED; in VerifyUndigested()
440 if (data_.available_read() + kPkcs1UndigestedSignaturePaddingOverhead > key_len) { in VerifyUndigested()
442 data_.available_read(), key_len * 8); in VerifyUndigested()
451 UniquePtr<uint8_t[]> decrypted_data(new (std::nothrow) uint8_t[key_len]); in VerifyUndigested()