Open petrdvorak opened 5 years ago
I suggest we look at ECDHE_ECDSA
in RFC 4492: https://tools.ietf.org/html/rfc4492, the TLS 1.2 specification defines a similar protocol for authentication of a public key.
In particular, section 5.4 defines the data being signed by ECDSA:
To add one more comment to this topic. The improvement will provide us with:
Currently, we use an ECIES algorithm with fixed keys (master server public key, device public key) that are stored on the mobile device and client-side ephemeral keys. This is good, but we could also add support for the server-side ephemeral keys (let's call them "temporary keys" here).
Gist
Temporary Public Key Exchange
=> Client now has a new one-time public key
Temporary Key Pair Storage on Server-Side
Server (probably PA Server) should store temporary keys in a separate table, such as
pa_temporary_keypair
. Each record should be one-time-only (when used, it should invalidate) and should have short expiration (to allow the cleanup).Encrypting Request and Response
The encryption/decryption works the same way as for our current ECIES. The temporary key should be invalidated once the encrypt/decrypt cycle is completed.