Skip to content

hrawork/RSA-Encryption-and-Decryption-with-Conversion

Repository files navigation

πŸ” RSA Encryption and Decryption with Binary, Decimal, and Hexadecimal Conversion (WinForms App)

This Windows Forms application provides a simple GUI for RSA encryption and decryption along with conversion tools to view cipher output in binary, decimal, and hexadecimal formats.


πŸš€ Features

  • βœ… RSA Key Generation (with custom prime inputs p and q)
  • βœ… Text Encryption using Public Key (e, n)
  • βœ… Text Decryption using Private Key (d, n)
  • βœ… View Encrypted Text as:
    • Decimal
    • Binary
    • Hexadecimal
  • βœ… Easy-to-use GUI built with Windows Forms (C#)
  • βœ… Error handling for invalid input and formats

πŸ–₯️ Technologies Used

  • C#
  • Windows Forms (.NET 6.0 / .NET Framework)
  • RSA Algorithm (simplified for learning/demo purposes)
  • System.Text & System.Security.Cryptography

πŸ”‘ How RSA Works Here

  1. You enter two prime numbers (p, q) and click Generate Keys.
  2. App calculates:
    • Modulus n = p * q
    • Public Key exponent e
    • Private Key exponent d
  3. You enter a plaintext message and click Encrypt:
    • The message is encrypted using e and n.
    • Output is shown in decimal form.
    • Can also be converted to binary or hex.
  4. You paste or type the cipher into the decryption box and click Decrypt:
    • Cipher is decrypted using d and n to recover the original message.

πŸ§ͺ Sample Test

Use the following values to test the encryption/decryption:

p = 61
q = 53

Message: Hello

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages