Autor Beitrag
jelleton
Hält's aus hier
Beiträge: 13



BeitragVerfasst: Do 28.04.05 16:55 
Folgendes Problem:

der geheime Schlüssel d wird aus dem öffentlichen Schlüssel c und dem Produkt zweier Primzahlen n wie folgt gebildet

d = (1 + k * Phi[n]) / c

wobei k eine beliebige Konstante ist, die aber vorraussetzt, dass die Division ohne Nachkommastellen vollzogen werden kann. Eine solche Konstante zu finden, ist irgendwie recht schwierig, da 1 + k * Phi[n] eine Zahl mit um die 60 Stellen ist. Gibt es eine schnellere und effizientere Methode als stupides ausprobieren?

MFG jelleton


Moderiert von user profile iconChristian S.: Topic aus Sonstiges verschoben am Do 28.04.2005 um 16:56
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Do 28.04.05 22:02 
Da gilt d * e mod p == 1 kannst Du d = e^-1 mod p setzen und damit sehr effizient d berechnen.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.


Zuletzt bearbeitet von BenBE am Do 28.04.05 22:22, insgesamt 1-mal bearbeitet
jelleton Threadstarter
Hält's aus hier
Beiträge: 13



BeitragVerfasst: Do 28.04.05 22:20 
user profile iconBenBE hat folgendes geschrieben:
Da gilt d * e mod p kannst Du d = e^-1 mod p setzen und damit sehr effizient d berechnen.


(e^-1) mod p ?
da würde doch immer (e^-1) rauskommen, weil das dann eine sehr kleine Zahl ist, sozusagen "ein e-tel"..
Die Methode verstehe ich noch net so ganz.
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Do 28.04.05 22:28 
user profile iconjelleton hat folgendes geschrieben:
(e^-1) mod p ?
da würde doch immer (e^-1) rauskommen, weil das dann eine sehr kleine Zahl ist, sozusagen "ein e-tel"..
Die Methode verstehe ich noch net so ganz.

Stimmt so nicht ganz, weil Du mit Restklassen rechnest. Dort ist die Division so definiert, dass du immer Integerzahlen rausbekommst.

Für den Fall von oben wäre dies:
ausblenden Delphi-Quelltext
1:
d == e ^ (-1mod p == e ^ (p - 2mod p					

da a ^ (p - 1mod p == 1

ausblenden Delphi-Quelltext
1:
1 == a ^ (p - 1mod p == a * a ^ (p - 2mod p					

Und zweiteres sieht stark nach der Ausgangsgleichung aus ^^ ;-)

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Do 28.04.05 22:29 
Auf www.manuel-poeter.de findest du meine Fachbereichsarbeit zum Thema Public-Key-Kryptographie speziell RSA. Schaus dir mal an, vielleicht hilft dir das weiter...

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!