# Questions tagged [affine-cipher]

A type of monoalphabetic substitution cipher, wherein each letter in an alphabet is mapped to its numeric equivalent, encrypted using a simple function (ax + b) mod m.

46 questions
Filter by
Sorted by
Tagged with
74 views

### Conceal time-based GUIDs with an affine-cipher?

I'd like to create a custom type of sortable GUID by concatenating an 8-byte nanosecond timestamp, 6 random bytes, a 1-byte node number, and a 1-byte counter. But, such a precise timestamp can be used ...
• 814
1 vote
750 views

### Where did affine cipher get its name from?

I was wondering where did affine cipher get its name from. I am curious to know its origin and how it is related to the cipher. The Affine Transformation page on Wikipedia states: In Euclidean ...
• 135
96 views

### How to encrypt affine cipher in block?

Assuming the alphabet of capital letters, if an affine linear cipher $v\to Av+b \bmod 26$ with block length $3$ maps plaintext ENCRYPTAGAIN to ciphertext ...
1 vote
203 views

### Can all affine cyphers be expressed with this formula

There are $26!$ permutations of the English alphabet. In Modern Cryptography textbook, William Easttom states that the basic formula for any affine cipher is $ax + b \equiv \pmod{26}$. I'm wondering ...
• 113
200 views

### Affine Cipher: what to do if the number isnt invertible over mod n? [duplicate]

I am currently solving a simple cryptanalysis problem where I need to decrypt a text file using frequency analysis. The text has been encrypted using an affine cipher over a 68 character alphabet ...
64 views

### decode Vigenere cipher that was encoded with Affine cipher

How do I decode some text that has been encoded like this: affine(vigenere(text, vigenere_key), *affine_key)? I don't know keys to either of them. At first I ...
• 1
1k views

### Text cipher option that can decrypt the same ciphertext to two DIFFERENT and DESIRED outputs given DIFFERENT keys (and/or alphabet)

I have a pen pal that I discuss with. In our latest discussion it was proposed to write a short message that is ciphered and have the other one find what it is, given some clues. I would like to ask ...
424 views

### Linear subspace and Affine subspace

I am currently reading a paper titled "Another view of division property" and encountered the terms "Affine subspace" and "Linear subspace". I am new to the field and having some difficulties to ...
• 177
68 views

### Where can I find standardized implementations of lightweight cryptographic ciphers?

I am working on a project that requires encrypting messages with different ciphers. I am looking for the following ciphers: PRESENT, CLEFIA, LEA, Hill cipher, Affine cipher, Elliptic Curve ...
32 views

### How would you decrypt an affine cipher with only the ciphertext? [duplicate]

If I have only the ciphertext but the alphabet and the value of a and b are all unknown ... how would I go about this? I understand decryption with the key and alphabet, that is fairly easy but if we ...
• 1
1 vote
50 views

### Proving at most one affine permutation mapping $x$ to $u$ and $y$ to $v$ with $x,y \in \mathbb{Z}_n$ and $\gcd(x−y,n) = 1$

Suppose that $x,y \in \mathbb{Z}_n$ with $\gcd(x−y,n) = 1$. Prove that for any $u,v \in \mathbb{Z}_n$ there is at most one affine permutation mapping $x$ to $u$ and $y$ to $v$.
• 11
53 views

### What choices of $a$ and $b$ of the affine cipher lead to proper encryption functions [duplicate]

Suppose I consider the affine cipher defined by $E(x) = ax + b \bmod n$ on the standard alphabet of 26 letters. Which choices of $a$ and $b$ lead to proper encryption functions? Using the ...
117 views

### use of encryption of plain text from 1 instead of 0

while encrypting the plaintext in an affine cipher we encrypt the alphabets with a=0,b=1,c=2,......z=25 and then use the modulo of 26. Can we instead use to encrypt the plaintext with a=1,b=2,c=3,....,...
• 101
1k views

### AES with linear S-Box

If the AES S-Box is replaced with a linear or affine transformation, for instance the identity mapping $\sigma(x)=x$, does the cipher become entirely affine and hence trivially weak?
• 675
1 vote
553 views

### Cryptanalysis affine cipher and substitution cipher

1) Consider the chosen-plaintext attack on the simple substitution cipher. How many chosen plaintext characters suffice to uniquely determine the key? My answer was: 26! 2) Consider the chosen-...
• 359
1k views

### Formula for E(m) of the Atbash Cipher

I'm studying mathematical cryptography and have been asked to find the encryption function for the Atbash cipher I know that it means a=z, b=y, c=x and so on but putting it into a formula has me a bit ...
• 11
1 vote
1k views

### Stuck on an affine cipher exercise

I'm tired and can't seem to get the right answer for the following exercise: Alice sends a message to Bob, but he doesn't know the key. He knows only that the first two plaintext letters are C and ...
• 13
792 views

### Decryption using affine cipher

I am doing probabilistic decryption, I was given that A and E had the highest frequency count in the plain text. H and X have the highest frequency in the encrypted text. So in solving for a and b I ...
433 views

• 143
1 vote
938 views

### How many oracle calls to break an affine cipher in a chosen plaintext attack?

Assuming the ability to launch Chosen Plaintext Attacks (CPA), how many oracle calls does an attacker need to break the affine cipher? How does it work?
• 21
1 vote
I am trying to cryptanalyse a cipher–text encrypted by Affine cipher. The encryption formula is: $c = f(x) = (ax+b)\bmod m$, where $a$ and $b$ are unknown constants; $x$ is a plain-text symbol, and \$...