Update for 23-03-22 12:15
This commit is contained in:
parent
920c6ebeda
commit
7996d3b4a7
@ -11,20 +11,20 @@ large prime numbers.
|
|||||||
2) T = (p-1)(q-1)
|
2) T = (p-1)(q-1)
|
||||||
* known as eulers totient
|
* known as eulers totient
|
||||||
3) choose 2 values e and d
|
3) choose 2 values e and d
|
||||||
|
* where 1 < e < T
|
||||||
* where (e * d) mod T = 1
|
* where (e * d) mod T = 1
|
||||||
* where e < T
|
* where e and T are [[relative_prime]]s, or coprime
|
||||||
* [[relative_prime]] with T and N
|
|
||||||
4) we now have our keys
|
4) we now have our keys
|
||||||
* n and e are public keys
|
* n and e are public keys
|
||||||
* n and d are private keys
|
* n and d are private keys
|
||||||
|
|
||||||
=== encryption ===
|
=== encryption ===
|
||||||
|
|
||||||
`(plaintext value)^e mod N = ciphertext value`
|
`(plaintext value)^e mod n = ciphertext value`
|
||||||
|
|
||||||
=== decryption ===
|
=== decryption ===
|
||||||
|
|
||||||
`(ciphertext value)^d mod N = plaintext vlaue`
|
`(ciphertext value)^d mod n = plaintext vlaue`
|
||||||
|
|
||||||
=== example ===
|
=== example ===
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ Due to restrictions, choose e = 5
|
|||||||
|
|
||||||
Then choose d from pool of canidiates satisfying `(e * d) mod T = 1`
|
Then choose d from pool of canidiates satisfying `(e * d) mod T = 1`
|
||||||
|
|
||||||
For example then, choose 14 as d
|
For example then, choose 11 as d
|
||||||
|
|
||||||
Private key `(11,14)` and public key `(5,14)`
|
Private key `(11,14)` and public key `(5,14)`
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user