# Vigenère cipher - sorted order

i'm new to cryptography so i feel sorry for this newbie question! Can anyone tell me how Vigenère work with sorted order? For example i have this in my book:

• 3124(SORTED ORDER)
• 312431243(REPEATED KEY)
• PLAINTEXT(PLAINTEXT)
• SMCMOUGBW(CIPHERTEXT)

Can you tell me how we get this number(3124) and ciphertext from this key(LADY)?

• Which book is that from? That approach is non standard. – CodesInChaos Jan 15 '17 at 14:51
• really? its from this GREEK book: ianos.gr/… It was written from a university teacher and he recommend this book for his security class. I'm from Greece – Polem Jan 15 '17 at 14:57
• Maybe the recommendation was for other sections of the book. But this kind of cipher is quite terrible. The actual keyword doesn't matter, and there are other words representing the same key. So for a 4 letter keyword, there are just $4! = 24$ possible combinations of the key. This is really, really bad. – tylo Jan 16 '17 at 10:46
• No,its from the section "Vigenere cipher" and says that this is another way for this algorithm. This example is actually the same with the example of the book. The book doesnt have any further information, only this example. If you know greek i can send you a picture or something. You guys make me feel so weird about the two teachers that wrote this book. :/ sorry for my bad english. – Polem Jan 16 '17 at 11:45

ADLY is the order those letters appear in the alphabet, so A=1, D=2, L=3, Y=4.

But I've never seen such a substitution in a Vigenere cipher, and it's dumb, since it makes a weak algorithm even weaker. Normally you just identify A with 0 or 1 and then assign increasing numbers to subsequent letters. A=0, B=1, C=2, ... Z=25, so LADY would map to 11,0,3,24 (or 12,1,4,25 if you start with A=1 and end with Z=26=0).

• I can't understand how we get this ciphertext. Can you explain it further or show me another example. I will appreciate it a lot. Thank you for your time. – Polem Jan 15 '17 at 15:13
• If the plaintext is "TRUE" with the same key.. the ciphertext will be "WSWI" ?? Is that so simple? – Polem Jan 15 '17 at 15:18
• @Polem Yes, it's so simple. Your example is correct for the key 3,1,2,4, though normally that key would be written as CABD or BZAC (depending on A=0 or A=1). – CodesInChaos Jan 15 '17 at 15:25

The LADY is with A=0 and Z=25

is 11,0,3,24

so the sorted order is

0,3,11,24

so