Bird
Raised Fist0
Cybersecurityknowledge~5 mins

Asymmetric encryption (RSA, ECC) in Cybersecurity - Cheat Sheet & Quick Revision

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Recall & Review
beginner
What is asymmetric encryption?
Asymmetric encryption uses two different keys: a public key to encrypt data and a private key to decrypt it. This allows secure communication without sharing the private key.
Click to reveal answer
beginner
What does RSA stand for and what is it used for?
RSA stands for Rivest-Shamir-Adleman, the inventors of this encryption method. It is widely used for secure data transmission by encrypting data with a public key and decrypting with a private key.
Click to reveal answer
intermediate
How does ECC differ from RSA?
ECC (Elliptic Curve Cryptography) uses smaller keys than RSA but provides similar security. This makes ECC faster and uses less computing power, ideal for mobile devices.
Click to reveal answer
beginner
Why is the private key kept secret in asymmetric encryption?
The private key is kept secret because it is used to decrypt messages encrypted with the public key. If someone else gets the private key, they can read all encrypted messages.
Click to reveal answer
beginner
What is a real-life example of asymmetric encryption use?
When you visit a secure website (https://), your browser uses asymmetric encryption to safely exchange a secret key with the website. This key then encrypts all data sent between you and the site.
Click to reveal answer
Which key is used to encrypt data in asymmetric encryption?
ANo key
BPrivate key
CPublic key
DBoth keys
What is a main advantage of ECC over RSA?
AFaster and uses less computing power
BLess secure
CUses larger keys
DOnly works on desktops
What happens if someone obtains your private key?
AThey can encrypt messages to you
BThey can decrypt your encrypted messages
CThey can only send emails
DNothing happens
RSA encryption is named after:
ARivest, Shamir, and Adleman
BRandom Secure Algorithm
CRapid Security Access
DReliable Secure Application
Which of these is a common use of asymmetric encryption?
ASpeeding up internet connection
BEncrypting files on your computer only
CCompressing data
DSecurely exchanging keys over the internet
Explain how asymmetric encryption works using the example of sending a secret message.
Think about how you can send a locked box that only the receiver can open.
You got /4 concepts.
    Compare RSA and ECC in terms of key size and efficiency.
    Consider which method is better for mobile devices.
    You got /4 concepts.

      Practice

      (1/5)
      1. What is the main purpose of asymmetric encryption like RSA and ECC?
      easy
      A. To use the same key for both encrypting and decrypting
      B. To store passwords in plain text
      C. To use two different keys: one to encrypt and one to decrypt
      D. To speed up internet connections

      Solution

      1. Step 1: Understand key usage in asymmetric encryption

        Asymmetric encryption uses two keys: a public key to encrypt and a private key to decrypt messages.
      2. Step 2: Compare with symmetric encryption

        Symmetric encryption uses the same key for both encrypting and decrypting, which is different from asymmetric encryption.
      3. Final Answer:

        To use two different keys: one to encrypt and one to decrypt -> Option C
      4. Quick Check:

        Asymmetric encryption = two keys (public/private) [OK]
      Hint: Remember: public key encrypts, private key decrypts [OK]
      Common Mistakes:
      • Confusing asymmetric with symmetric encryption
      • Thinking one key is used for both encrypting and decrypting
      • Believing encryption speeds up internet
      • Assuming passwords are stored in plain text
      2. Which of the following is a correct statement about RSA keys?
      easy
      A. RSA does not use any mathematical operations
      B. RSA uses a single key for both encryption and decryption
      C. RSA keys are always 128 bits long
      D. RSA keys are generated using large prime numbers

      Solution

      1. Step 1: Recall RSA key generation method

        RSA keys are created by multiplying two large prime numbers to form the public and private keys.
      2. Step 2: Check other options for correctness

        RSA does not use a single key, keys are not fixed at 128 bits, and it heavily relies on math operations.
      3. Final Answer:

        RSA keys are generated using large prime numbers -> Option D
      4. Quick Check:

        RSA key generation = large primes [OK]
      Hint: RSA keys come from multiplying big prime numbers [OK]
      Common Mistakes:
      • Thinking RSA uses one key only
      • Assuming RSA keys have fixed small size
      • Ignoring the role of prime numbers
      • Believing RSA avoids math operations
      3. Consider this simplified RSA encryption example:
      public_key = (e=3, n=33)
      private_key = (d=7, n=33)
      message = 4
      encrypted = (message^e) mod n
      decrypted = (encrypted^d) mod n

      What is the decrypted message?
      medium
      A. 4
      B. 7
      C. 3
      D. 9

      Solution

      1. Step 1: Calculate encrypted message

        encrypted = (4^3) mod 33 = 64 mod 33 = 31
      2. Step 2: Calculate decrypted message

        decrypted = (31^7) mod 33. Calculating 31^7 mod 33 gives 4 (using modular exponentiation).
      3. Final Answer:

        4 -> Option A
      4. Quick Check:

        Decrypted message matches original message [OK]
      Hint: Encrypt then decrypt returns original message [OK]
      Common Mistakes:
      • Forgetting to apply modulo operation
      • Mixing up public and private keys
      • Incorrectly calculating powers
      • Assuming encrypted equals decrypted
      4. A developer wrote this ECC key generation snippet but it fails:
      private_key = generate_ecc_key()
      public_key = private_key * G

      What is the likely error?
      medium
      A. Public key is generated by multiplying G by private key, not the other way
      B. Private key must be a point, not a number
      C. Private key cannot be used to generate public key
      D. Multiplying private key by G is incorrect; should add G

      Solution

      1. Step 1: Understand ECC key generation

        In ECC, the public key is generated by multiplying the base point G by the private key scalar.
      2. Step 2: Identify the error in code

        The code multiplies private_key by G, but the correct order is G multiplied by private_key.
      3. Final Answer:

        Public key is generated by multiplying G by private key, not the other way -> Option A
      4. Quick Check:

        ECC public key = G * private key [OK]
      Hint: Order matters: base point times private key [OK]
      Common Mistakes:
      • Reversing multiplication order
      • Confusing addition with multiplication
      • Thinking private key is a point
      • Believing private key can't generate public key
      5. Why might ECC be preferred over RSA for securing mobile devices?
      hard
      A. RSA is faster and more efficient on mobile devices
      B. ECC uses smaller keys for similar security, saving battery and space
      C. ECC keys are easier to guess than RSA keys
      D. ECC does not require a private key

      Solution

      1. Step 1: Compare key sizes and efficiency

        ECC achieves strong security with smaller keys compared to RSA, which helps reduce processing power and battery use on mobiles.
      2. Step 2: Evaluate other options

        ECC keys are not easier to guess; RSA is generally slower on mobiles; ECC requires private keys like RSA.
      3. Final Answer:

        ECC uses smaller keys for similar security, saving battery and space -> Option B
      4. Quick Check:

        ECC = smaller keys, better for mobiles [OK]
      Hint: Smaller keys mean less power use on mobiles [OK]
      Common Mistakes:
      • Thinking ECC keys are weaker
      • Assuming RSA is faster on mobiles
      • Believing ECC doesn't use private keys
      • Ignoring battery and space constraints