mIRC Home    About    Download    Register    News    Help

Print Thread
#23326 09/05/03 04:00 AM
Joined: Jan 2003
Posts: 31
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Jan 2003
Posts: 31
OK, heres the deal. I wrote a program that converts text you typ in into an integer, and then i encrypt that integer using RSA (which is basically PGP). The problem is mIRC cant handle large numbers, so my script freezes and I am forced to kill mIRC.

I know my script works, because with smaller values it works. But for more secure encryption, I need to use larger numbers.

Any ideas?? Heck, any input at all?? grin

#23327 09/05/03 07:15 AM
Joined: May 2003
Posts: 5
J
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
J
Joined: May 2003
Posts: 5
if you're interested, we're involved in an ongoing encryption addon for mirc (and xchat) called mircryption: http://mircryption.sourceforge.net

its fairly complete and has been in use for quite some time, but we're still looking for programmers to help with a major new version.

anyone who is curious can visit us the web page or join us on #mircryption on efnet.

#23328 09/05/03 08:42 AM
Joined: Dec 2002
Posts: 1,237
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 1,237
...And yet a subtle form of spam lingers in the air.

#23329 09/05/03 08:49 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
And isn't that nice The_Game.. He must have been waiting for a post like that. He appears to have registered his name just so he could post the link. lol--how comforting


-KingTomato
#23330 09/05/03 08:55 AM
Joined: Dec 2002
Posts: 1,237
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 1,237
What else is new...LOL

#23331 09/05/03 12:21 PM
Joined: May 2003
Posts: 5
J
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
J
Joined: May 2003
Posts: 5
I've made several posts in the past, mostly asking for (and receiving) some help on some strange mirc functions. my login password didnt seem to work anymore - either i forgot it or it didnt make the transition period when the forum went down a few months ago.

leaving all that aside however, i still dont understand what you are upset about. of course you two have a combined total of 1200 posts so you are clearly superior to me. given my lowly number of posts its probably not surprising to you that i dont understand what you didnt like about my post.

in the off chance that you misunderstood my reply - the original poster was talking about some encryption code he was writing for a mirc addon. we have been working for over a year on a similar thing, an open source addon written in c++ and mirc script, freely available to anyone who wants it with source code. i was simply suggesting that if the original poster was interested we'd be delighted to have some help on the project.

seriously, what did you find offensive about my post? if anyone else wants to clarify this i'd love to hear it.

#23332 09/05/03 01:06 PM
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031
Quote:
He appears to have registered his name just so he could post the link

Hey KingTomato, have you looked at your signature lately?

#23333 09/05/03 01:15 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
I don't see anything wrong with your post. Spam stands for unsolicited advertising. By no means was your reply unsolicited. Some people are overly sensitive because of the spam they receive already, although I'm afraid there are worse explanations too.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
#23334 09/05/03 02:27 PM
Joined: Jan 2003
Posts: 31
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Jan 2003
Posts: 31
yes...well....now that all that talk about spam is far, far away from my post, would anyone like to offer some comments or suggestions? ; )

#23335 09/05/03 03:19 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
I don't think I could help without knowing exactly how your script works (ie looking at the actual code, see which parts use these large numbers, how etc), so you might want to paste (some of) your code here. Nevertheless, I think that generally, any encryption/decryption stuff should be handled by DLLs. The mirc script language isn't designed for tasks like this, which require a lot of processing and often involve long strings.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
#23336 09/05/03 05:47 PM
Joined: Jan 2003
Posts: 31
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Jan 2003
Posts: 31
since i am at school, i do not have any code with me, but i can tell you how it works.

It first takes whatever you type in, and uses the $asc() function to change your text into a number.

Then it uses this formula : X=T^E mod n
Where:
X = ENCRYPTED TEXT
T = your original input(changed to ascii codes)
E = part of the encrypption key (usually a large number, ie 6337)
n = another number, ie 33

for secure encryption, e and n need to be large, and mIRC crashes because it cannot support variables that large.

#23337 09/05/03 10:08 PM
Joined: Jan 2003
Posts: 31
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Jan 2003
Posts: 31
Hmm...looks like i get to venture into .dll territory. Any tips/links/etc...?

#23338 10/05/03 12:00 AM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
E = part of the encrypption key (usually a large number, ie 6337)

Thats large???? In the world of cryptography, that number is so small it barely exists. 43279847329847329874932749832749579204758927897595794 is large. And you're right, to handle a number like that you would need a dll. I'd suggest the OpenSSL BN (Big Number) library. Make a dll to wrap around it.

#23339 10/05/03 01:28 AM
Joined: Jan 2003
Posts: 31
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Jan 2003
Posts: 31
I used that number as an example, because even that is too large fro mIRC to handle

Were can I find the BN lib?

#23340 10/05/03 03:42 AM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Well it's not a seperate library, it is part of the OpenSSL library available at www.openssl.org. For your formula

Also, doing a simple search on google groups, I found someone using bignum that appears to be doing exactly what you are trying to do. http://groups.google.com/groups?q=bn_bin...&rnum=3 so that should be helpful to you.

#23341 11/05/03 12:39 AM
Joined: Jan 2003
Posts: 31
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Jan 2003
Posts: 31
Thanx for the link. Heres another possible solution:

Splitting the math into smaller, manageble chunks, so that you dont end up with a big number until the end. ie: splitting 7^7 to 7(3+3+1) which is (7^3)(7^3)(7)

What do you think?

#23342 11/05/03 04:53 AM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Well yes, but again, RSA is going to require numbers MUCH larger than 7^7 it might be 78493274893274^89054890237423 in which case you might have to split that up into a billion parts in order to get it to work correctly.

#23343 11/05/03 04:22 PM
Joined: Jan 2003
Posts: 31
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Jan 2003
Posts: 31
ALright, you win...i'll use BN. lol

Any tips on .dll writing? Ive cut some code in c++, and i am very framiliar with dev-cpp, but i need some tips and info on .dll writing.

THanx!

#23344 11/05/03 05:19 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
If you already know C++, then all you really need to know is how to make your compiler generate a dll rather than a exe (I've never used dev-cpp so I'm not really sure), how to make your dll interact with mIRC, which you can find out with /help dll support, and basically, try and make the dll as small as you can. Since you are going to be linking with OpenSSL, it will be a rather large dll, probably in the range of 600-800kb, not too much you can do about that, unless dev-cpp has some nice optimizer features, but again I'm not too familiar with dev-cpp.

#23345 11/05/03 05:29 PM
Joined: Jan 2003
Posts: 31
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Jan 2003
Posts: 31
I do know c++, and i just got securessl, now im going to go spend about a week trudging through it all......

Im going to write the .dll wrapper for BN, and i'll submit both the .dll and its source code to mircscripts.org, because i feel that way people (at least some) will know that my .dll doesnt contain any backdoors. (i think every dll should have its source posted)


Link Copied to Clipboard