CS4010 End of Semester Examination



  1. (10 pts.) When in a servlets life cycle must lock s be instantiated? Why?

    When the Servlet instance is initialized so it is available to all Threads/Sessions


  2. (15 pts.) This semester we discussed two different concurrent-user-run-time programming

    anomalies that are avoided by using lock() and unlock() . What are those run-time anomalies?

    Describe the behavior caused by them that users may experience.

    ANSWER



  1. (10 pts.) Session management technologies are necessary because of what HTTP/HTTPS session protocol?

    Because HTTP Sessions consist of a single Request and Response



  1. (10 pts.) Compare Secret Key Encryption with Public Key Encryption when might each of be the appropriate choice.

    Secret Key Encryption is appropriate when a number of users what to share private communations between themselves. Public Key allows a user to broadcast an encryptor which, for example, allows clients to encrypt and send messages without being able to decrypt them.



  2. (10 pts.) In Class we discussed 2 tests for Secret Key Encryption security what are they?

    ANSWER



  3. (15 pts.) Two simple encryption algorithms are Permute Bytes and Permute Nibbles why might

    Permute Bytes fail Test 1. Why might Permute Nibbles pass Test 1 but fail Test 2.

    Permute Bytes may fail 1 because intercepting a long message may allow a character frequency attack.
    Permute Nibbles can be broken by encrypting nibble arrays with one 1 and all the other nibbles 0


  1. (15 pts.) Breaking RSA does not require the data referred to in Test 1 and 2 but is time complex.

    We tell the world
    n=pq and e an encryptor but do not tell p and q,. If others could use this

    information to find
    d a decryptor our encryption would be broken. What calculations would we

    have to make to find
    d and what part of that calculation is time complex and what part is not?

    ANSWER



  1. (15 pts.) Let p=11 and q=5, what would be a suitable e also, using the algorithm from problem 6. compute a decryptor d.

    (Hint: If
    am+bn = r then mn -mn + am + bn = (a-n)m+(b+m)n = r )

    An Example in the Notes

  2. The Calculation:

    p = 5  q = 11
    p-1 = 4 = 22
    q-1 = 10 = 2 × 5
    So:
    3 would be a suitable choice for e.
    
    (p-1)×(q-1) = 40
    and
    40 = 13 × 3 +1
    or
    40 - 13 × 3 = 1
    subtracting and adding 40 × 3
    -2 × 40 + 27 × 3 =1
    or 
     27 × 3 = 2 × 40 + 1
    So:
    27 is a suitable choice for d