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)

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

  • 1
    $\begingroup$ Which book is that from? That approach is non standard. $\endgroup$ Commented Jan 15, 2017 at 14:51
  • 1
    $\begingroup$ 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 $\endgroup$
    – Polem
    Commented Jan 15, 2017 at 14:57
  • 1
    $\begingroup$ 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. $\endgroup$
    – tylo
    Commented Jan 16, 2017 at 10:46
  • $\begingroup$ 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. $\endgroup$
    – Polem
    Commented Jan 16, 2017 at 11:45

2 Answers 2


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).

  • $\begingroup$ 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. $\endgroup$
    – Polem
    Commented Jan 15, 2017 at 15:13
  • $\begingroup$ If the plaintext is "TRUE" with the same key.. the ciphertext will be "WSWI" ?? Is that so simple? $\endgroup$
    – Polem
    Commented Jan 15, 2017 at 15:18
  • 2
    $\begingroup$ @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). $\endgroup$ Commented Jan 15, 2017 at 15:25

The LADY is with A=0 and Z=25

is 11,0,3,24

so the sorted order is




and now

here is the trick (dump part)

the ADLY you give it by your OWN 1,2,3,4

and to match LADY

its L=3 A=1 D=2 Y=4

It took me some minutes cause i also have this class on Uni


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.