Você está na página 1de 2

Encryption Keys Two-Way

by Eduardo Petazze
We base this paper on the ability to encrypt / decrypt all 256 characters that are used in computing, in the Western Hemisphere.
A two-way encryption is comprised of:
key "p" which is used to encrypt a plain text
key "q" that is used to decrypt the encrypted text.
"p" and "q" are odd numbers associated in a function module M = p*q-1
To encrypt 256 characters (0 to 255), the value of M must be equal to, or multiple of, 256.
Plain text "x" to be encrypt, is transformed into a ciphertext "y" applying the following function:

y = Mod(Mod(x*p;M);256)
Plain text "x" is retrieved from the ciphertext "y" applying the following transformation:

x =Mod(Mod(y*q;M);256)
The following values of x, y, M are the basis of Two-Way cryptography:
Base 256
Base 256
p
q M=(p*q-1)
p
q M=(p*q-1)
1
1
0
129
129
16,640
3
171
512
131
43
5,632
5
205
1,024
133
77
10,240
7
183
1,280
135
55
7,424
9
57
512
137
185
25,344
11
163
1,792
139
35
4,864
13
197
2,560
141
69
9,728
15
239
3,584
143
111
15,872
17
241
4,096
145
113
16,384
19
27
512
147
155
22,784
21
61
1,280
149
189
28,160
23
167
3,840
151
39
5,888
25
41
1,024
153
169
25,856
27
19
512
155
147
22,784
29
53
1,536
157
181
28,416
31
223
6,912
159
95
15,104
33
225
7,424
161
97
15,616
35
139
4,864
163
11
1,792
37
173
6,400
165
45
7,424
39
151
5,888
167
23
3,840
41
25
1,024
169
153
25,856
43
131
5,632
171
3
512
45
165
7,424
173
37
6,400
47
207
9,728
175
79
13,824
49
209
10,240
177
81
14,336
51
251
12,800
179
123
22,016
53
29
1,536
181
157
28,416
55
135
7,424
183
7
1,280
57
9
512
185
137
25,344
59
243
14,336
187
115
21,504
61
21
1,280
189
149
28,160
63
191
12,032
191
63
12,032
65
193
12,544
193
65
12,544
67
107
7,168
195
235
45,824
69
141
9,728
197
13
2,560
71
119
8,448
199
247
49,152
73
249
18,176
201
121
24,320
75
99
7,424
203
227
46,080
77
133
10,240
205
5
1,024
79
175
13,824
207
47
9,728
81
177
14,336
209
49
10,240
83
219
18,176
211
91
19,200
85
253
21,504
213
125
26,624
87
103
8,960
215
231
49,664
89
233
20,736
217
105
22,784
91
211
19,200
219
83
18,176
93
245
22,784
221
117
25,856
95
159
15,104
223
31
6,912
97
161
15,616
225
33
7,424
99
75
7,424
227
203
46,080
101
109
11,008
229
237
54,272
103
87
8,960
231
215
49,664
105
217
22,784
233
89
20,736
107
67
7,168
235
195
45,824
109
101
11,008
237
229
54,272
111
143
15,872
239
15
3,584
113
145
16,384
241
17
4,096
115
187
21,504
243
59
14,336
117
221
25,856
245
93
22,784
119
71
8,448
247
199
49,152
121
201
24,320
249
73
18,176
123
179
22,016
251
51
12,800
125
213
26,624
253
85
21,504
127
127
16,128
255
255
65,024
Values of "p" and "q" highlighted in red (1, 127, 129, and 255) have the plaintext "x"
unchanged.

a
b
c
d
e
f
g
h
i

Sample text to encrypt with p=25; M=1024:


An encrypted text, it is easy to decrypt.
The mathematical function "module" links univocally the encryption and decryption keys.
The numerical product of both keys minus the number "1" is the numerical value of the function module.
Each character has an associated numerical value that uniquely represents.
A total of 256 characters represented from 0 to 255, is suitable for general purpose computing on Western.
We chose two odd numbers "p" and "q", for that pair, the value of the module result be "p*q-1"
The mathematical function module, transforms a number (say "x") in a new number "y", where y = Mod (x*p;p*q-1)
It recovers the original number "x" with the following operation: x = Mod (y*q; p*q-1)

a
b
c
d
e
f
g
h
i

y TT T "T AT( -
Y "T TTL AT A; y; T "T~
4( yT(yTAy mTA RmR As; mAy T( "TA y "TA s;~
4( m"Ay "mT T( s; Am; T( m" RR A; T( m"Ay ym T( mTA m~
y( (y"yT" (y; y y;;AyT m"Ay ym T(yT mAm "";T;~
Y TTy -F (y"yT"; "";T " T --L A; ;mATy " "y m"; mTA ;T"~
 (; T m"; RR y RRL " T(yT yA"L T( ym T( m ";mT ReR
4( yT(yTAy mTA mL T"y;"; y m" ;y RR A y m" RRL (" e
!T ""; T( "AAy m" RR AT( T( A "yTA e

Postscript:
The position occupied by each character can be encrypted by different keys "p".
Other mathematical operations between characters (including matrix inversion, etc.) are usually provided to hinder the breaking of the encryption
code sequence by use of brute force.

Você também pode gostar