Study guide
7.2 Coding, Decoding & Substitution Ciphers
Ghana Armed Forces Officer Cadet Written Examination Exam
Track your progress as you read
Finished sections get a check mark.
1 Chapter 1: Orientation & GAF Officer Selection Architecture
1.1 Ghana Military Academy (GMA) Cadet Selection Overview & Regulations 1.2 Selection Phases — Screening, Aptitude Test, BFT, OLT, Medical & Final Interview 1.3 Written Examination Strategy, Competitive Scoring & Test-Taking Tactics
2 Chapter 2: Verbal Reasoning — Comprehension & Text Analysis
2.1 Military & Strategic Reading Comprehension Strategies 2.2 Drawing Inferences, Identifying Author Intent & Central Themes 2.3 Critical Text Evaluation & Logical Paragraph Coherence
3 Chapter 3: Verbal Reasoning — Grammar, Vocabulary & Usage
3.1 Lexicon Mastery — High-Frequency Vocabulary, Antonyms & Synonyms 3.2 English Grammar, Syntax, Subject-Verb Agreement & Tense Consistency 3.3 Verbal Analogies, Idiomatic Expressions & Sentence Correction
4 Chapter 4: Quantitative Aptitude — Arithmetic & Business Math
4.1 Arithmetic Operations, Number Properties & Order of Operations 4.2 Percentages, Profit and Loss, Simple and Compound Interest 4.3 Ratios, Proportions, Rates, Work and Time Problems
5 Chapter 5: Quantitative Aptitude — Algebra & Word Problems
5.1 Linear Equations, Inequalities & Simultaneous Systems 5.2 Quadratic Equations, Polynomials & Algebraic Factoring 5.3 Mathematical Word Problems & Quantitative Formulation
6 Chapter 6: Quantitative Aptitude — Geometry, Mensuration & Data
6.1 Geometric Principles — Angles, Lines, Triangles & Polygons 6.2 Mensuration — Perimeter, Area, Surface Area & Volume 6.3 Basic Probability, Statistics & Data Interpretation
7 Chapter 7: Logical Reasoning — Patterns, Sequences & Ciphers
7.1 Number, Letter & Alphanumeric Series 7.2 Coding, Decoding & Substitution Ciphers 7.3 Diagrammatic, Abstract & Matrix Pattern Recognition
8 Chapter 8: Logical Reasoning — Analytical Deduction & Arrangements
8.1 Formal Syllogisms, Venn Diagrams & Deductive Logic 8.2 Direction Sense, Distance Tracking & Cardinal Navigation 8.3 Linear and Circular Seating Arrangements & Blood Relations Logic
9 Chapter 9: General Knowledge — Ghanaian History & Governance
9.1 Pre-Colonial, Colonial Era & Ghana's Independence (1957) 9.2 The Republics, Constitutional Transitions & Key National Leaders 9.3 The 1992 Constitution, Arms of Government & Public Institutions
10 Chapter 10: General Knowledge — Geography, Defense & Security Architecture
10.1 Geography of Ghana — 16 Regions, Capitals, Physical Features & Resources 10.2 Ghana Armed Forces Structure — Army, Navy, Air Force, Command & Ranks 10.3 National Security, Peacekeeping Operations (UN/AU/ECOWAS) & Regional Security
7.2 Coding, Decoding & Substitution Ciphers
Key Takeaways Explain This Topic AI
Monoalphabetic substitution ciphers maintain fixed one-to-one character mappings, where reverse complementary pairs strictly obey the algebraic summation constant Position 1 + Position 2 = 27 \text{Position}_1 + \text{Position}_2 = 27 Position 1 + Position 2 = 27 .
Variable and progressive shift ciphers advance the transformation index by an incrementing parameter (such as + 1 , + 2 , + 3 , … +1, +2, +3, \dots + 1 , + 2 , + 3 , … or alternating + k , − m +k, -m + k , − m ), preventing naive single-shift Caesar analysis.
Positional letter-to-number coding schemes evaluate words through positional summation, scalar multipliers, letter-count weighting, or distinct consonant-vowel partition rules.
Fictitious language substitution puzzles are resolved systematically through set intersection and matrix comparison, isolating unique word-code correspondences by cross-referencing multiple linguistic statements.
Last updated: October 2026
7.2 Coding, Decoding & Substitution Ciphers
Cryptography is central to military command and control. From transmitting secure tactical call-signs over high-frequency combat net radio to verifying challenge-and-reply authentication matrices in field operations, officers must comprehend how alphabetic and numeric symbols are encrypted, obfuscated, and deciphered. On the Ghana Armed Forces (GAF) Officer Cadet Written Examination, coding-decoding questions test candidates' structured analytical deduction, working memory, and symbolic agility under tight time limits.
Letter-to-Letter Substitution Systems
In letter-to-letter coding, letters in an original message (plaintext) are transformed into target letters (ciphertext) following a deterministic rule. The primary challenge is identifying whether the shift is static, progressive, complementary, or structural.
1. Fixed Shifts (Caesar Ciphers)
In a fixed-shift cipher, every letter in the alphabet is displaced forward or backward by a constant integer offset k k k : C i ≡ ( P i + k − 1 ) ( m o d 26 ) + 1 C_i \equiv (P_i + k - 1) \pmod{26} + 1 C i ≡ ( P i + k − 1 ) ( mod 26 ) + 1
If k = + 3 k = +3 k = + 3 , ATTACK becomes DWWDFN (A → \to → D, T → \to → W, C → \to → F, K → \to → N).
If k = − 2 k = -2 k = − 2 , PATROL becomes NYRPMJ (P → \to → N, A → \to → Y, T → \to → R, R → \to → P, O → \to → M, L → \to → J).
2. Variable & Progressive Shift Ciphers
Modern aptitude exams avoid trivial fixed shifts in favor of variable algorithms where the shift parameter changes with each letter's index position:
Incrementing Step Shifter ( + 1 , + 2 , + 3 , + 4 , … +1, +2, +3, +4, \dots + 1 , + 2 , + 3 , + 4 , … ):
- Word: GUARD
- Letter 1: G ( 7 ) + 1 = 8 ⟹ H G(7) + 1 = 8 \implies H G ( 7 ) + 1 = 8 ⟹ H
- Letter 2: U ( 21 ) + 2 = 23 ⟹ W U(21) + 2 = 23 \implies W U ( 21 ) + 2 = 23 ⟹ W
- Letter 3: A ( 1 ) + 3 = 4 ⟹ D A(1) + 3 = 4 \implies D A ( 1 ) + 3 = 4 ⟹ D
- Letter 4: R ( 18 ) + 4 = 22 ⟹ V R(18) + 4 = 22 \implies V R ( 18 ) + 4 = 22 ⟹ V
- Letter 5: D ( 4 ) + 5 = 9 ⟹ I D(4) + 5 = 9 \implies I D ( 4 ) + 5 = 9 ⟹ I
- Resulting Ciphertext: HWDVI
Alternating Direction Shifter ( + k , − m , + k , − m , … +k, -m, +k, -m, \dots + k , − m , + k , − m , … ): The operation alternates between forward and backward movements, such as + 2 , − 1 , + 2 , − 1 +2, -1, +2, -1 + 2 , − 1 , + 2 , − 1 .
3. Reverse Complementary Pairings (The Rule of 27)
In a complementary substitution cipher, each letter is replaced by its diametrical counterpart in the reversed alphabet. Two letters are complementary if and only if their numerical positions sum to exactly 27 27 27 :
Position ( L ) + Position ( L ′ ) = 27 \text{Position}(L) + \text{Position}(L') = 27 Position ( L ) + Position ( L ′ ) = 27
Pair Positions Mnemonic Anchor Pair Positions Mnemonic Anchor
A — Z 1 + 26 = 27 1 + 26 = 27 1 + 26 = 27 A to Z G — T 7 + 20 = 27 7 + 20 = 27 7 + 20 = 27 G hana T elecom / GT Road
B — Y 2 + 25 = 27 2 + 25 = 27 2 + 25 = 27 B o y / By H — S 8 + 19 = 27 8 + 19 = 27 8 + 19 = 27 H igh S chool
C — X 3 + 24 = 27 3 + 24 = 27 3 + 24 = 27 C o x swain / CX I — R 9 + 18 = 27 9 + 18 = 27 9 + 18 = 27 I nfra R ed / IR
D — W 4 + 23 = 27 4 + 23 = 27 4 + 23 = 27 D e w / Down J — Q 10 + 17 = 27 10 + 17 = 27 10 + 17 = 27 J ack- Q ueen
E — V 5 + 22 = 27 5 + 22 = 27 5 + 22 = 27 EV ening / Love K — P 11 + 16 = 27 11 + 16 = 27 11 + 16 = 27 K ee P / KP
F — U 6 + 21 = 27 6 + 21 = 27 6 + 21 = 27 Fu ll / Fuel L — O 12 + 15 = 27 12 + 15 = 27 12 + 15 = 27 LO ve
M — N 13 + 14 = 27 13 + 14 = 27 13 + 14 = 27 M a n / Military-Navy — — — Worked Example — Reverse Complementary Coding:
If DEFENSE is coded as WVUVMHV, how is ATTACK coded?
Check established pairs:
- D(4) <-> W(23) [4 + 23 = 27]
- E(5) <-> V(22) [5 + 22 = 27]
- F(6) <-> U(21) [6 + 21 = 27]
- E(5) <-> V(22) [5 + 22 = 27]
- N(14) <-> M(13) [14 + 13 = 27]
- S(19) <-> H(8) [19 + 8 = 27]
- E(5) <-> V(22) [5 + 22 = 27]
Apply Rule of 27 to ATTACK:
- A(1) -> 27 - 1 = 26 -> Z
- T(20) -> 27 - 20 = 7 -> G
- T(20) -> 27 - 20 = 7 -> G
- A(1) -> 27 - 1 = 26 -> Z
- C(3) -> 27 - 3 = 24 -> X
- K(11) -> 27 - 11 = 16 -> P
- Ciphertext: ZGGZXP
- 4. Transposition & Anagram Shuffling
Transposition ciphers do not alter the identity of characters; instead, they rearrange character positions according to a spatial permutation:
Bilateral Half-Reversal: A 6-letter word divided into two 3-letter segments, each reversed internally: VECTOR → \to → Split: VEC | TOR → \to → Reverse: CEV | ROT → \to → CEVROT .
Odd-Even Interlacing: Extracting odd-indexed letters first, followed by even-indexed letters: BRIGADE (Indices 1 to 7) → \to → Odd positions (1, 3, 5, 7: B, I, A, E ) + Even positions (2, 4, 6: R, G, D ) ⟹ \implies ⟹ BIAERGD .
Matrix Grid Transposition: Writing plaintext horizontally across fixed columns and reading vertically down rows.
Letter-to-Number Coding Methodologies
Letter-to-number problems map words to numerical values. Candidates must test whether the output represents a direct sum, a weighted calculation, or an operation involving word length.
Common Letter-to-Number Operational Rules
Direct Positional Summation: Value = ∑ i = 1 n Pos ( L i ) \text{Value} = \sum_{i=1}^n \text{Pos}(L_i) Value = ∑ i = 1 n Pos ( L i ) For example, CADET = 3 + 1 + 4 + 5 + 20 = 33 = 3 + 1 + 4 + 5 + 20 = 33 = 3 + 1 + 4 + 5 + 20 = 33 .
Sum Scaled by Word Length: Value = ( ∑ i = 1 n Pos ( L i ) ) + n or ( ∑ i = 1 n Pos ( L i ) ) × n \text{Value} = \left( \sum_{i=1}^n \text{Pos}(L_i) \right) + n \quad \text{or} \quad \left( \sum_{i=1}^n \text{Pos}(L_i) \right) \times n Value = ( ∑ i = 1 n Pos ( L i ) ) + n or ( ∑ i = 1 n Pos ( L i ) ) × n If CADET is coded as 38 38 38 , the rule is the positional sum ( 33 33 33 ) plus the number of letters ( n = 5 n = 5 n = 5 ).
Reverse Positional Summation: Value = ∑ i = 1 n ( 27 − Pos ( L i ) ) \text{Value} = \sum_{i=1}^n (27 - \text{Pos}(L_i)) Value = ∑ i = 1 n ( 27 − Pos ( L i )) For CADET : ( 27 − 3 ) + ( 27 − 1 ) + ( 27 − 4 ) + ( 27 − 5 ) + ( 27 − 20 ) = 24 + 26 + 23 + 22 + 7 = 102 (27-3) + (27-1) + (27-4) + (27-5) + (27-20) = 24 + 26 + 23 + 22 + 7 = 102 ( 27 − 3 ) + ( 27 − 1 ) + ( 27 − 4 ) + ( 27 − 5 ) + ( 27 − 20 ) = 24 + 26 + 23 + 22 + 7 = 102 .
Vowel-Consonant Partitioning: Vowels are assigned sequential indices ( A = 1 , E = 2 , I = 3 , O = 4 , U = 5 A=1, E=2, I=3, O=4, U=5 A = 1 , E = 2 , I = 3 , O = 4 , U = 5 ) while consonants retain standard alphabetical positions, or consonants and vowels are summed into separate multipliers. Worked Example — Weighted Number Coding:
In a signal code, SQUAD is coded as 67 and TEAM is coded as 43. What is the code for PLATOON?
Step 1: Test the plain positional sum.
- SQUAD: S(19) + Q(17) + U(21) + A(1) + D(4) = 62, but the code is 67 (difference 5)
- TEAM: T(20) + E(5) + A(1) + M(13) = 39, but the code is 43 (difference 4)
Step 2: Explain the differences.
SQUAD has 5 letters and its difference is 5.
TEAM has 4 letters and its difference is 4.
Rule: code = positional sum + number of letters.
Step 3: Apply the rule to PLATOON (7 letters).
- P(16) + L(12) + A(1) + T(20) + O(15) + O(15) + N(14) = 93
- Code = 93 + 7 = 100
Always confirm a rule on every given example before applying it.
Fictitious Language Decryption (Matrix Comparison Technique)
Fictitious (artificial) language questions present three or four statements in an unfamiliar mock language alongside English translations. The word order in the cipher statements is scrambled relative to the English sentences. To solve these, candidates must use set intersection to cross-reference statements and isolate individual word meanings. Worked Example — Fictitious Language Matrix Deduction:
Given the following intelligence intercepts:
- Statement 1: "moko tari veda" means "advance forward platoon"
- Statement 2: "tari belo zuni" means "platoon secure perimeter"
- Statement 3: "veda zuni koba" means "advance perimeter armor"
Objective: Determine the exact code word for "armor".
Step 1: Compare Statement 1 and Statement 2:
- Common coded word: "tari"
- Common English word: "platoon"
- Deduction: "tari" = "platoon"
Step 2: Compare Statement 1 and Statement 3:
- Common coded word: "veda"
- Common English word: "advance"
- Deduction: "veda" = "advance"
Step 3: Resolve Remaining Term in Statement 1:
Statement 1 has only "moko" remaining.
English translation has only "forward" remaining.
Deduction: "moko" = "forward"
Step 4: Compare Statement 2 and Statement 3:
- Common coded word: "zuni"
- Common English word: "perimeter"
- Deduction: "zuni" = "perimeter"
Step 5: Resolve Statement 3 to Isolate "armor":
- Statement 3 elements: "veda" (advance) + "zuni" (perimeter) + "koba"
- English elements: "advance" + "perimeter" + "armor"
- Eliminating "advance" and "perimeter" leaves: "koba" = "armor"
Conclusion: The code word for "armor" is "koba".
Grid, Matrix & Coordinate Ciphers
Coordinate ciphers map characters into a two-dimensional grid, converting each letter into a row-column coordinate pair.
The Polybius Square ( 5 × 5 5 \times 5 5 × 5 Grid)
The letters of the alphabet are arranged in a 5 × 5 5 \times 5 5 × 5 grid, combining I I I and J J J into a single cell:
- 1 2 3 4 5
- 1 A B C D E
- 2 F G H I/J K
- 3 L M N O P
- 4 Q R S T U
- 5 V W X Y Z
Each letter is encrypted as a two-digit number (Row, Column):
- C ⟹ 13 \implies 13 ⟹ 13
- A ⟹ 11 \implies 11 ⟹ 11
- D ⟹ 14 \implies 14 ⟹ 14
- E ⟹ 15 \implies 15 ⟹ 15
- T ⟹ 44 \implies 44 ⟹ 44
- CADET ⟹ 13 11 14 15 44 \implies 13\ 11\ 14\ 15\ 44 ⟹ 13 11 14 15 44
Historically, the German ADFGVX cipher of the First World War replaced the row and column numbers with the letters A, D, F, G, V, and X, but the lookup logic is identical.
Tactical Communications & Field Signal Authentication
Military operations require robust communications security (COMSEC). In field environments, junior officers must apply cipher principles across several core procedures:
Challenge-and-Reply Authentication: A radio operator transmits a two-letter challenge (e.g., "Delta Hotel"). The receiving station locates "Delta" on the vertical axis of the daily authentication matrix, tracks horizontally to column "Hotel", and reads the reciprocal authentication letter to confirm friendly identity.
Brevity Codes & Prowords: Standard operational words (such as Roger , Wilco , Sunray , Sitrep ) eliminate ambiguity and deny adversaries contextual information during unencrypted tactical VHF bursts.
Transmission Security (TRANSEC): Keeping transmissions as short as possible and rotating pre-assigned daily call-sign allocations to defeat electronic direction-finding and traffic analysis by hostile forces.
Cryptographic Systems Reference Table
Cipher Mechanism Operating Principle Algorithmic Rule Primary Detection Strategy
Caesar (Fixed Shift) Constant alphabetical translation C i = ( P i + k ) ( m o d 26 ) C_i = (P_i + k) \pmod{26} C i = ( P i + k ) ( mod 26 ) Constant distance between all plaintext/ciphertext pairs
Progressive Shift Incrementing displacement C i = ( P i + i ) ( m o d 26 ) C_i = (P_i + i) \pmod{26} C i = ( P i + i ) ( mod 26 ) Differences expand by + 1 +1 + 1 across successive letters
Reverse Complement Reflection across midpoint ( M / N M/N M / N ) Pos ( C i ) = 27 − Pos ( P i ) \text{Pos}(C_i) = 27 - \text{Pos}(P_i) Pos ( C i ) = 27 − Pos ( P i ) Letter pairs sum invariant to 27 27 27 ( A ↔ Z , B ↔ Y A \leftrightarrow Z, B \leftrightarrow Y A ↔ Z , B ↔ Y )
Transposition Spatial rearrangement of characters Permutation matrix Character frequency matches natural language; letters are identical
Positional Numeric Value mapping of letters Sum, product, or length-weighted Compare sum of forward coordinates against target integer
Artificial Language Symbolic token substitution One-to-one word mapping Matrix cross-comparison and set intersection across sentences