So I want to create a simple, fast and yet secure authentication in two steps for a PC - microcontroller communication.
The first step is a seed request, the second step is an authentication request.
The encryption that is being used is AES-128.
There should be a fixed key k
with a length of 16 bytes.
Whenever a seed request is coming a random 16 bytes authentication message m
should be generated and then be encrypted with k
and sent back to the client as a seed s
.
(NOTE: E(k, m)
will always output the same s
)
The seed s
then should be decrypted with k
by the client and then the original authentication message m
should be sent to the server as an authentication request.
The server compares the auth message m
with the message of the request, and grants access if they are equal or rejects the request otherwise.
Also assume that an adversary can collect as many m
and s
pairs as he wants.
Based on the information above is it feasible to easily break this system or not?