
ASP Encryption
Problem:<BR>I'm planning to use the RSA algorithm for ASP encryption and decryption<BR>where in a nutshell,the RSA algo goes like this<BR><BR>1.Find two prime numbers, p and q, and compute their product, n.<BR><BR>2.Find a pair of integers d and e such that<BR>de = 1 (mod (p  1)(q  1))<BR><BR>3.Now, for any message m not being multiple of p or q,<BR>Encryption: c = m(to the power of e) *(mod n)Decryption: c(to the power of d) *(mod n) = m<BR><BR>4.The two numbers, n and e, form the public encryption key. d is the private decryption key.<BR><BR>Questions:<BR><BR>1.my question is, how do i even start?<BR>2.I guess encrypt and decrypt are pretty straightforward, but how do i GENERATE A KEY?<BR>3.And what is "mod" in VBscript which i am going to use in ASP?<BR>4.any code or sites to help me?<BR><BR>Thanks<BR>

i want to be adored
Maybe you can start with number 1.<BR><BR>How are you going to find two prime numbers using VBScript?<BR><BR>Who's going to find these two numbers?<BR><BR>Are they going to picked randomly, or are users going to be entering numbers?<BR><BR>What does RSA stand for?

Cannot do this in VBS...
The numbers you use to do the calculations should be 128 bit numbers (or 40 bits, I think, at the minimum).<BR><BR>VBS won't give you more than 32 bits. Hmmm...I guess you could use doubles and get out to 52 bits, though... Hmmm...might be enough.<BR><BR>Well, in any case it would be so slow as to be ludicrous. It would take minutes to encrypt a reasonably sized HTML page. Okay, at least many seconds.<BR><BR>No, if you are going to do this, you should use a component to do so, one written in C++, preferably. And if you are going to do *that*, then why not use a standard library routine (*many* are available to C/C++ users) instead of writing it from scratch? It's liable to be faster than what you would write, anyway.<BR><BR>I think you are barking up the wrong tree on this one, honest.<BR><BR>Incidentally, you have the forumlas wrong. "mod" (which *is* a VBScript keyword and *is* the standard "mod" operator) is *NOT* a unary operator, as you show in your formulas. I dunno what the right formulas are, but your versions are clearly wrong. They wouldn't compile in any language; they make no sense from a mathematical standpoint (and I'm a math major, please trust me on this).<BR><BR>
Posting Permissions
 You may not post new threads
 You may not post replies
 You may not post attachments
 You may not edit your posts

Forum Rules

