Tool to decrypt/encrypt with digrafide. The Digrafid cipher is a tomogrammic encryption system using two grids of letters and transpositions of their coordinated.
Digrafid Cipher  dCode
Tag(s) : Polygrammic Cipher
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
> [News]: Discover the next version of dCode Digrafid Cipher!
Sponsored ads
Tool to decrypt/encrypt with digrafide. The Digrafid cipher is a tomogrammic encryption system using two grids of letters and transpositions of their coordinated.
Digrafide encryption uses 2 grids (of 3x9 and 9x3) with 27 characters: ABCDEFGHIJKLMNOPQRSTUVWXYZ# (the # symbol is added to the alphabet).
Example: Encrypt DCODE with two alphabetical grids with identical content: ABCDEFGHIJKLMNOPQRSTUVWXYZ#, the first (1) is horizontal and the second (2) vertical and are connected by a 3rd grid (3) numeric 3x3 as follows:
(1)
 (3)
 

Split the plain message into blocks of 6 and make 3 bigrams. If the message to be encrypted has a nonmultiple length of 6, symbols are added (usually #).
Example: The length of the plain text DCODE (5 letters) is not multiple of 6, add # at the end: DCODE# and the cut in bigrams to get DC,OD,E#
For each bigram consisting of the letters L1 and L2, carry out the following operations:
1) Write down 3 numbers:
 Mark in the grid 1 the column number of the letter L1.
 Mark in the grid 3 the intersection number of the line L1 in the grid 1 and the column of L2 in the grid 2.
 Mark in grid 2 the line number of the letter L2.
Example: For the first bigram DC, in grid 1, the letter D is in position (1,4) (line 1, column 4). In grid 2, the letter C is in position (1,3) (line 1, column 3). The intersection of the two letters in the grid 3 is thus in position (1,3) (line 1, column 3) is the number 3.
4,3,1 are the 3 digits necessary for the following the ciphering: (4: column of the letter D in the grid 1, 3 number of the grid 3, and 1 line of the letter C in the grid 3) . In the same way OD and E# respectively correspond to triplets 6,4,2 and 5,3,9.
2) Write the 3 groups of 3 digits obtained in the block of 6 horizontally one below the other.
Example:
4  3  1 
6  4  2 
5  3  9 
3) Then read vertically (in columns) to obtain 3 new 3digit numbers.
Example: Reading in column gives 3 new triplets: 4,6,5, 3,4,3, 1,2,9.
4) With the numbers x,y,z of each triplet, locate
 The position of y in grid 3 (line L, column C)
 The letter in line position L, column x in grid 1
 The letter in line position z, column C in grid 2
The 2 letters obtained are the numerical letters for the bigram
Example: With the first triplet 4,6,5, mark 6 in grid 3 which is on line 2 and column 3.
The letter in grid 1, positioned column 4, line 2 is M.
The letter in grid 2, positioned column 3, line 5 is O.
M and O are therefore the 2 encrypted letters.
Repeat the 4 operations for each bigram, and repeat the complete algorithm for each block of 6 letters of plain text.
Example: The other 2 triplets give LG and AZ, the final encrypted message is: MOLGAZ
Decryption is identical to encryption process.
The encrypted message has a fairly low index or coincidence. The message has no specific characteristics, a hacker can attack it by a frequency analysis of bigrams.
Multiple variants can be created. First, the reading order of the grids may be reversed (both at the the beginning step and the end step). Then, the order of triplet numbers can be changed. Finally, the grid sizes can be changed, even if 3 * 9 = 27 is very convenient.
dCode retains ownership of the source code of the script Digrafid Cipher online. Except explicit open source licence (indicated Creative Commons / free), any algorithm, applet, snippet, software (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any function (convert, solve, decrypt, encrypt, decipher, cipher, decode, code, translate) written in any informatic langauge (PHP, Java, C#, Python, Javascript, Matlab, etc.) which dCode owns rights will not be given for free. To download the online Digrafid Cipher script for offline use on PC, iPhone or Android, ask for price quote on contact page !
> [News]: Discover the next version of dCode Digrafid Cipher!