Danni-Tech
Making the Complicated Simple
Key Points from This Video on Asymmetric Encryption:
What is Encryption?
- Encryption ensures confidentiality, meaning only the intended party can access and read the data.
- The process involves converting plaintext (e.g., “friend”) into ciphertext using an encryption algorithm, which can then be decrypted back to plaintext using a decryption algorithm.
Why Key-Based Encryption is Important:
- Basic encryption is not secure enough because anyone with access to the algorithm could decrypt the data.
- Key-based encryption introduces a secret key, ensuring only those with the correct key can decrypt the ciphertext.
Types of Key-Based Encryption:
- Symmetric Encryption: Uses the same key for encryption and decryption.
- Asymmetric Encryption: Uses different keys for encryption and decryption (covered in this video).
How Asymmetric Encryption Works:
- Asymmetric encryption uses a pair of keys: one for encryption and a mathematically related key for decryption.
- Example:
- Encrypting the word “friend” with key 7 (shifting letters forward):
- F → M
- R → Y
- I → P
- E → L
- N → U
- D → K
- Resulting ciphertext: “MYPLUK”
- Decrypting with the related key 19 (shifting letters backward) restores the original word: “FRIEND”.
- Encrypting the word “friend” with key 7 (shifting letters forward):
Trapdoor Functions:
- Asymmetric encryption relies on trapdoor functions, which are easy to compute in one direction but difficult to reverse without the specific key.
Mathematically Related Keys:
- The encryption and decryption keys are mathematically related.
- Example:
- Encrypt with 7, decrypt with 19
- Encrypt with 5, decrypt with 21
- Encrypt with 11, decrypt with 15
- In these examples, the keys add up to 26 (the total number of letters in the alphabet), completing a full cycle.
Public and Private Keys:
- Asymmetric encryption uses a public key (shared with others) and a private key (kept secret).
- Data encrypted with the public key can only be decrypted with the private key, ensuring security even if the encrypted data is intercepted.
Pros and Cons of Asymmetric Encryption:
- Advantages:
- Higher security since the private key is never shared.
- Ideal for securing communications, digital signatures, and encrypting session keys.
- Drawbacks:
- Slower than symmetric encryption due to complex mathematical operations and larger key sizes.
- Ciphertext expansion occurs, meaning the encrypted data is larger than the original plaintext, which can affect bandwidth and transmission times.
- Advantages:
Common Asymmetric Encryption Algorithms and Key Sizes:
- DSA (Digital Signature Algorithm): 2048-bit key
- RSA (Rivest-Shamir-Adleman): 2048-bit key
- Diffie-Hellman: 2048-bit key
- ECDSA (Elliptic Curve Digital Signature Algorithm): 256-bit key
- ECDH (Elliptic Curve Diffie-Hellman): 256-bit key
Key Takeaways:
- Asymmetric encryption uses larger key sizes than symmetric encryption, which increases the load on the CPU.
- It’s best suited for small amounts of data that require high security.