Click here to Skip to main content
15,887,350 members
Home / Discussions / C#
   

C#

 
QuestionOpen New Mail Pin
tamir90128-Sep-09 3:43
tamir90128-Sep-09 3:43 
AnswerRe: Open New Mail [modified] Pin
Not Active28-Sep-09 3:55
mentorNot Active28-Sep-09 3:55 
GeneralRe: Open New Mail Pin
tamir90128-Sep-09 5:01
tamir90128-Sep-09 5:01 
GeneralRe: Open New Mail Pin
Not Active28-Sep-09 5:07
mentorNot Active28-Sep-09 5:07 
GeneralRe: Open New Mail Pin
tamir90128-Sep-09 5:28
tamir90128-Sep-09 5:28 
GeneralRe: Open New Mail Pin
Not Active28-Sep-09 5:54
mentorNot Active28-Sep-09 5:54 
GeneralRe: Open New Mail Pin
tamir90128-Sep-09 9:49
tamir90128-Sep-09 9:49 
QuestionRSA big numbers computation -> raise to power, how?. Pin
AWriter28-Sep-09 3:37
AWriter28-Sep-09 3:37 
Hello to all!
I want to implement in C# the RSA algorithm to encrypt and decrypt some data. I've studiet a lot already about this algorithm, but the only thing that I don't understand how to work with very big numbers in C#, even in C++ or C.

The problem is, that in our days, the recommended minimal lenght of the RSA key is 1024 bits. So, the algorithm says:

* n = pq, where p and q are distinct primes.
* phi, φ = (p-1)(q-1)
* e < n such that gcd(e, phi)=1
* d = e-1 mod phi.
* c = me mod n, 1<m<n.
*="" m="cd" mod="" n.

this="" was="" taken="" from="" here:="" http:="" www.di-mgt.com.au="" rsa_alg.html#note1

so,="" the="" keys="" are="" combination:
cpub="(e," n);
cpriv="(d," n);

well,="" ok,="" lets="" say="" for="" example="" that="" we="" generate="" some="" numbers="" and="" obtain="" keys:

public="" key:="" 3,9312243439
private="" 6208033627,9312243439

the="" algorith="" says="" to="" encrypt="" data,="" you="" need="" do:

c="(m" at="" power="" e)="" then="" do="" (mod="" n),="" or="" in="" c#="" like:="" c="(Math.Pow(m," e))="" %="" n;

to="" decrypt="" data:

m="(C" d)="" d))="" n;

so,="" form="" here="" question:

<b="">How to raise a message, lets say the encrypted '10' to our d, that is 6208033627, to obtain the original message?

And after all, our d is only 33 bits length? Tha maximal System.Double value is some 10 at the 308 power.

What I don't understand? What I'm missing? Can anyone explain me this?
I will apreciate your explanation! Thank you in advance!
AnswerRe: RSA big numbers computation -&gt; raise to power, how?. Pin
Henry Minute28-Sep-09 5:04
Henry Minute28-Sep-09 5:04 
GeneralRe: RSA big numbers computation -&gt; raise to power, how?. Pin
AWriter28-Sep-09 20:54
AWriter28-Sep-09 20:54 
Questionusing data Adater to save in acess db, c# - update 3 tables Pin
TGiril28-Sep-09 2:53
TGiril28-Sep-09 2:53 
AnswerRepeating the question won't change the answer Pin
Not Active28-Sep-09 3:48
mentorNot Active28-Sep-09 3:48 
Questionproblem with datetime in sqlCE Pin
E_Gold28-Sep-09 1:23
E_Gold28-Sep-09 1:23 
AnswerRe: problem with datetime in sqlCE Pin
Ashfield28-Sep-09 1:31
Ashfield28-Sep-09 1:31 
AnswerRe: problem with datetime in sqlCE Pin
Eddy Vluggen28-Sep-09 1:52
professionalEddy Vluggen28-Sep-09 1:52 
Questionhi need some suggestion regaurding my project Pin
srichakram_harsha28-Sep-09 1:01
srichakram_harsha28-Sep-09 1:01 
AnswerRe: hi need some suggestion regaurding my project Pin
Pete O'Hanlon28-Sep-09 1:17
mvePete O'Hanlon28-Sep-09 1:17 
AnswerRe: hi need some suggestion regaurding my project Pin
musefan28-Sep-09 1:56
musefan28-Sep-09 1:56 
GeneralRe: hi need some suggestion regaurding my project Pin
J4amieC28-Sep-09 2:31
J4amieC28-Sep-09 2:31 
GeneralRe: hi need some suggestion regaurding my project Pin
musefan28-Sep-09 2:44
musefan28-Sep-09 2:44 
GeneralRe: hi need some suggestion regaurding my project Pin
Richard MacCutchan28-Sep-09 3:42
mveRichard MacCutchan28-Sep-09 3:42 
Questionwhat is the best and the short way to limit textbox for only numbers Pin
E_Gold27-Sep-09 21:17
E_Gold27-Sep-09 21:17 
AnswerRe: what is the best and the short way to limit textbox for only numbers Pin
Sachin Dubey27-Sep-09 21:23
Sachin Dubey27-Sep-09 21:23 
AnswerRe: what is the best and the short way to limit textbox for only numbers Pin
Abhijit Jana27-Sep-09 21:23
professionalAbhijit Jana27-Sep-09 21:23 
AnswerRe: what is the best and the short way to limit textbox for only numbers Pin
DaveyM6927-Sep-09 22:04
professionalDaveyM6927-Sep-09 22:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.