I have a doubt.
In RSA we generate a public key (e,n)
and a private key (d,n)
. and the these keypairs are actually used to encrypt (by public-key) and decrypt (by private-key) the actual data during communication.
m^(e*d) = m (mod n)
because m^(k*phi(n)+1) = m (mod n)
But Diffie-Hellman and ECC algorithms are just used to generate a common secrete key (K) between two parties, which is then used for symmetric encryption.
So, Diffie-Hellman and ECC are just Key Generation/Exchange algorithms, and do not actually use asymmetric encryption-decryption, whereas RSA is asymmetric cryptography because it do use two different keys for encryption decryption.
So why are Diffie-Hellman and ECC counted as Public/Private Key Cryptographies?
Am I missing something here?