Giter Club home page Giter Club logo

Comments (7)

shipof123 avatar shipof123 commented on August 20, 2024

I have the same issue

from rsa-library.

shipof123 avatar shipof123 commented on August 20, 2024

echo $? shows that it exited on an error, I'd run a debugger and step through it.

from rsa-library.

shipof123 avatar shipof123 commented on August 20, 2024

I analyzed it, and this is because the function long long rsa_modExp(long long b, long long e, long long m) fails if any of its parameters is 0, which is fairly often.
This would be fine if it didn't exit instead of aborting its function and provides no reason for the users to see

from rsa-library.

omarahmad81 avatar omarahmad81 commented on August 20, 2024

Hi, I seem to have resolved the issue by replacing long long with unsigned long long throughout the library. Need your feedback on this solution. I believe the multiplication in rsa_modExp(b * b % m, e/2, m), line 56 of rsa.c was causing the overflow.

from rsa-library.

Prendre-soin-de-soi avatar Prendre-soin-de-soi commented on August 20, 2024

change the line 56 of rsa.c into return ( rsa_modExp(((b % m) * b) % m, e/2, m) % m );

from rsa-library.

arctumn avatar arctumn commented on August 20, 2024

Hi, I seem to have resolved the issue by replacing long long with unsigned long long throughout the library. Need your feedback on this solution. I believe the multiplication in rsa_modExp(b * b % m, e/2, m), line 56 of rsa.c was causing the overflow.

yup what you said did work, still dont know why the dev did not care about the overflow issues....

from rsa-library.

oskarvonephesos avatar oskarvonephesos commented on August 20, 2024

hi, i have created a fork that adresses this issue and provides further encryption (OAEP): https://github.com/oskarvonephesos/RSA-Library

from rsa-library.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.