Docsity

2 Problems for Computer Security - Assignment 3 | 22C 169, Assignments of Computer Science

Toggle sidebar
bg1
Spring 2008 – 22c:169 Computer Security
Assignment 3 - due by Thursday, April 17
Problem 1: United we defend (30 points) A group of small online game companies decided to sell
a group membership, so that any paid member of one online game can enjoy free membership to any other
game in the ā€œFederationā€. Each company now authenticates paid members by checking their usernames and
passwords, and then authorizes them according to their expiration dates based on their membership fee. To
facilitate these current members, the IT Lord of Federation came up with the following scheme.
All the online game companies in the Federation now share one master secret key M SK . When a paid user
logs in to an online game ā€œAlpha-lifeā€ with a username and a password, the user is prompted to store a secret
file. This file contains the value of H(MS K|username|expiration date) and M S K hexpiration datei,
where His a secure hash function and |is a concatenation, and hi means a symmetric key encryption.
When a user tries to login another online game ā€œBeta-revolutionā€ by another Federation member, then
the user can simply type in the username from ā€œAlpha-lifeā€ and upload the secret file from ā€œAlpha-lifeā€. The
ā€œBeta-revolutionā€ can use its own MS K to decrypt the second field in the file and learn the expiration date. If
the decrypted expiration date has not passed, then compute H(M SK |typed-in username|decrypted expiration date)
and compare to the first field in the secret file. If they match, then the user is authorized to use the ā€œBeta-
revolutionā€. Answer the following questions.
Problem 1a (5 points) Alice has a username wonderland, and a subscription with ā€œAlpha-lifeā€ that
expires on April 1, 2009. By coincidence, another user Carol has the same username wonderland with
ā€œBeta-revolutionā€, with no paid subscription. Can Queen use Alice’s secret file to login any online game in
the Federation? Explain your answer.
Problem 1b (5 points) When user Alice logs into ā€œAlpha-lifeā€, there are two ways of authenticating
Alice. One way is to check her username and password stored in ā€œAlpha-lifeā€, and the other way is to check
her secret file. Modify the secret file so that ā€œAlpha-lifeā€ can always check the password of any user from
ā€œAlpha-lifeā€. Explain how your modified secret file guarantees such password check.
Problem 1c (10 points) Imagine there is a betrayer in the Federation, ā€œSith-senseā€. This betrayer sells
subscription at a half-price, so all the users would pay ā€œSith-senseā€ and other members had to honor the
subscription, without being able to distinguish whether a secret file was created by ā€œSith-senseā€ or not.
Modify the secret file so that good members can tell which member published each secret file. All good
members can communicate with each other (1-to-1 at a time), but this channel utilizes one-time pad so it
can be securely used only one time. Explain how your modified secret file facilitates the authentication of
the origin of secret file.
Problem 1d (10 points) After such turmoil, ā€œDarthā€-vendor offers a free single sign-on service to the
Federation. ā€œDarthā€-vendor suggests to merge all the username and password database into one location,
and all the authentication requests to be served at this central login information database. For their own
revenue, ā€œDarthā€-vendor will show some advertisements next to the login screen. This does seem to solve
many problems that the Federation has had so far. As a member of Federation, could you present to the
Council of the Federation what pros and cons there are with this central method vs. your answer 1c?
Problem 2: As smart as Caesar or more (30pts) Caesar is known to used a substitution cipher for
important military messages. What he used is quite simple, shifting 3 alphabets to the right as follows.
Plain: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Cipher: DEFGHIJKLMNOPQRSTUVWXYZABC
For example, if the original message (plaintext) was ā€œATTACK AT THE DAWNā€, then the ciphertext
becomes ā€œDWWDFN DW WKH GDZQā€. Breaking this cipher is relatively easy, knowing that the magic
number is 3. Imagine the following substitution cipher:
pf3

Partial preview of the text

Download 2 Problems for Computer Security - Assignment 3 | 22C 169 and more Assignments Computer Science in PDF only on Docsity!

Spring 2008 – 22c:169 Computer Security Assignment 3 - due by Thursday, April 17

Problem 1: United we defend (30 points) A group of small online game companies decided to sell a group membership, so that any paid member of one online game can enjoy free membership to any other game in the ā€œFederationā€. Each company now authenticates paid members by checking their usernames and passwords, and then authorizes them according to their expiration dates based on their membership fee. To facilitate these current members, the IT Lord of Federation came up with the following scheme. All the online game companies in the Federation now share one master secret key M SK. When a paid user logs in to an online game ā€œAlpha-lifeā€ with a username and a password, the user is prompted to store a secret file. This file contains the value of H(M SK|username|expiration date) and M SK怈expiration date怉, where H is a secure hash function and | is a concatenation, and 怈怉 means a symmetric key encryption. When a user tries to login another online game ā€œBeta-revolutionā€ by another Federation member, then the user can simply type in the username from ā€œAlpha-lifeā€ and upload the secret file from ā€œAlpha-lifeā€. The ā€œBeta-revolutionā€ can use its own M SK to decrypt the second field in the file and learn the expiration date. If the decrypted expiration date has not passed, then compute H(M SK|typed-in username|decrypted expiration date) and compare to the first field in the secret file. If they match, then the user is authorized to use the ā€œBeta- revolutionā€. Answer the following questions.

Problem 1a (5 points) Alice has a username wonderland, and a subscription with ā€œAlpha-lifeā€ that expires on April 1, 2009. By coincidence, another user Carol has the same username wonderland with ā€œBeta-revolutionā€, with no paid subscription. Can Queen use Alice’s secret file to login any online game in the Federation? Explain your answer.

Problem 1b (5 points) When user Alice logs into ā€œAlpha-lifeā€, there are two ways of authenticating Alice. One way is to check her username and password stored in ā€œAlpha-lifeā€, and the other way is to check her secret file. Modify the secret file so that ā€œAlpha-lifeā€ can always check the password of any user from ā€œAlpha-lifeā€. Explain how your modified secret file guarantees such password check.

Problem 1c (10 points) Imagine there is a betrayer in the Federation, ā€œSith-senseā€. This betrayer sells subscription at a half-price, so all the users would pay ā€œSith-senseā€ and other members had to honor the subscription, without being able to distinguish whether a secret file was created by ā€œSith-senseā€ or not. Modify the secret file so that good members can tell which member published each secret file. All good members can communicate with each other (1-to-1 at a time), but this channel utilizes one-time pad so it can be securely used only one time. Explain how your modified secret file facilitates the authentication of the origin of secret file.

Problem 1d (10 points) After such turmoil, ā€œDarthā€-vendor offers a free single sign-on service to the Federation. ā€œDarthā€-vendor suggests to merge all the username and password database into one location, and all the authentication requests to be served at this central login information database. For their own revenue, ā€œDarthā€-vendor will show some advertisements next to the login screen. This does seem to solve many problems that the Federation has had so far. As a member of Federation, could you present to the Council of the Federation what pros and cons there are with this central method vs. your answer 1c?

Problem 2: As smart as Caesar or more (30pts) Caesar is known to used a substitution cipher for important military messages. What he used is quite simple, shifting 3 alphabets to the right as follows.

Plain: ABCDEFGHIJKLMNOPQRSTUVWXYZ Cipher: DEFGHIJKLMNOPQRSTUVWXYZABC

For example, if the original message (plaintext) was ā€œATTACK AT THE DAWNā€, then the ciphertext becomes ā€œDWWDFN DW WKH GDZQā€. Breaking this cipher is relatively easy, knowing that the magic number is 3. Imagine the following substitution cipher:

Plain: ABCDEFGHIJKLMNOPQRSTUVWXYZ Cipher: FGHIJKLMNOPQRSTUVWXYZABCDE

This is different from Caesar cipher, but still uses shifting. There are two ways of breaking this cipher. One way is brute-force, where one tries every number from 1 to 25 and see which one makes sense. The other way is frequency analysis. In English, alphabet frequency has the following distribution. When a ciphertext is long enough, the frequency of alphabet that substitutes ’E’ is likely to match the frequency of ’E’ in ciphertext.

Figure 1: Picture from Wikipedia

IMPORTANT NOTE:: Make sure to comment, comment, and comment. The

program will not be graded without extensive comments.

Problem 2a (10 points) Write a java or C# program that decodes any shift-based cipher.

The program should take ciphertext as a command line argument and print the correspond-

ing plaintext on terminal. For simplicity, we only use upper case letters, and there is no

punctuation mark other than space. Your program may print irrelevant plaintexts as well,

as long as it prints the correct output. Here is an example script:

shell prompt>javac ShiftCipher.java

shell prompt>java ShiftCipher "FYYFHP FY IFBS"

FYYFHP FY IFBS

GZZGIQ GZ JGCT

HAAHJR HA KHDU

IBBIKS IB LIEV

JCCJLT JC MJFW

KDDKMU KD NKGX

LEELNV LE OLHY

MFFMOW MF PMIZ

NGGNPX NG QNJA

OHHOQY OH ROKB

PIIPRZ PI SPLC