I am working on a IoT project where I am trying to perform manual handshake (SSL) for certificates and sending data to the server securely using HTTPS POST method.
RSA is used for sending Pre-master Secret from client to the server.
I want to know how client or server calculate AES key from:
- Pre master secret (32 bytes)
- Client random (32 bytes)
- Server random (32 bytes)
there are few posts which claims that it is being created by using
I wish C language works in this, but I dont have the PRF function body.
Does anyone have a code for the PRF, or is there any onther way for creating AES key at client side?
Also I would like to know the real use of SHA1/256 in TLS handshake.
Justification with example would be a real help.
I know realise that we ourselves won't derive AES algorithm keys.
But to work with AES one must have MasterKey, which can be derived from ( pre Master, client random and server random ) in TLS 1.3.
So I am stuck on the process of getting masterKey from the above parameters.
And even https://tls.ulfheim.net doesn't document the key derivation process using the pre-master secret and the two
hellos for TLS 1.2 (or TLS 1.3).