Safest Public Key Exchange Algorithm

Hello,

I’m going to communicate with an Arduino via the COM port on a desktop application I’m developing. The information transferred is going to be confidential so i need to use a public key cryptography algorithm to share keys to have a encrypted connection.

The question is simple: what is the safest or most preferred public key exchange algorithm.

NOTE:

I was going to use the normal Diffie-Hellman key exchange algorithm but then my friend said “You are using Elliptic-curve cryptography right?” so now I’m not sure what is safe or suitable.

IMPORTANT:

the information transferred is very confidential.

1 Like

For maximum security with public key, use ECC 512 (elliptic curve) or RSA 8192 (prime factorisation).
Attacking elliptic curves is easier with quantum computers than breaking prime factorisation (2339 Q-bit vs 4098 Q-bit).

Key exchange wise, I don´t think there is anything better than Diffie-Hellman.

Yeah thanks for the information. I know I’m sorting asking for a lot now but do you know any approved libraries for that in C++ or should i write my own implementation. I just don’t want to write it myself for the fear of it being comprised.

Honestly, until quantum, computers become more than just a research and development thing, RSA 2048 passing an AES 256 key would be more than enough.

If people are worried about quantum attacks on public private key cryptography, chose something like McEleiece. though I’m not sure why you need encryption on a COM port to a micro controller. The chances of the micro having the power to efficiently decrypt something like RSA is a bit hopeful not to mention there are not many avenues for attack on a COM port.

I don’t need encryption. I just need a safe key exchange. I’m making a device with a password manager component which has a master key. That is going to be transferred.

Well transferring the key over com doesn’t need encryption. What you need is some form of certificate validation of the receiver so that you don’t start handing the key to any device that plugs in.

1 Like