AnsweredAssumed Answered

Is STs crypt lib compatible with openssl encrypted content?

Question asked by gisler.hanspeter on Nov 9, 2013
Latest reply on Jul 15, 2015 by Clive One
Hello Everyone,

Does anybody know, how exactly to use STs crypto library (V2.0.6 for STM32F427) such that it behaves / is compatible with openssl?

i.e. generating an encrypted file via:
openssl enc $encryption -p -e -in $inputFile -out $outputFile -K $key -iv $iv

I'm using AES-128-CBC as encryption mode

with e.g.:
iv =1695FB863212FE678E315A313AACAB38

and then trying to decrypt it with the ST library does not seem to work, i.e. the 'clear text' is not clear at all...

What I did so far:
key and iv have been put into a uint8_t array in the order of bytes, as they appear in the hex-strings above, i.e. aKey[] = { 0x80, 0x88, etc. }
Same with IV.

This should work like this, shouldn't it?
Or do I have to swap certain byte / word order?

Your help is very much appreciated.