What is the primary difference between symmetric and asymmetric encryption in Java?
Symmetric encryption uses multiple keys to encrypt and decrypt data, whereas asymmetric encryption uses one key for both encryption and decryption.
Thatâ€™s incorrect. Symmetric encryption uses the same key for both encryption and decryption, while asymmetric encryption uses a key pair (public and private).
Can you explain the role of the public and private keys in asymmetric encryption?