I provide a tool product and a hardware token for my client. And my server send some messages to command the tool regularly. The tool read the key in the hardware token and verify my message when receive it. The tool will never pass any data to me.
There is a business requirement that the tool be not allowed to send any data. I want to encrypt the messages from server to the tool, its length is less than 100 letters. Encryption efficacy is not important for me.
I'm considering RSA or AES.
AES is a safety Symmetric-key algorithm. However if the hardware token key breachs, my client can send any command to the tool.(Although it is unlikely to happen)
If I use RSA, I can generate two keys, and I see both those as private keys.
I write a key into the Hardware Token for my client and I save anthor key in my server.Even though the hardware token key breachs, my client still can't send any command to the tool.
My client can parse my message at most.So that using RSA is better than AES for me, is it?
Is this a feasible solution? :
I save a fixed hardcode RSA public key in the tool, and write a AES private key into device token for client. And I save a fixed hardcode RSA private key in my server, and save a same AES private key (the same with AES for client) in DB. When semd message from server, encrypt it by AES,then encrypt it by RSA.
So even though the AES key breach, my client still can't send any command to the tool (because RSA). My client can parse my message at most (with using RSA public key and AES private Key).
Thank you!