English
Experimente

Modulares Potenzieren: Prinzipstudie for a RSA-Algorithmus

 

p.specht

Modulares Potenzieren
==================
at that RSA-Verschlüsselungsverfahren go two large Primzahlen multipliziert or. potentiated, to a Module for further Berechnungen. These Berechnungen wären because of the irrsinnigen Size the enstehenden numbers terrific costly. as remedy there whom Algorithmus "Modulares Potenzieren": one must then not first the Endergebnis calculate, separate can Zwischenergebnisse already "unterwegs" MODULO-take, speak: with the enstehenden Divisionsresten weiterrechnen, without that the Endergebnis changed would. the untenstehende Machwerk is though not Gültigkeitsgrenzen examined, it deals itself only circa a Prinzipstudie. Gegengeprüft watts through the Language "R".

an the founts:  [...] 

wished one objectively the RSA-take action emulate, should self-evident Assemblercode written go. and self the could too slow go, therefore becomes to Codierung and Decodierung in moderneren Geräten already The Grafikkarte (Parallelcomputing) herangezogen.

Window Title "Modulares Potenzieren (Prinzipstudie zB. for the RSA-take action)"
' (CL) CopyLeft 2018-05 P.woodpecker, Wien; without each Gewähr!  fountain: https://www.
' inf-school.de/communication/kryptologie/rsa/modpotenz/station_schnellespotenzieren
Windowstyle 24:font 2:set("decimals",17)
Declare w$,x!,y!,m!

Repeat

    Cls rgb(200+rnd(56),200+rnd(56),200+rnd(56)):w$=""
    print "\n\n (x ^ y) mod m  should accounts go:"
    Print "\n\n x = ";:input w$:x!=val(w$)
    Print "\n y = ";:input w$:y!=val(w$)
    Print "\n m = ";:input w$:m!=val(w$)
    print "\n ModPotf(x,y,m) = ";
    color 14,1:print " "+stature$("%g",ModPotf(x!,y!,m!))+" "
    color 0,15
    waitinput

Until %key=27

End

Proc modpotf :parameters x!,y!,m!

    var pot! = 1

    while y!>0

        if remodf(y!,2)=1

            pot!=remodf(pot!*x!,m!)
            y!=y!-1

        else

            x!=remodf(sqr(x!),m!)
            y!=y!/2

        endif

    endwhile

    return pot!

endproc

'-----------------------------
'Hilfsfunktionen from geplanter Include (work in progress):

proc floor :parameters x!

    case abs(x!)<(10^-35):return 0
    case x!>0:return intf(x!)
    return (abs(x!-intf(x!)) < 10^-35)-intf(abs(x!-1))

endproc

proc remodf :parameters x!,y!

    ' Q: https://de.wikipedia.org/wiki/Modulo , How in ADA
    case abs(x!)<(10^-35):return 0
    case abs(y!)<(10^-35):return x!
    return ((x!>0)-(x!<0))*abs(x!-y!*floor(x!/y!))

endproc

proc frac :parameters x!

    var s!=(x!>0)-(x!<0)
    x!=abs(x!)
    x!=x!-round(x!,0)
    case x!<0:x!=1+x!
    return s!*x!

endproc

proc intf :parameters x!

    var s!=(x!>0)-(x!<0)
    x!=abs(x!)
    x!=x!-frac(x!)
    return s!*x!

endproc

 
XProfan 11
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
05/27/21  
 



Zum Experiment


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.078 Views

Themeninformationen

this Topic has 1 subscriber:

p.specht (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie