In our s32k project, we want to encrypt/decrypt data by using the aes128cbc of CSEc module, but i don't understand how to import the key bytes to the CSEc modle.
in one user manual, i've noticed that, for security purpose we should not use plaintext key in code but use the derived m1-m5, which means:
1.KDF(plaintext key: "123456789abc"), and output M1/M2/M3/M4/M5, which is irreversible, irreversible, irreversible.
2. load M1-M3 to CSEc,and get M4_/M5_
3. compare M4_/M5_ to M4/M5, if matched,it means the key loadinng success
but,,,,,,how ?why?
since the 1st step mentioned above is irreversible, even if M1//M3 is loaded to CESc, it can not get the original plaintext: "123456789abc", so how does it work to decrypt one cipher packet which is encrypted with the key "123456789abc" in my peer host pc.
Any kind repy is appreciated!