mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-30 08:56:50 -04:00
exercise_key: fix asymmetric encrypt/decrypt with >2028-bit RSA
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
4781bd9773
commit
fdb809ef86
@ -364,8 +364,10 @@ static int exercise_asymmetric_encryption_key(mbedtls_svc_key_id_t key,
|
|||||||
psa_key_usage_t usage,
|
psa_key_usage_t usage,
|
||||||
psa_algorithm_t alg)
|
psa_algorithm_t alg)
|
||||||
{
|
{
|
||||||
unsigned char plaintext[256] = "Hello, world...";
|
unsigned char plaintext[PSA_ASYMMETRIC_ENCRYPT_OUTPUT_MAX_SIZE] =
|
||||||
unsigned char ciphertext[256] = "(wabblewebblewibblewobblewubble)";
|
"Hello, world...";
|
||||||
|
unsigned char ciphertext[PSA_ASYMMETRIC_DECRYPT_OUTPUT_MAX_SIZE] =
|
||||||
|
"(wabblewebblewibblewobblewubble)";
|
||||||
size_t ciphertext_length = sizeof(ciphertext);
|
size_t ciphertext_length = sizeof(ciphertext);
|
||||||
size_t plaintext_length = 16;
|
size_t plaintext_length = 16;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user