Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/iano/public_html/tpforums-vb5/forum/includes/class_core.php on line 5842

PHP Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_BOTH - assumed 'MYSQL_BOTH' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 588

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 612

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6
[C++] Help with RSA encryption
Results 1 to 6 of 6

Thread: [C++] Help with RSA encryption

  1. #1
    Junior Member
    Join Date
    May 2009
    Posts
    6

    [C++] Help with RSA encryption

    Hello, I'm trying to make a messenger (done) that uses RSA encryption for security.
    I'm using the GMP library to do the math, however when I export the number 1632 (the encrypted form of the character 'a') to a unsigned int array(just to see the value I know I need char* for the send() function of winsock), it gives me another value (2252806), The encryption works fine if I dont export the value, and I use that mpz_t variable to decrypt it.
    These lines are the ones that do not work.

    Code:
    gmp_printf ("Value: %Zd\n", rop); //The encrypted value 1632
    mpz_export(&z[i], NULL, 1, 1, 0, 0, rop); //Exports it to z which is an unsigned int array
    cout << z[i]; // Prints the new exported value of z which isn't 1632 like it should
    I hope you guys can help me, if you need more code plese tell me.

    Thanks in advance
    Federico

  2. #2

    [C++] Help with RSA encryption

    you are too stupid to do it without library.
    when abused they backfire someday. learn programming.

  3. #3
    Junior Member
    Join Date
    May 2009
    Posts
    6

    [C++] Help with RSA encryption

    Which library though?
    If you mean GMP, I am using it....

  4. #4

    [C++] Help with RSA encryption

    What is the point of the RSA key again? To do 'something' with the client with improved security?

    _Can the RSA key help to make sure you can only login to a server using a custom client?

    Etc you use a 8.5 OT, and you create your custom client, is it easy to make so only that custom client can access the OT by changing RSA key?

    _If so, I got an great idea, for those who are experienced enough. (not me with other words, but perhaps darkstar).

    Create an "Custom client OT image" of the original tibia client with another RSA key.

    _Release the modified tibia client with another RSA key so everybody can download it and make it for their own custom client.

    That way you would benefit by creating the core of several server's own custom client. And you helped them to restrict users to only those who download the custom client.

    _So if you create a special server with special looktypes, adding more objects and such things to the client, there will be no complaints about debugs in-game.

    Could anyone do this? Or is it to bothersome?

    _This post got very messy, but I hope you understand what I meant.

    Mainly what I want, is that somebody creates a custom client with changed RSA key, write about how to configure a TFS server to only allow clients with that RSA key and release in to the public.

  5. #5

    [C++] Help with RSA encryption

    Which library though?
    If you mean GMP, I am using it....
    no library.
    in rsa you have to know 4 things.

    how to multiply
    how to divide
    how to do modular exponentiation
    how to convert dec to hex

    its easy to write it by even beggining programmer - those algoritms are basic.
    oh wait, they are easy but in asm. Damn, you understnad know why c is flawed.
    if you cant do it, learn. Without it you will suck entire life and i among many will pwn ur programs if u ever go public.

    What is the point of the RSA key again? To do 'something' with the client with improved security?
    To make impossible to intercept your account/password in transfer (sniffing).
    Also they implemented flawed feature to prevent reply attack but it can be easly cracked.

    i dot understand your post (propably as you dont understand cryptography).
    rsa has no meaning in ots. ip changers replace key to another one. private key of ot servers is known, so encryption loose purpose.

  6. #6
    Junior Member
    Join Date
    May 2009
    Posts
    6

    [C++] Help with RSA encryption

    Those algoritms are really easy using GMP except the last one (dec to hex) which is probably whiy the value changes when exporting the value to a char* variable. I will investigate a bit more about this GMP library, Thanks AxxA

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •