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:


LADY(KEY)
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)?
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).