I have a small ARM M0 SoC and a smartphone as actors. Encryption keys used are Elliptic curve.
My current security is implemented such that:
- the SoC has 128 bit hashes of phone public keys (vs 512 bit - due to storage space constraints)
- the phone has the SoC's public key
- the phone sends its own public key during negotiation
- step 3 establishes grounds for ECDH on both sides. From here encrypted comms can follow
We are hoping that SoC having 128 bit hash should be secure enough for trying to brute-force guess the public/private key pair.
We are assuming that phone is easily compromised where the attacker will gain the phone's complete key and the SoC's public key.
So now I have come up with a solution that I'm hoping might be better, but am not sure whether it actually is:
What changes:
- The public key hashes are now such that public key can be restored from partial data
- The phone only sends part of its public key
- There is an "overlapping" region between the hash on the SoC and the sent public key portion
- Neither device contains another device's full public key
- Both devices have to assemble the complete public key as part of negotiation procedure
So, basically, in its simplest form, the SoC now has the leftmost 128 bits of the 512-bit phone's public key. The phone sends the rightmost 416, leaving 32 bits for overlapping region, like this:
HHHHHHHHHHHHBBBBTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
- H = SoC, B = Both, T = Telephone, each character = 8 bits of the public key
- uniqueness of the overlapping part is ensured within the system.
Is this system in any way more secure than the previous system we designed? Less secure?