In symmetric cryptography, a single secret key acts like a physical key that both locks (encrypts) and unlocks (decrypts) data. This process is reversible; decryption is simply the reverse of encryption using the same key. Due to the necessity of sharing this key between communicating parties, it's often referred to as a shared secret. While symmetric encryption effectively guarantees confidentiality for data in transit or at rest, it doesn't inherently ensure integrity, authenticity, or non-repudiation. Also known as secret key cryptography, symmetric methods have a long history of use across the globe, dating back to antiquity.
Asymmetric cryptography, in contrast, employs a pair of mathematically linked keys – one public and one private – to provide confidentiality, integrity, authenticity, and non-repudiation for data, whether in transit or at rest. The public key is openly accessible, while the private key must remain secret. This approach is also known as public key cryptography. The concept was first proposed in 1976 by Whitfield Diffie and Martin Hellman, with Ronald Rivest, Adi Shamir, and Len Adleman subsequently developing it into the widely adopted RSA algorithm in 1977. Intriguingly, a similar system was secretly developed in 1973 by the British signals intelligence agency and later declassified in 1997.
While distinct, symmetric and asymmetric cryptography often work together, each typically suited for different applications. Asymmetric cryptography presents greater technical, organizational, and operational complexity compared to its symmetric counterpart. In asymmetric cryptography, achieving confidentiality involves the sender encrypting data using the recipient's public key, which can only be decrypted by the recipient's corresponding private key.
To ensure the authenticity and integrity of data, such as a message or file, the sender (or owner, for data at rest) creates a digital signature. This is done by encrypting a unique digital fingerprint of the message, known as a hash value, using their private key and attaching this encrypted hash to the message. Recipients can then verify the signature by decrypting it with the sender's public key. Successful decryption confirms the data's integrity and authenticity. Failure to decrypt indicates a breach in either. Furthermore, because the digital signature is created using the sender's private key, it provides strong non-repudiation, preventing the sender from denying they "signed" the message. This high level of assurance stems from the mathematical properties of the key pair and the encryption/decryption algorithms, making tampering virtually impossible, provided there are no vulnerabilities in the cryptosystem's implementation.
No cryptographic method offers absolute security. Every approach has advantages and disadvantages, and addressing one weakness often introduces risks in other areas. Consequently, a thorough risk analysis for each specific use case is crucial before selecting a cryptographic method. Once chosen, the associated risks must be managed to an acceptable level.
For instance, symmetric cryptography requires the initial exchange of a secret key between communicating parties, creating a vulnerability if this exchange isn't conducted through a sufficiently secure channel. An eavesdropper could potentially intercept the key. Asymmetric cryptography circumvents this particular risk, as the receiver's private key remains confidential. However, the increased complexity of asymmetric systems can introduce new vulnerabilities, thereby expanding the potential avenues of attack for adversaries.