I am trying to implement a security access scheme for Automotive Embedded Systems.I need to be able to generate a Random number(of my desired length), combine it with some secret data to send a Seed/Challenge, generate a Key internally using the same Seed/Challenge as one of the inputs to a function and then be able to compare the received key with the computed key. Could someone help me know whether mbedTLS /PolarSSL library has functions to support me in achieving my objectives? I am new to this topic and there are too many new terms that I do not fully understand.
Summary of my needs:
- Generate a RN of desired length (N1 bytes)
- Seed / Challenge: RN + secret_data1 (N2 bytes)
- Generate Key: f1(Challenge, secret_data2, fixed data bytes) -> N3 bytes
- Compare Key: f2(received key, generated key) -> return SUCCESS / FAILURE
Thank you in advance.