Asymmetric is slow, but good for establishing a trusted connection.
Symmetric has a shared key and is faster. Protocols often use asymmetric to transfer symmetric key.
Perfect forward secrecy - eg Signal uses this.
Symmetrical
Asymmetrical
SSL: standard technology for keeping an internet connection secure and safeguarding any sensitive data that is being sent between two systems, preventing criminals from reading and modifying any information transferred, including potential personal details.
TLS: cryptographic protocol that provides secure communication over the Internet. TLS protocol aims primarily to provide privacy and data integrity between two communicating computer applications.
HTTPS: secure version of HTTP, the protocol over which data is sent between your browser and the website that you are connected to. TLS and SSL are most widely recognized as the protocols that provide secure HTTP (HTTPS) for Internet transactions between Web browsers and Web servers.
HTTPS uses TCP at the transport layer. SSL is used for data encryption.
Both, initial exchange is done using asymmetric and that bulk data encryption requires speed and therefore symmetric algorithms.
HSTS is a header which allows a website to specify and enforce security policy in client web browsers. This policy enforcement protects secure websites from downgrade attacks, SSL stripping, and cookie hijacking. It allows a web server to declare a policy that browsers will only connect using secure HTTPS connections, and ensures end users do not “click through” critical security warnings. HSTS is an important security mechanism for high security websites. HSTS headers are only respected when served over HTTPS connections, not HTTP.
HSTS generally has the following behavior in user web browsers:
More details: Cloudflare Understanding HSTS (HTTP Strict Transport Security)
It depends on the key exchange. With static RSA key exchange (no forward secrecy), yes — anyone who recorded past traffic can use the stolen private key to recover each session key and decrypt it retroactively. With ephemeral Diffie-Hellman (DHE/ECDHE, i.e. Perfect Forward Secrecy), no — the session keys are ephemeral and never transmitted, so a stolen long-term key cannot decrypt previously captured sessions (though it does let the attacker impersonate the server or run an active MITM going forward).
weak ciphers, vulnerabilities like Heartbleed, BEAST,
a system that uses ephemeral session keys to do the actual encryption of TLS data so that even if the server’s private key were to be compromised, an attacker could not use it to decrypt captured data that had been sent to that server in the past.
Diffie-Hellman
Diffie-Hellman is a key-exchange protocol, and RSA is an encryption/signing protocol. RSA required key material beforehand, DH does not
MITM
Various attack models (e.g. chosen-plaintext attack).
An Initialization Vector is a non-secret but random/unique value fed into a cipher so that encrypting the same plaintext under the same key produces different ciphertext each time, preventing patterns from leaking. In CBC it is XORed with the first plaintext block and must be unpredictable; in CTR/GCM it forms the nonce/counter and must never be reused for a given key (nonce reuse in GCM is catastrophic and can leak the authentication key). The IV is normally sent in the clear alongside the ciphertext.
Block-based encryption algorithms work on a block of cleartext at a time, and are best used for situations where you know how large the message will be, e.g., for a file. Stream ciphers work on single units of cleartext, such as a bit or a byte, and they’re best used when you’re not sure how long the message will be.
ECB (Electronic Code Book) and CBC (Cipher Block Chaining).
ECB (Electronic Code Book) encrypts each block independently, without using an IV, so identical plaintext blocks always produce identical ciphertext blocks. This leaks patterns in the data (the classic “ECB penguin” image) and makes it fairly easy to attack.
CBC (Cipher Block Chaining) uses an IV for the first block and then propagates the XOR of the previous block onto subsequent ones. The difference in results can be remarkable.
A security device you can add to a system to manage, generate, and securely store cryptographic keys.
A hardware chip on the computer’s motherboard that stores cryptographic keys used for encryption. Many laptop computers include a TPM, but if the system doesn’t include it, it is not feasible to add one.
Trusted storage for certs and auth data locally on device/host.
HSMs are removable or external devices. In comparison, a TPM is a chip embedded into the motherboard. You can easily add an HSM to a system or a network, but if a system didn’t ship with a TPM, it’s not feasible to add one later. Both provide secure encryption capabilities by storing and using RSA keys.