updated rsa
This commit is contained in:
parent
3b6f769f1a
commit
92728599a8
|
@ -24,6 +24,20 @@ for i in range (phi + 1, phi + foo):
|
|||
* \\( Cleartext = cipher ** e mod $\phi$ )
|
||||
|
||||
## Euklid
|
||||
|
||||
Just a short excourse:
|
||||
A greatest common divisior out of an example a = 32 and b = 14 would be the groups of the following divisors
|
||||
```sh
|
||||
a = 32, b = 24
|
||||
a = {1, 2, 4, 8, 16}
|
||||
b = {1, 2, 3, 8, 12}
|
||||
gcd(a,b) = 8
|
||||
```
|
||||
|
||||
### Greatest Common Divisor (GCD)
|
||||
|
||||
Two values are prime and have themselves and only `1` as a divisor are called coprime.
|
||||
To check if a and b have a greatest common divisor do the euclidean algorithm.
|
||||
```python
|
||||
def gcd(a, b):
|
||||
if b == 0:
|
||||
|
@ -31,6 +45,12 @@ def gcd(a, b):
|
|||
return gcd(b, a % b)
|
||||
```
|
||||
|
||||
### Extended GCD
|
||||
|
||||
#TODO
|
||||
|
||||
|
||||
## Links
|
||||
|
||||
* [Encryption+Decryption](https://www.cs.drexel.edu/~jpopyack/Courses/CSP/Fa17/notes/10.1_Cryptography/RSA_Express_EncryptDecrypt_v2.html)
|
||||
* [Extended GCD](http://www-math.ucdenver.edu/~wcherowi/courses/m5410/exeucalg.html)
|
||||
|
|
Loading…
Reference in New Issue