- WELCOME TO A LESSON ON TRANSPOSITION CIPHERS.
ONE APPROACH TO CRYPTOGRAPHY IS USE OF A TRANSPOSITION CIPHER
WHERE A TRANSPOSITION CIPHER IS ONE IN WHICH
THE ORDER THE CHARACTERS IS CHANGED TO OBSCURE THE MESSAGE.
AN EARLY VERSION OF A TRANSPOSITION CIPHER
WAS AN -- IN WHICH PAPER WAS WRAPPED AROUND A STICK
AND THE MESSAGE WAS WRITTEN.
ONCE UNWRAPPED, THE MESSAGE WOULD BE UNREADABLE
UNTIL THE MESSAGE WAS WRAPPED
AROUND A SIMILAR SIZED STICK AGAIN.
ONE MODERN TRANSPOSITION CIPHER
IS DONE BY WRITING THE MESSAGE IN ROWS,
THEN FORMING THE ENCRYPTED MESSAGE
FROM THE TEXT IN COLUMNS.
AS AN EXAMPLE, LET'S ENCRYPT THE MESSAGE,
"MEET AT 3:00 P.M. TODAY AT THE USUAL LOCATION"
USING ROWS OF SIX CHARACTERS.
SO IF EACH ROW HAS SIX CHARACTERS,
THAT MEANS WE SHOULD FORM A TABLE WITH SIX COLUMNS,
ONE, TWO, THREE, FOUR, FIVE, SIX.
NOTICE HOW EACH ROW WILL HAVE SIX CHARACTERS.
NEXT WE'D WRITE THE MESSAGE FROM LEFT TO RIGHT
COMPLETING EACH ROW.
NOTICE HERE WE HAVE MEET AT 3:00 P.M.
TODAY AT THE USUAL LOCATION.
AND NOW TO ENCRYPT THE MESSAGE,
WE'D WRITE THE CHARACTERS USING THE COLUMNS.
SO USING THE COLUMNS,
THE ENCRYPTED MESSAGE OR ENCODED MESSAGE WOULD BE
M, T, M, "A,", S, C, WHICH WE SEE HERE, E, H, T, T, U, "A,"
WE SEE HERE, E, R, O T, "A," T HERE, T, E, D, H, L, "I"
HERE "A," E, "A," E, L, O, AND FINALLY T, P, Y, U, O, N.
BUT THERE IS ONE MORE THING.
THE SPACES WOULD BE REMOVED OR REPOSITIONED
TO HIDE THE SIZE OF THE TABLE USED
SINCE THAT IS THE ENCRYPTION KEY IN THIS MESSAGE.
SO WE WOULDN'T LEAVE IT IN THIS FORM HERE
BECAUSE IF LEFT IN THIS FORM,
IT COULD TELL THE MESSAGE WAS ENCRYPTED
USING ROWS OF SIX CHARACTERS.
LET'S TAKE A LOOK AT ANOTHER EXAMPLE,
LET'S DECRYPT THE MESSAGE GIVEN HERE IF IT WAS ENCRYPTED
USING A TABULAR TRANSPOSITION CIPHER WITH ROWS OF LINK FOUR.
SO BECAUSE WE KNOW IT WAS FORMED
WITH ROWS OF LINK FOUR CHARACTERS,
WE'D FORM A TABLE WITH FOUR COLUMNS WHICH WE SEE HERE
BUT BEFORE WE DECRYPT THE MESSAGE,
WE DO HAVE TO KNOW HOW MANY ROWS THERE WERE.
SO WE'LL FIND THE TOTAL NUMBER OF CHARACTERS
WHICH IS 3 x 10 + THESE EXTRA TWO ARE 32 CHARACTERS.
WE'RE GOING TO DIVIDE BY THE NUMBER OF CHARACTERS PER ROW
WHICH IS FOUR, 32 DIVIDED BY 4 = 8
WHICH MEANS WE NOW KNOW WE'LL HAVE EIGHT ROWS.
SO, ONE, TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT.
SO WHEN DECRYPTING A MESSAGE USING THIS METHOD,
IT IS IMPORTANT TO ALWAYS FIND OUT HOW MANY ROWS WE HAVE
AND NOW BECAUSE THIS WAS FORMED
BY READING THE CHARACTERS OFF IN COLUMNS,
WE'LL WRITE THESE DOWN IN COLUMN ONE, TWO, THREE AND FOUR.
TO HELP US DO THIS, LET'S COUNT OFF EIGHT CHARACTERS,
SO WE HAVE THREE, SIX, SEVEN, EIGHT, FOUR, SEVEN, EIGHT,
TWO, FIVE, EIGHT, AND THEN EIGHT AGAIN.
SO THE FIRST COLUMN WILL CONSIST OF THESE CHARACTERS.
THESE WILL BE IN THE SECOND COLUMN,
THESE WILL BE IN THIRD AND SO ON.
HERE WE HAVE "A," E, S, E, "A," O, O, "I."
HERE WE HAVE T, V, U, "I," N, N, N, N,
FOLLOWED BY E, E, R, L, C, F, T, E
AND FINALLY L, N, V, L, E, R, L, S.
NOW TO DECRYPT THIS, WE'LL READ THIS OFF GOING ROW BY ROW.
SO THE ORIGINAL MESSAGE WAS AT 11, SURVEILLANCE ON FRONT LINES.
AGAIN THE MESSAGE WAS AT 11, SURVEILLANCE ON FRONT LINES.
MORE COMPLEX VERSIONS OF THIS ROWS AND COLUMN
BASED TRANSPOSITION CIPHER CAN BE CREATED
BY SPECIFYING AN ORDER IN WHICH THE COLUMNS SHOULD BE RECORDED.
FOR EXAMPLE THE METHOD COULD SPECIFY
THAT AFTER WRITING THE MESSAGE OUT IN ROWS,
THAT YOU SHOULD RECORD THE THIRD COLUMN THEN THE FOURTH COLUMN,
THEN THE FIRST, THEN THE SECOND.
THIS ADDS ADDITIONAL COMPLEXITY THAT WOULD MAKE IT HARDER
TO MAKE IT A BRUTE FORCE ATTACK.
TO MAKE THE ENCRYPTION KEY EASIER TO REMEMBER,
A WORD COULD BE USED.
FOR EXAMPLE, IF THE KEY WORD WAS MATH,
IT WOULD SPECIFY THAT ROWS SHOULD HAVE FOUR CHARACTERS EACH
BECAUSE THERE IS FOUR LETTERS IN THE WORD.
THE ORDER OF THE LETTERS IN THE ALPHABET WOULD DICTATE
WHICH ORDER TO READ THE COLUMNS IN.
SINCE "A" THE SECOND LETTER IN THE WORD,
IS THE EARLIEST LETTER IN THE ALPHABET FROM THE WORD MATH,
THE SECOND COLUMN WOULD BE USED FIRST
FOLLOWED BY THE FOURTH COLUMN BECAUSE THAT'S H,
THEN THE FIRST COLUMN BECAUSE OF THE M,
THEN THE LAST COLUMN WOULD BE THE THIRD COLUMN
BECAUSE OF THE T.
LET'S TAKE A LOOK AT TWO MORE EXAMPLES.
WE WANT TO ENCRYPT THE MESSAGE GIVEN HERE
USING A TABULAR TRANSPOSITION CIPHER
WITH ENCRYPTION KEY MAINE,
IF NECESSARY PAD THE MESSAGE WITH "A'S."
NOTICE HERE THERE ARE FIVE LETTERS IN MAINE,
SO WE BEGIN BY MAKING ROWS OF FIVE CHARACTERS
SO WE'LL HAVE FIVE COLUMNS, ONE, TWO, THREE, FOUR, FIVE.
NOW WE'LL WRITE THE MESSAGE OUT IN ROWS.
SO WE HAVE AT 4, SURVEILLANCE ON ENEMY CAMP,
WE HAVE ONE EXTRA CHARACTER HERE WE FILL WITH "A"
THAT WAY EACH ROW HAS EXACTLY FIVE CHARACTERS.
BUT NOW WE'RE NOT GOING TO READ THE ROWS OFF
FROM ROW ONE TO ROW FIVE,
WE'RE GOING TO BASE IT UPON THE LETTERS IN THE WORD MAINE.
IF WE ORDER THESE LETTERS ALPHABETICALLY
NOTICE "A" WOULD BE THE FIRST LETTER
WHICH REPRESENTS COLUMN TWO SO WE'LL READ OFF COLUMN TWO FIRST.
THE NEXT LETTER WOULD BE E, THE FIFTH LETTER,
SO WE'LL READ OFF COLUMN FIVE NEXT.
THE NEXT LETTER IN THE ALPHABET WOULD BE "I"
WHICH IS THE THIRD LETTER,
SO WE'LL READ OFF COLUMN THREE FOLLOWED BY THE LETTER M
WHICH REPRESENTS THE FIRST COLUMN SO THE FIRST COLUMN
WOULD BE READ OFF FOURTH
AND THEN FINALLY N IS THE LAST LETTER ALPHABETICALLY
SO THE LAST COLUMN WILL BE COLUMN FOUR.
SO WE'LL FIRST READ OFF COLUMN TWO, THIS COLUMN HERE,
SO OUR ENCRYPTED MESSAGE WILL BE T, S, "I," C, N, "A,"
NEXT WE'LL READ OFF COLUMN FIVE,
SO WE'LL HAVE U, V, "A," N, Y, "A," NEXT COLUMN THREE,
SO WE HAVE F, U, L, E, E, M, THEN COLUMN ONE
SO WE HAVE "A," R, E, N, E, C AND FINALLY COLUMN FOUR.
SO WE HAVE O, R, L, O, M, P.
AND AGAIN WE, AGAIN AS OUR LAST STEP,
WE SHOULD REMOVE THE SPACES,
REGROUP THESE LETTERS DIFFERENTLY NOT TO GIVE AWAY
HOW THIS WAS ENCRYPTED.
AS OUR LAST EXAMPLE, LET'S DECRYPT THE MESSAGE GIVEN HERE
IF IT WAS ENCRYPTED USING A TABULAR TRANSPOSITION CIPHER
WITH ENCRYPTION KEY PLAN.
SO THIS TELLS US THAT WE HAVE FOUR CHARACTERS PER ROW,
WE HAVE HERE, SO WE HAVE FOUR COLUMNS.
NEXT WE HAVE TO DETERMINE HOW MANY ROWS
WE WOULD HAVE BASED UPON THE NUMBER OF CHARACTERS
WHICH IS 20, SO WE'LL TAKE 20,
DIVIDE BY THE NUMBER OF CHARACTERS PER ROW
WHICH IS FOUR, AND THEREFORE WE CAN SEE
WE'LL HAVE A TOTAL OF FIVE ROWS EACH CONTAINING FOUR CHARACTERS.
SO, ONE, TWO, THREE, FOUR, FIVE
AND NOW WE'RE GOING TO COMPLETE THE COLUMNS
USING THESE CHARACTERS BASED UPON THE LETTERS IN PLAN.
SO ALPHABETICALLY "A" WOULD COME FIRST,
SO WE'LL COMPLETE COLUMN 3 FIRST.
NEXT WOULD BE THE LETTER L SO WE'LL COMPLETE COLUMN TWO,
NEXT WOULD BE N, SO WE'LL COMPLETE COLUMN FOUR,
AND THEN FINALLY WE'LL COMPLETE THE FIRST COLUMN FOR P LAST.
AND AGAIN BECAUSE EACH COLUMN HAS FIVE CHARACTERS,
LET'S BLOCK THIS INTO FIVES
SO WE'D HAVE FIRST FIVE CHARACTERS HERE,
THE NEXT FIVE, THE NEXT FIVE AND THE LAST FIVE.
THE FIRST COLUMN WE'LL COMPLETE
WILL BE COLUMN THREE BECAUSE OF THE "A"
SO NOTICE HOW WE HAVE N, "A," C, S, M IN COLUMN THREE.
THE SECOND COLUMN WE'LL COMPLETE WILL BE COLUMN TWO
BECAUSE OF THE L, SO WE'LL HAVE T, N, "A," "A," "A"
WHICH WE SEE HERE.
THE THIRD WILL BE THE FOURTH COLUMN BECAUSE OF THE N,
WE'LL HAVE O, T, K, E, P
AND THEN FOURTH WILL BE THE FIRST COLUMN
BECAUSE OF THE P WHICH WILL BE "A," O, T, B, C.
AND NOW WE'LL USE THE ROWS TO DECRYPT THE MESSAGE.
THE ORIGINAL MESSAGE WAS AT NOON, ATTACK BASE CAMP.
UNFORTUNATELY, SINCE THE TRANSPOSITION CIPHER
DOES NOT CHANGE THE FREQUENCY OF INDIVIDUAL LETTERS,
IT IS STILL SUSCEPTIBLE TO FREQUENTLY ANALYSIS
THOUGH THE TRANSPOSITION DOES ELIMINATE INFORMATION
FROM LETTER PAIRS.
I HOPE YOU FOUND THIS LESSON HELPFUL.