/CSHARP-FERMAT-METHOD-RSA-ATTACK

👥 Just to education goals, please, doesn't use it to bad purposes!! 👥 (🔑 KeyWords: C#, C Sharp, RSA Algorithm, Fermat's Method 🔑)

🌟 Fermat's Method: RSA Attack 🌟


❓ What's it? ❓

  • One day I had to create a software that encrypt and decrypt messages with RSA Algorithm for my University. Some days ago to finish the project, I think: 'Is my program seccure really? Uhm... I gonna check it out!'. So I study one algorithm that refactores prime numbers: Fermat's Method!. Teah, it isn't the best and neither the worst method to break RSA, but it would help me to check the security...

  • I suggest that you already discovered out what I'm meaning, no? Yeah, I developed this project! Fermat's Method: RSA Attack!! A terminal software that calcs private keys to the algorithm and refactore the RSA's Values, giving you the two prime numbers that results in the value during a multiplication.

  • Well, there are three topics that I needa solve: 1) translate the application to English; 2) the refactore function just works one time per execution, that is, when you use this function, if wanna use again, you hafta close and open the program again; 3) the program doesn't work with bigger numbers.

  • Finishing, I developed this program just to educative goals, so, please, doesn't use it to bad goals! About my RSA Agorithm? Was it break by this program? It's a secret!!


⚒️ Tools ⚒️

  • C# and Visual Studio;
  • Windows as your Operational System.

⚙️ Run ⚙️

EXE

  • Download the source code;
  • Go to Ataque_RSA\Ataque_RSA\bin\Debug and execute Ataque_RSA.exe.

Project

  • Download the source code;
  • Import the Ataque_RSA folder into Visual Studio;
  • Open and compile Program.cs file in the editor.

📝 Examples 📝

  • The program contains three commands: 0, 1 and 2, being each of them:
0 >> finish and exit of the program;
1 >> prime factoration with Fermat's Method (you need to choice the RSA's value. RSA's value is the multiplication of the two prime numbers used to generate the public and the private key)
2 >> calcs the private key (you need to choice two prime numbers and a public key)

📫 Reach Me 📫

Email: csfelix08@gmail.com

Linkedin: linkedin.com/in/csfelix/

Instagram: instagram.com/c0deplus/


Portfolio: CSFelix.io