Question
Is STs crypt lib compatible with openssl encrypted content?
Posted on November 09, 2013 at 13:03
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 $ivI'm using AES-128-CBC as encryption modewith e.g.:key=80880964C96E0420BD76097325E90C72iv =1695FB863212FE678E315A313AACAB38and 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.RegardsHanspeter #stm32f4 #crypto