Results 1 to 4 of 4

Thread: static key caesar cipher

  1. #1
    Join Date
    Apr 2010
    Posts
    2
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default static key caesar cipher

    Hi,

    I had done a substitution caesar cipher before for an assignment in which the 1 page encrypted the text with a shift value of 3 and decrypted it on another page with the same value. I had lost marks somehow because i was missing a 'static key' but I thought they were referring to the 'shift key', but it made me think is it another key they are talking about? Can anyone give me an idea as to what I am supposed to add to my caesar cipher to get this static key? so far the methods just do encrypt(message,shiftvalueof3) and the same with decrypt, what am I missing here?

    Is it a different key they were talking about or would I have implemented the key wrongly? This is confusin gme because I have to do a randomized key based on a random value next for the caesar cipher, would they mean the shifting key in this case?

    Also it says I need to make a protocol for 'key agreement between client and server', so would I need to make the client and server agree on that shifting key?
    Last edited by zstar; 04-15-2010 at 10:49 AM.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    I believe the idea is that it works as a password. You will have a much stronger algorithm if you have an extra piece of input that you use to encrypt with. The idea is that you aren't just shifting each letter by 3, etc., but instead you are shifting it by a VARIABLE amount. In this way, it is possible to 'decrypt' using any key, but only when the right key is applied does it translate into something useful-- the others just generate nonsense.
    The simplest answer I can think of is shifting letters by some number, so that A->B and B->C and Z->A if that number is 1. The 'password' then IS that number. Your algorithm takes the number and applies it. Then only THAT number [read password] will properly decrypt it. Any other number will function but give useless results.

    Of course you want to choose a password that is quite long and complex (and probably applied in a complex way that is hard to track) so that: 1) it is not possible to use pattern matching to deduce what the password should be; 2) it takes a long time to run through each possible password and attempt to find it that way. (In other words, a single digit password algorithm is a terrible idea, but it gets the idea across.)

    And a 'shifting key' then is, I believe, a rotating/changing version of a static key. It could be, for example, based on the date (somehow). I don't see it as that special, though, since it's also predictable.


    I don't claim to know anything about formal cryptology-- just hoping I've understood what you're looking for. This isn't really a programming question and terms can change in use, so you're probably best asking your instructor exactly what he means by it (or maybe your textbook).
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. The Following User Says Thank You to djr33 For This Useful Post:

    zstar (04-17-2010)

  4. #3
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    It basically works along the 2 part encryption technique of "Asymmetric Key Encryption".

    While this is not physical security, you are also not encrypting nor decrypting physical materials (like a note to take across the battlefield). The idea is the same though. One Commander (you) tell the other Commander (the receiver) the shift will be 3. This is also sent on a Wednesday, and both commanders know that on a Wednesday the static key is 'pegleg'.

    The reason for this extra step then, is in case the rival Commander learns that the shift is 3 and he sees your scout running along the tree line and shoots him to get the message from him, he shifts 3 and the message is still garbled. Because he doesn't know that it was encrypted on Wednesday and that he needs the keyword 'pegleg' to apply either before or after (more likely) the shift.

    A good guide is found on wikipedia here and I am willing to bet your textbook has some information that is pertinent as well.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  5. The Following User Says Thank You to BLiZZaRD For This Useful Post:

    zstar (04-17-2010)

  6. #4
    Join Date
    Apr 2010
    Posts
    2
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    thanks alot guys, it all makes sense now

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •