Zum Inhalt springen
uencoder

Verwenden der Chinese Remainder Theorem

Der CRT solves Systeme von modular congruences. Lernen der Algorithmus und its Anwendungen in RSA optimization und secret sharing.

  1. 1

    The CRT states: if moduli m1, m2, ..., mn are pairwise coprime, then the system x ≡ a1 (mod m1), x ≡ a2 (mod m2), ..., x ≡ an (mod mn) has a unique solution modulo M = m1 * m2 * ... * mn. The CRT is used in RSA decryption (using p and q separately, then combining via CRT — 4x faster) and in Shamir's Secret Sharing.

  2. 2
    Chinesischer Restsatz →

    Solve a system of congruences. Enter the remainders [a1, a2, ...] and moduli [m1, m2, ...]. The tool computes the solution x and the combined modulus M. Verify: x mod m1 = a1, x mod m2 = a2, etc.

  3. 3
    ggT-Rechner →

    Verify that the moduli are pairwise coprime (gcd(mi, mj) = 1 for all i ≠ j). If any pair shares a common factor, the CRT does not apply directly — the system may have no solution or multiple solutions.

Häufige Fragen

How does CRT speed up RSA?
RSA decryption computes m = c^d mod n, where n = p*q. Using CRT: compute m_p = c^(d mod p-1) mod p and m_q = c^(d mod q-1) mod q separately (smaller exponents and moduli), then combine with CRT. This is 4x faster because the two exponentiations use half-size numbers and can be parallelized.
What if the moduli are not coprime?
The CRT requires pairwise coprime moduli. If they are not, the system may have no solution (if the congruences are inconsistent) or multiple solutions. Check pairwise GCDs first. For non-coprime moduli, use the generalized CRT or solve by substitution.

Verwandte Tools