Cov txheej txheem:

Kuv yuav decrypt RSA li cas?
Kuv yuav decrypt RSA li cas?

Video: Kuv yuav decrypt RSA li cas?

Video: Kuv yuav decrypt RSA li cas?
Video: Python! Hiding Password Inputs 2024, Kaum ib hlis
Anonim

VIDEO

Xav txog qhov no, koj yuav kho RSA encryption li cas?

Ib qho piv txwv yooj yim heev ntawm RSA encryption

  1. Xaiv primes p=11, q=3.
  2. n = pq = 11.3 = 33. phi = (p-1)(q-1) = 10.2 = 20.
  3. Xaiv e=3. Kos gcd(e, p-1) = gcd(3, 10) = 1 (i.e. 3 thiab 10 tsis muaj yam tseem ceeb tshwj tsis yog 1),
  4. Compute d xws li ed ≡ 1 (mod phi) i.e. xam d = (1/e) mod phi = (1/3) mod 20.
  5. Public key = (n, e) = (33, 3)

Tsis tas li ntawd, koj yuav suav koj li RSA li cas? Cov yuam sij rau RSA algorithm yog tsim raws li hauv qab no:

  1. Xaiv ob tus lej tseem ceeb p thiab q.
  2. Compute n = pq.
  3. Compute λ(n), qhov twg λ yog Carmichael's totient function.
  4. Xaiv tus lej e xws li 1 < e < λ(n) thiab gcd(e, λ(n)) = 1; uas yog, e thiab λ(n) yog coprime.

Tsis tas li ntawd, kuv yuav ua li cas decrypt tus yuam sij pej xeem?

Txij li thaum 175 tus cim yog 1400 khoom, txawm tias tus yuam sij RSA me me yuav tuaj yeem nkag mus rau nws

  1. Tau txais tus yuam sij pej xeem.
  2. Tsim cov ntaub ntawv random password.
  3. Encrypt cov ntaub ntawv nrog tus yuam sij random.
  4. Encrypt tus yuam sij random nrog cov ntaub ntawv tseem ceeb rau pej xeem.
  5. Decrypt tus yuam sij random nrog peb cov ntaub ntawv tseem ceeb.
  6. Decrypt cov ntaub ntawv loj nrog tus yuam sij random.

Kuv yuav encrypt lus nrog RSA li cas?

Encrypting thiab decrypting siv RSA . Encryption siv RSA : Ua encryption ib plintext M siv ib RSA pej xeem tus yuam sij peb tsuas yog sawv cev rau cov ntawv dawb li tus lej ntawm 0 thiab N-1 thiab tom qab ntawd suav cov ntawv ciphertext C li: C = Me mod N.

Pom zoo: