Trifid cipher

From Wikipedia, the free encyclopedia

In classical cryptography, the trifid cipher is a cipher invented around 1901 by Felix Delastelle, which extends the concept of the bifid cipher to a third dimension, allowing each symbol to be fractionated into 3 elements instead of two. That is, while the bifid uses the Polybius square to turn each symbol into co-ordinates on a 5 × 5 (or 6 × 6) square, the trifid turns them into co-ordinates on a 3 × 3 × 3 cube. As with the bifid, this is then combined with transposition to achieve diffusion. However a higher degree of diffusion is achieved because each output symbol depends on 3 input symbols instead of two. Thus the trifid was the first practical trigraphic substitution.

Contents

First, a mixed alphabet cubic analogue of the Polybius square is drawn up:

Layer 1 Layer 2 Layer 3
1 2 3 1 2 3 1 2 3
1 F J O 1 V Z L 1 E U Q
2 R X C 2 G D P 2 N H A
3 Y B S 3 M W T 3 . K I

In theory, the message is then converted to its coordinates in this grid; in practice, it is more convenient to write the triplets of trits out in a table, like so:

F 111 C 132 W 223 U 321
R 112 S 133 L 231 H 322
Y 113 V 211 P 232 K 323
J 121 G 212 T 233 Q 331
X 122 M 213 E 311 A 332
B 123 Z 221 N 312 I 333
O 131 D 222 . 313

Then the co-ordinates are written out vertically beneath the message:

T R E A T Y E N D S B O E R W A R .
2 1 3 3 2 1 3 3 2 1 1 1 3 1 2 3 1 3
3 1 1 3 3 1 1 1 2 3 2 3 1 1 2 3 1 1
3 2 1 2 3 3 1 2 2 3 3 1 1 2 3 2 2 3

They are then read out in rows:

2 1 3 3 2 1 3 3 2 1 1 1 3 1 2 3 1 3 3 1 1 3 3 1 1 1 2 3 2 3 1 1 2 3 1 1 3 2 1 2 3 3 1 2 2 3 3 1 1 2 3 2 2 3

Then divided up into triplets again, and the triplets turned back into letters using the table:

213 321 332 111 312 313 311 331 112 323 112 311 321 233 122 331 123 223
 M   U   A   F   N   .   E   Q   R   K   R   E   U   T   X   Q   B   W

In this way, each ciphertext character depends on three plaintext characters, so the trifid is a trigraphic cipher. To decrypt, the procedure is simply reversed.

As the bifid concept is extended to higher dimensions, we are much less free in our choice of parameters.

Since 23 = 8 < 26 < 27 = 33, our cube needs to have a side length of at least three in order to fit in the 26 letters of the alphabet. But if we go even to 4, then our symbol set would have 43 = 64 symbols, which is probably too much for classical cryptography. Thus, the trifid is only ever implemented with a 3 × 3 × 3 cube, and each co-ordinate is indicated by a trinary digit, or trit. Incidentally, note that since this gives us 27 symbols, we will have one extra. In the example above, the period or full-stop was used.

If we increase the dimensions further to four, noting that 24 = 16 < 26, we still need a side length of 3 - giving a symbol set of size 34 = 81, far more than we need. If we go one step further, to five dimensions, then we only need a side length of 2, since 25 = 32 > 26. But such a binary encoding - 5 bits - is what occurs in Baudot code for telegraphic purposes. Breaking letters into bits and manipulating the bits individually is the hallmark of modern cryptography. Thus, in a sense, the trifid cipher can be thought to stand on the border between classical cryptography's ancient Polybius square, and the binary manipulations of the modern world.


Classical cryptography
v  d  e
Ciphers: ADFGVX | Affine | Alberti | Atbash | Autokey | Bifid | Book | Caesar | Four-square | Hill | Keyword | Nihilist | Permutation | Pigpen | Playfair | Polyalphabetic | Polybius | Rail Fence | Reihenschieber | Reservehandverfahren | ROT13 | Running key | Scytale | Smithy code | Solitaire | Straddling checkerboard | Substitution | Tap Code | Transposition | Trifid | Two-square | VIC cipher | Vigenère
Cryptanalysis: Frequency analysis | Index of coincidence
Misc: Cryptogram | Bacon | Polybius square | Scytale | Straddling checkerboard | Tabula recta
Cryptography
v  d  e
History of cryptography | Cryptanalysis | Cryptography portal | Topics in cryptography
Symmetric-key algorithm | Block cipher | Stream cipher | Public-key cryptography | Cryptographic hash function | Message authentication code | Random numbers
Advanced Search
Included Web Search Engines


Safe Search

close

Top Matching Results

Occasionally Search.com will highlight specialized results that are based on the context of your query. Examples of specialized results include specific links to news, images, or video.

Top Matching Results may highlight information from other Search.com pages, content from the CNET Network of sites, or third party content. The listings are based purely on relevance. Search.com does not receive payment for listings in this section but our partners that provide this data may get paid for listing these products.

Sponsored Links

This section contains paid listings which have been purchased by companies that want to have their sites appear for specific search terms and related content. These listings are administered, sorted and maintained by a third party and are not endorsed by Search.com.

Search Results

Search.com sends your search query to several search engines at one time and integrates the results into one list which has been sorted by relevance using Search.com's proprietary algorithm. You can customize the list of search engines included in your metasearch from the preferences.

The search engines that are used in your metasearch may allow companies to pay to have their Web sites included within the results. To view the Paid Inclusion policy for a specific search engine, please visit their Web site. Search.com does not accept payment or share revenue with any search engine partner for listings in this section.