Symmetric Encryption vs Public Key Encryption

By Russell Ballestrini

This entry is part 4 of 7 in the series Computer Network Security
How many keys are involved for symmetric key encryption? How about public key encryption?

Suppose you have N people who want to communicate with each other using symmetric keys. All communication between any two people, i and j, is visible to group N. Only person i and person j can decrypt each others messages.

How many keys would Symmetric Encryption require to protect group N?

I solved this with the following python function:

def count_symmetric_keys( N=2 ):
    """Provide the number of entities in group N.
    return the number of symmetric keys needed for this group"""
    keys = 0
    for i in range( 0, N ): keys += i
    return keys

If group N had 10 members, it would need to generate and maintain 45 Symmetric Keys.

If group N had 50 members, it would need to generate and maintain 1125 Symmetric Keys.

Symmetric keys are also susceptible to man-in-the-middle attacks. This attack occurs when an entity poses as a trusted entity. Let i and j be trusted entities. Let k be an un-trusted attacker. If k determined the Symmetric key it could send or recieve messages posing as i or j.

How many keys would Public-key Encryption require to protect group N?

Public Key Encryption requires 2n keys or two keys per person in group N. Public key encryption also does not require ‘pre sharing’ the secret key before communication may start. Each member would need 1 public key and 1 private key.

If group N had 10 members, it would need to generate and maintain 20 Public/Private Keys.

If group N had 50 members, it would need to generate and maintain 100 Public/Private Keys.

Series NavigationAttributes of an 8-block cipherWhy does a Hash provide better message integrity then an Internet checksum?

About Russell Ballestrini

Russell admires tidy readable code and beautiful design patterns. He enjoys finding simple solutions to difficult problems and reveres the python language. Russell holds a position as a Linux system admin and operates a website screenshot service.

1 Comment Leave a comment

  1. Good to know about the Symmetric Encryption vs Public Key Encryption

Share your thoughts