Results 1 to 4 of 4

Math Help - Affine Cipher Properties.

  1. #1
    Member
    Joined
    Sep 2010
    Posts
    151
    Thanks
    1

    Affine Cipher Properties.

    I was working on a problem with an affine cipher. Looking at the properties they say for "f(x)=(ax + b)MOD26 defines a valid affine cipher if a is relatively prime to 26, and b is an integer between 0 and 25."

    i was working with f(x)=-9x+12(mod26),so K=A, H=B... but f(x)=11x-170(mod26) gives the same answers but 170 isn't between 0 and 25?

    Can someone explain this?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Newbie
    Joined
    Nov 2010
    Posts
    15
    Thanks
    3

    Re: Affine Cipher Properties.

    Actually, I don't think they yield the same answer?

    Let's say for both functions that x=1, where modulus = "%".

    (-9*1+12) % 26 = 3%26 = 3
    (11*1-170) % 26 = -159%26 = 23

    The variable "b" is the magnitude of shift in your cipher, so shifting 170 is equivalent to 14 since there are only 26 letters. It doesn't make much sense to shift beyond 25 as it just requires more work to encrypt and decrypt and does not add any additional cryptographic security. Since you always mod by 26 I don't see why you can't have b>25, it just seems redundant? (unless there's some mathematical principle that requires this to be true, but all I can tell is that a must be relatively prime to m or else you cannot decrypt) Hope that helps.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Member
    Joined
    Sep 2010
    Posts
    151
    Thanks
    1

    Re: Affine Cipher Properties.

    does b have to be a multiple of a or anything like that?
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    Nov 2010
    Posts
    15
    Thanks
    3

    Re: Affine Cipher Properties.

    No, I don't think so. It is just an arbitrary constant that you add on to shift the ciphertext.

    An affine cipher is really just a slightly more complex ceasar cipher, except the only thing you have (in a Caesar cipher) is "b", meaning that you shift everything (the alphabet) over b times. So if b=1, then in our alphabet we would have the following mappings: a=b, b=c, c=d....z=a. Hope that helps.
    Last edited by MrCryptoPrime; April 30th 2012 at 04:35 PM.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Affine matrix cipher
    Posted in the Number Theory Forum
    Replies: 0
    Last Post: March 17th 2011, 03:29 AM
  2. How many keys for an affine cipher in z27?
    Posted in the Number Theory Forum
    Replies: 0
    Last Post: March 6th 2011, 06:27 PM
  3. Affine Cipher Codebreak!
    Posted in the Number Theory Forum
    Replies: 0
    Last Post: March 6th 2011, 03:17 PM
  4. codebreaking! affine cipher
    Posted in the Number Theory Forum
    Replies: 0
    Last Post: February 20th 2011, 02:26 PM
  5. affine cipher
    Posted in the Discrete Math Forum
    Replies: 14
    Last Post: August 25th 2010, 05:09 AM

Search Tags


/mathhelpforum @mathhelpforum