I should use 
debug_hexdump(stdout, "encrypted message", asym_op->rsa.cipher.data,
                      asym_op->rsa.cipher.length);
to check the encrypted message for the input given?

 

Yes, currently it works this way. The same way output for decryption will be placed in asym_op->rsa.message.data and input in asym_op->rsa.cipher.data.

More explanations can be found in rte_crypto_asym.h file

https://doc.dpdk.org/api/structrte__crypto__rsa__op__param.html.

 

From: Balakrishnan K <Balakrishnan.K1@tatacommunications.com>
Sent: Tuesday, May 24, 2022 7:24 AM
To: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>; users@dpdk.org
Subject: RE: how to use crypto openssl PMD for asymmetric encryption and decryption

 

Hi Arek,

   Thanks for quick response.

I am using resulted output vector to verify the encrypted message.

I thought the encrypted data will be in the asym_op->rsa.message.data after rte_cryptodev_enqueue_burst and rte_cryptodev_enqueue_burst call with operation type RTE_CRYPTO_ASYM_OP_ENCRYPT.
So ,I checked the hex_dump of asym_op->rsa.message.data.
 
Code snippet:
asym_op = result_op->asym;
debug_hexdump(stdout, "encrypted message", asym_op->rsa.message.data,
                      asym_op->rsa.message.length);
 
 
 
Encrypted data will be placed in asym_op->rsa.cipher.data after crypto operation is my understanding is correct ?
I should use 
debug_hexdump(stdout, "encrypted message", asym_op->rsa.cipher.data,
                      asym_op->rsa.cipher.length);
to check the encrypted message for the input given?
 
 
Regards,
Bala 
 

 

From: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>
Sent: 23 May 2022 18:15
To: Balakrishnan K <Balakrishnan.K1@tatacommunications.com>; users@dpdk.org
Subject: RE: how to use crypto openssl PMD for asymmetric encryption and decryption

 

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Hi Bala,

 

Ciphertext will be written into asym_op->rsa.cipher.data (not message.data) by the PMD, here you are using same address for both hex dumps.

Although there is a bug in debug_hexdump in this function which may cause this confusion.

 

Plus, the test you are referring is PWCT test (Pairwise conditional test) -> it will encrypt, then decrypt.

Please take a look into this comment in queue_ops_rsa_enc_dec function:

/* Use the resulted output as decryption Input vector*

So above this line there is an encryption part.

Below is decryption.          

 

Regards,

Arek

 

From: Balakrishnan K <Balakrishnan.K1@tatacommunications.com>
Sent: Monday, May 23, 2022 1:33 PM
To: users@dpdk.org
Subject: how to use crypto openssl PMD for asymmetric encryption and decryption

 

Hi All,

   I am new to dpdk. Planning to use openssl crypto PMD for encrypting/decrypting  the packets.

Couldn’t find much documents on openssl PMD for asymmetric encryption/decryption.

Any one please point me in the right document.

 

I have tried to run the test cases wrote for asymmetric crypto using openssl virtual PMD.

But the output of particular test case is same after the encryption done.

 

File : app/test/test_cryptodev_asym.c

Test executable: ./app/test/dpdk-test

Test case : test_rsa_enc_dec

   

Input given to encryption:              

message at [0x1894e60], len=20

00000000: F8 BA 1A 55 D0 2F 85 AE 96 7B B6 2F B6 CD A8 EB | ...U./...{./....

00000010: 7E 78 A0 50                                     | ~x.P

 

After processing the output also looks like same :

encrypted message exist at [0x1894e60], len=20

00000000: F8 BA 1A 55 D0 2F 85 AE 96 7B B6 2F B6 CD A8 EB | ...U./...{./....

00000010: 7E 78 A0 50

 

 

Regards,

Bala