cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable the ciphertext stealing of crypto library?

YChen.51
Associate II

Hi all

My cipher text from STM32F429 crypto library(AES-CBC-256) is CTS(Ciphertext Stealing),but the cipher text can'e decrypt by openssl on my PC because the file length is not correct.

What can I do to solve it?

Thanx

1 REPLY 1
Bubbles
ST Employee

Hi @YChen.5​ ,

the usual way to round up the length of a plaintext to a size that is conformant with the cryptographic standard is to use a technique called padding. Look up what padding is recommended in your case. You may probably use zeroes to extend the content to required length.

J

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.