Skip to content

Commit c23116b

Browse files
authored
Update README.md
1 parent 0a16dce commit c23116b

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ It is also a part of [_RedLibrary_](https://github.com/Red-company/RedLibrary).
1212

1313
## Why I decided to concept that?
1414

15-
I was understanding how _DiffieHellman_ works and I thought, _DH_ is really good for making _secure client-server messaging channels_, but _I did have an idea_ how to make the algorithm longer but get an opportunity _to hide the base number_ you use and get a _really good level of safety_.
15+
I was understanding how _DiffieHellman_ works and I thought, _DH_ is really good for making _secure client-server messaging channels_, but _I did have an idea_ how to make the algorithm longer(and safer) and get an opportunity _to hide the base number_ you use.
1616

1717
## How _2lDH_ works by DH colors method?
1818

@@ -37,7 +37,7 @@ Diffie-Hellman(colors)
3737
\___/ \___/
3838
```
3939

40-
I'm sure you know it, so, I wrote it here to make it easier to compare with my _2-layer DH_. <br/><br/>
40+
I'm sure you know it, so, I wrote it here to make it easier to compare with _2-layer DH_. <br/><br/>
4141
Let's have a look of _2-layer DiffieHellman_:
4242

4343
```C
@@ -82,7 +82,7 @@ Shared key = hab
8282
----------
8383
```
8484
85-
So, as you can see, that looks like a doubled _DiffieHellman_, and yeah, it is, but, first of all, our _Base Num_ is hidden now, secondly, this _DH_ edition is more secure(it's _not as fast_ as _original DiffieHellman_), and, thirdly, we spend _reasonable time_ to get well secured. In fact, there are some _difficulcy modes_ in this library, which gives it an _ability_ to it to be rather _wide-usable_.
85+
So, as you can see, that looks like a doubled _DiffieHellman_, and yeah, it is, but, first of all, our _Base Num_ is hidden now, secondly, this _DH_ edition is now safed from log function and, thirdly, we spend _reasonable time_ to get well secured. In fact, there are some _difficulcy modes_ in this library, which gives it an _ability_ to it to be rather _wide-usable_(from IoT to infrastructure-level apps).
8686
8787
## Math behind it
8888
@@ -147,18 +147,20 @@ AliceSymmetric = BobSymmetric
147147
-------------- ------------
148148
```
149149

150-
In the example file I used _Prime number_ equal to _-1_, because I wanted the algorithm _to be un-cutted in range_ in all operations(I wanted to get a pair of fingerprints that can be used for encryption functions).
150+
In the example file I used _Prime number_ equal to _-1_, because I wanted the algorithm _to be un-cutted in range_ in all operations(I wanted to get a pair of fingerprints that can be used in encryption functions as a key).
151151

152152
The crucial thing in classic DiffieHellman is that you're exchanging something, that it's impossible to calculate sqrt from(or at least toooooooooo difficult, as difficult that useless):
153153

154154
```C
155-
6k.
155+
6k(unsafest one).
156156
-------
157157

158-
Time spent to calculate for example = 4s.
158+
Average time spent to calculate(for example) = 1s.
159159

160160
Max value is about (2 ** (6.000 * 6.000)).
161161

162+
Key is one of [2;2**36m]. (With some exclusions).
163+
162164
Just imagine how much time that takes.
163165
Or calculate in a big num calculator.
164166
```
@@ -175,6 +177,8 @@ As we use _2lDH_ that is like 2x _DiffieHellman_, that can be wrote as funny mat
175177
Est. chance of getting the one we need = lim[x->0] / 2
176178
```
177179

180+
In fact, to break this, first of all we need to capture all packets related to the protocol and to perform all calculations needed after that.
181+
178182
## Standards
179183

180184
I made some _standards_ for each part to use _2lDH_ in way you need. *Let's check them out.* <br/>

0 commit comments

Comments
 (0)