Can you construct a key agreement system from public-key-encryption system? If so, how?
What about vice versa?
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It only takes a minute to sign up.Sign up to join this community
Yes, you can create a key agreement system from a public key encryption system. Or at least you can create a key establishment scheme using RSA. The term "key agreement" is often used for schemes that are explicitly used for Diffie-Hellman (DH) type of key establishment where the keys are calculated rather than distributed.
The RSA based ciphersuites have been part of TLS up to version 1.2. In this scheme the RSA public key of the server is used to encrypt a random generated on the client. This random is decrypted at the server using the RSA private key and can then be used to derive the session keys from the established secret.
This is a very simple scheme, but it does have some drawbacks because RSA key pair generation is slow and may require a lot of random data. As such it is commonly not used to generate ephemeral (i.e. temporary) key pairs, as it commonly done for DH.
Because of above, the RSA based key establishment has been dropped from TLS 1.3.
And yes, you can also use DH-style key agreement to perform encryption / decryption. IES and - for Elliptic Curve cryptosystems - ECIES is probably the most well known scheme. Simply said, the sender creates a temporary key pair (which is quite fast for DH and ECDH) and uses the private key of it to derive a secret key together with the trusted public key of the receiver. It then sends the temporary / data public key together with the ciphertext to the receiver. The receiver can use this public key together with its own private key to establish the same secret key and decrypt the ciphertext.
As derivation and encryption with a secret key is always required, IES is by definition a hybrid cryptosystem: it mixes the asymmetric DH key agreement with symmetric encryption with the secret key.