A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | AA | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

1 | |||||||||||||||||||||||||||

2 | SNIPH | ||||||||||||||||||||||||||

3 | |||||||||||||||||||||||||||

4 | |||||||||||||||||||||||||||

5 | Snerx's N-Dimensional Cipher | ||||||||||||||||||||||||||

6 | First Dimension | Second Dimension | Third Dimension | ||||||||||||||||||||||||

7 | |||||||||||||||||||||||||||

8 | Sniph is meant to be a dynamically shifting multi-dimensional cipher. The impulse for | 1-1 | 1 | 2 | 3 | ||||||||||||||||||||||

9 | creating this cipher was twofold: to create the first dynamically scalable N-dimensional | 1 | 1-1 | 1-2 | 1-3 | ||||||||||||||||||||||

10 | cipher and to create the first cipher that is in principle impossible to knowingly | 2 | 2-1 | 2-2 | 2-3 | ||||||||||||||||||||||

11 | bruteforce. Further, I wanted to be able to use a homebrewed cipher without higher- | 1 | 2 | 3 | 3 | 3-1 | 3-2 | 3-3 | 1-1 | 1 | 2 | 3 | |||||||||||||||

12 | maths so the entire process could be easily done by hand. This is a work in progress | 1 | 1-1 | 1-2 | 1-3 | 1 | A | B | C | ||||||||||||||||||

13 | but all these goals are now provably met, and so if any changes occur from now on, | 2 | 2-1 | 2-2 | 2-3 | 2 | D | E | F | ||||||||||||||||||

14 | they will be minor changes. | 3 | 3-1 | 3-2 | 3-3 | 1-2 | 1 | 2 | 3 | 3 | G | H | I | ||||||||||||||

15 | 1 | 1-1 | 1-2 | 1-3 | |||||||||||||||||||||||

16 | 2 | 2-1 | 2-2 | 2-3 | |||||||||||||||||||||||

17 | The way it works is by generating tables of variable sizes that are then seated inside | 3 | 3-1 | 3-2 | 3-3 | 1-2 | 1 | 2 | 3 | ||||||||||||||||||

18 | of each other to the Nth dimension specified by the user in the cli. The breadcrumb or | 1 | J | K | L | ||||||||||||||||||||||

19 | 'pathway' through each dimension/table-set is chosen based on a passphrase. For | 2 | M | N | O | ||||||||||||||||||||||

20 | example, if your passphrase was 'henlo', the cipher would look at 'h' as being the 8th | 3 | P | Q | R | ||||||||||||||||||||||

21 | letter of the alphabet and then pick the 8th position in the table to open. The cipher | ||||||||||||||||||||||||||

22 | would then look at 'e' as being the 5th letter of the alphabet and pick the 5th position | ||||||||||||||||||||||||||

23 | in the next table to open. This continues until every letter is used, and then the | ||||||||||||||||||||||||||

24 | process repeats starting with the first letter again until n-2 tables in the path are | ||||||||||||||||||||||||||

25 | opened. The reason for it being n-2 is explained later. | ||||||||||||||||||||||||||

26 | First Dimension | Second Dimension | |||||||||||||||||||||||||

27 | In the first set of tables to the right, the tables generated are a 3x3 size, and go 3 | ||||||||||||||||||||||||||

28 | dimensions deep. Through the highlighted paths, the letter 'H' can be represented by | 1-1 | 1 | 2 | 3 | 4 | 5 | ||||||||||||||||||||

29 | the path of 1-2, then 1-1, and then 3-2. The letter H is then translated into its path: | 1 | A | B | C | D | E | ||||||||||||||||||||

30 | '121132'. Using the right, 'HELLO' looks like '121132121122121213121213121223'. | 2 | F | G | H | I | J | ||||||||||||||||||||

31 | Similarly, in a 5x5 table that only goes 2 dimensions deep, an 'H' could like like '2423' | 3 | K | L | M | N | O | ||||||||||||||||||||

32 | or '5312'. Having many-to-one outputs-to-inputs adds highly significant obfuscation to | 1 | 2 | 3 | 4 | 5 | 4 | P | Q | R | S | T | |||||||||||||||

33 | the cipher. Note that the last two dimensions (seated table sets) are what determines | 1 | 1-1 | 1-2 | 1-3 | 1-4 | 1-5 | 5 | U | V | W | X | Y | ||||||||||||||

34 | the character being chosen, so the passphrase used to determine the path up until | 2 | 2-1 | 2-2 | 2-3 | 2-4 | 2-5 | ||||||||||||||||||||

35 | that point does not determine the table positions of the last two tables. This is to | 3 | 3-1 | 3-2 | 3-3 | 3-4 | 3-5 | ||||||||||||||||||||

36 | create a separation between the OTP keys and the letter to be deciphered. In these | 4 | 4-1 | 4-2 | 4-3 | 4-4 | 4-5 | 5-3 | 1 | 2 | 3 | 4 | 5 | ||||||||||||||

37 | last two tables the letter being chosen will appear multiple times and the choice for | 5 | 5-1 | 5-2 | 5-3 | 5-4 | 5-5 | 1 | G | H | I | J | K | ||||||||||||||

38 | which position to pick is determined randomly in the code. This makes it possible to | 2 | L | M | N | O | P | ||||||||||||||||||||

39 | have both true randomness and predetermined OTP keys in the same cipher. To | 3 | Q | R | S | T | U | ||||||||||||||||||||

40 | clarify, this allows you to use OTP keys without having to transmit the OTP keys each | 4 | V | W | X | Y | Z | ||||||||||||||||||||

41 | time you generate ciphertext and allows you to reuse the same keys and not generate | 5 | . | , | ? | ! | : | ||||||||||||||||||||

42 | similar-looking output each time. The reason why the pathways matter so much and | ||||||||||||||||||||||||||

43 | why they are being treated as OTP keys is because the most significant feature of this | ||||||||||||||||||||||||||

44 | cipher is the dynamically generated 'shift' or character translation determined by the | ||||||||||||||||||||||||||

45 | path to each character. Every two numbers in a ciphered character's path, with the | ||||||||||||||||||||||||||

46 | exception of the last four (since those are used to determine specific table spots), is | ||||||||||||||||||||||||||

47 | taken as an x-y equation, and these are added up to determine the total number of | Note On The Above Tables | |||||||||||||||||||||||||

48 | characters to shift (randomly gen'd Caesar cipher). For example, the charset from | ||||||||||||||||||||||||||

49 | those first 3x3 tables, after choosing 1-2 (which results in -1), would be shifted back | These were not generated with the cipher itself, they are merely for | |||||||||||||||||||||||||

50 | one character. This means that the pathway for each character makes each character | representational purposes. The actual cipher needs to be at least four | |||||||||||||||||||||||||

51 | carry its own one-time-pad, arbitrarily generated by a passphrase. | seated dimensions deep, so the text in the above tables is arbitrarily | |||||||||||||||||||||||||

52 | thrown in for example purposes only. Also, the table sides do not need to | ||||||||||||||||||||||||||

53 | Additionally, the numbers chosen for paths are not limited to the dimensions of the | be the same length, they can be 3x7, or 8x2, or 10x9, etcetera. | |||||||||||||||||||||||||

54 | tables they are generated from. To stop text-analysis from revealing the table size | ||||||||||||||||||||||||||

55 | (which would be obvious if the only numbers used were 1, 2, and 3, like in the first | ||||||||||||||||||||||||||

56 | table set on the right), all numbers from 0 to 9 are used. The leftover numbers wrap | ||||||||||||||||||||||||||

57 | and are re-used in sequence as duplicates of the initial numbers. For example, after 3, | ||||||||||||||||||||||||||

58 | 4 could stand in for 1, 5 for 2, 6 for 3, and 7 for 1 again, etcetera. Given this, the last 'H' | ||||||||||||||||||||||||||

59 | shown on the right, stated as '5312', could also appear as '0817' or '5862'. Selecting | Minimal Character Set | |||||||||||||||||||||||||

60 | which numbers to use, the default or a leftover, is randomnly decided by the code at no | ||||||||||||||||||||||||||

61 | extra processing cost since this is arbitrary for ciphering the text. This step makes | A | B | C | D | E | F | G | H | ||||||||||||||||||

62 | discovering the size of the table used impossible by simply looking at the ciphered | I | J | K | L | M | N | O | P | ||||||||||||||||||

63 | text. In a similar vein, the dimensionality of the ciphered text is made impossible to | Q | R | S | T | U | V | W | X | ||||||||||||||||||

64 | discover- the output cuts out the initial pathway numbers since those are determined | Y | Z | . | , | ? | ! | : | ; | ||||||||||||||||||

65 | by the passphrase. Each input character then has four output characters, specifically | ' | " | / | \ | | | < | > | + | ||||||||||||||||||

66 | the four that determine the positions of the character in the last two tables. Further, | - | = | ( | ) | { | } | [ | ] | ||||||||||||||||||

67 | knowing two of the three input variables still does not let you break the cipher since | ` | ~ | @ | # | $ | % | ^ | & | ||||||||||||||||||

68 | without the third you will get nothing but junk text as output every time. As an extra | * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ||||||||||||||||||

69 | layer of security, text at the end can be shifted over and wrapped around into the front | 8 | 9 | 0 | space | newline | case-shift | 70 total | |||||||||||||||||||

70 | of the message, or vice versa. In the cli this would be the 'Offset Variable'. | ||||||||||||||||||||||||||

71 | |||||||||||||||||||||||||||

72 | |||||||||||||||||||||||||||

73 | Ciphering text with Sniph comes with very little processing cost since no higher maths | ||||||||||||||||||||||||||

74 | are used, pathways to characters are arbitrary, and the disproportionate majority of | ||||||||||||||||||||||||||

75 | tables do not need to be generated. The processing cost to decipher however, if you | https://github.com/VivaCaligula/SNYPH | |||||||||||||||||||||||||

76 | don't know the table size or dimensions or passphrase/OTP keys, is far more than | ||||||||||||||||||||||||||

77 | just an exponential jump. Every possible table size and dimension combination has to | Sniph is based on an older project of ours under a very similar name, the | |||||||||||||||||||||||||

78 | be generated and tried in order to attempt a brute-force of ciphered text under Sniph. | source code of which is hosted in the above link. | 2018/2/7 | ||||||||||||||||||||||||

79 | Becuase N-dimensions means N-dimensions, you can set it to 1,000-D with 10x10 | ||||||||||||||||||||||||||

80 | tables, and the random-looking outputs it would generate due to each character | ||||||||||||||||||||||||||

81 | carrying its own OTP key makes brute-forcing this create a hermeneutical lacuna. | ||||||||||||||||||||||||||

82 | |||||||||||||||||||||||||||

83 | Sniph has a minor limitation- the smallest table size and dimensionality is 3x3 and 4, | ||||||||||||||||||||||||||

84 | respectively. This is due to the size of the charset shown on the right. Since the tables | ||||||||||||||||||||||||||

85 | are already technically 2-dimensional, and a minimum of 3 extended dimensions are | ||||||||||||||||||||||||||

86 | added on to the base tables in Sniph, this makes Sniph start as a 5D cipher. To my | ||||||||||||||||||||||||||

87 | knowledge, the highest dimension cipher in commercial use is in a 5D encryption | ||||||||||||||||||||||||||

88 | protocol. Considering that Sniph starts at 5D, this should make it stand out. | ||||||||||||||||||||||||||

89 | |||||||||||||||||||||||||||

90 | |||||||||||||||||||||||||||

91 | |||||||||||||||||||||||||||

92 | |||||||||||||||||||||||||||

93 | |||||||||||||||||||||||||||

94 | |||||||||||||||||||||||||||

95 | |||||||||||||||||||||||||||

96 | |||||||||||||||||||||||||||

97 | |||||||||||||||||||||||||||

98 | |||||||||||||||||||||||||||

99 | |||||||||||||||||||||||||||

100 |

Loading...

Main menu