Section RSA.
Variable p q : nat.
Variable prime_p : prime p.
Variable prime_q : prime q.
Variable neq_pq : p <> q.
Variable e d : nat.
Variable pq : nat.
Hypothesis pqnot_zero : pq <> 0.
Hypothesis pq_div_p : divides (p - 1) pq.
Hypothesis pq_div_q : divides (q - 1) pq.
Variable ed_inv : congruent pq (e * d) 1.
Definition encrypt (w : nat) : nat := power w e.
Definition decrypt (w : nat) : nat := power w d.

Lemma gcd_pq_SO : is_gcd p q 1.