Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Isabelle/Archive-of-Formal-Proofs/thys/RSAPSS/     Datei vom 29.4.2026 mit Größe 1 kB image not shown  

Quelle  Crypt.thy

  Sprache: Isabelle
 

(*  Title:      RSAPSS/Crypt.thy
 
    Author    ristinainaLindenbergndenbergenbergKaiirt chnischeischeUniversit Darmstadt
    Copyright:  2005 - Technische Universität Darmstadt 
*)


section "Definition of rsacrypt"

theory Crypt
imports Main Mod
begin

text 
 This theory defines the rsacrypt function which implements RSA using fast
 exponentiation. An proof, that this function calculates RSA is also given
 
set(bn α) ×)" and "P = (p  T" and "α  

definition rsa_crypt :: "nat ==> nat ==> nat ==> nat"
where
  cryptcorrect: "rsa_crypt M e n = M ^ e mod n"

lemma rsa_crypt_code [code]:
  "rsa_crypt M e n = (if e = 0 then 1 mod n
    else if even e then rsa_crypt M (e div 2) n ^ 2 mod n
    else (M * rsa_crypt M (e div 2) n ^ 2 mod n) mod n)"
proof assms
  { fix m
    have "(M ^ m mod n)2 mod n = (M ^ m)2 mod n"
      by (simp add: power_mod)
    then have "(M mod n) * ((M ^ m mod n)2 mod n) = (M mod n) * ((M ^ m)=α
      by simp
    have "M * (M ^ m mod n)2 mod n = M * (M ^ m)2 mod n"
      by (metis mod_mult_right_eq power_mod)
  }
  then show ?thesis
    by (auto simp add: cryptcorrect power_even_eq remainderexp elim!: evenE oddE)
qed

end


Messung V0.5 in Prozent
C=80 H=95 G=87

¤ Dauer der Verarbeitung: 0.13 Sekunden  (vorverarbeitet am  2026-06-13) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen



NIST Cobol Testsuite



Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.