Security Software review and downloads
  • Home
  • Spyware & Spyware Remover
  • Registry & Registry Cleaner
  • Firewall
  • Hacked
  • Uninstall & Uninstaller
  • Antivirus

How does one implement the RSA (Encryption/Decryption) Algorithm?

June 8th, 2008 · 1 Comment

I am trying to learn more about the RSA Algorithm. I have researched several pages on Google and have a fairly clear idea of what the algorithm entails — I don't exactly understand *why* it works, but I believe I understand a good amount as to how one would encrypt/decrypt a message. My question, is how is this algorithm applied in real life? I mean, how does one generate two large primes? SInce there is no known algorithm for factoring the product of two primes it seems that there would also be no known algorithm for generating numbers that are prime? Also, is the arithmetic carried out? Raising a message to a power of significant size isn't going to work well with a 32 or even 64bit processor. I assume some type of addon library is used to accomodate the larger numbers? How are these implemented? Finally, I understand that these mechanisms already exist and re-inventing the wheel is often dangerous in terms of crypto, but I just want to do it as a learning exercise.
My understanding of RSA algo:

1) Choose 2 large distinct primes p and q
2) Calculate modulus as N = p*q
3) Calculate totient as (p-1)(q-1)
4) Choose e such that 1 < e < (p-1)(q-1) and e is coprime with (p-1)(q-1). [Does this mean e could ever be 2? It seems an odd number would be required for e?]
5) Find d such that ed = 1 mod (p-1)(q-1)
[Is there only 1 d that works or does it matter which solution I choose?? What is an efficient way to calculate this??]

6) c = m^e mod N where m = msg expressed as number … whats an efficient way to raise m to such a large exponent? I realize modular arithmetic bounds this somewhat, but still the calculation could/should be much larger than 32 or 64bit values…
McDonger: Thanks for your response. I guess I'm looking for more detailed information as to how it gets split up and calculated. The symmetric encryption (the key passed via the PKE) isn't so much of an interest to me.

Thanks.

Related posts:

  • How does one implement the RSA (Encryption/Decryption) Algorithm?
  • Hello, I am trying to learn more about the RSA Algorithm. I have researched several...
  • In need of an encryption algorithm?
  • I need to encrypt a piece of text in JavaScript to be passed as a URL parameter and...
  • What is the simplest public-key encryption algorithm?
  • I'm interested in programming and cryptography, and I want to write an asymmetric-key...
  • Cracking a 448 bit Blowfish encryption key?
  • Is it possible within a life time, and how much computer power would be...
  • Which is the strongest encryption algorithm possible?
  • Forget about encryption time. I just want the strongest encryption algorithm? And what's...
  • Can any encryption program decrypt any encrypted file made with a standard algorithm?
  • If I use an encryption program to encrypt a file with a standard algorithm (blowfish,...
  • i am using blowfish algorithm for encryption. how can i know that a string is encrypted with that algorithm?
  • ...
  • how can ppl use public encryption algorithm while..?
  • how can ppl use public encryption algorithm while..the main difference is the key of the...
  • can u tell me how to identify which type of algorithm(AES,RC4) used for encryption on script files?
  • i 'll give 1 input file,it has to show which type of encryption algorithm used?pls reply...
  • Hard Disk Encryption that wipes drive if invalid key / pass is entered.?
  • I don't really know much about full drive encryption and haven't done it on any...

    Tags: Encryption


    1 response so far ↓

    • 1 McDonger // Jun 8, 2008

      -It is implemented at different levels, smaller numbers are used for lower security purposes

      -32/ 64 bit processors can handle larger numbers, the operation gets split up

      -The RSA algorithm is only for producing the key, although a complex calculation, it only need be done once, once the key is established, another algorithm can be used for encrypting the message/ file

    Leave a Comment

    *
    To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
    Click to hear an audio file of the anti-spam word

    Tags: Email Spam Uninstall spyware Security Software Trend Micro Registry Cleaner Pc Tools Norton Nod32 Kaspersky Internet Security Hacked Firewall Computer Security Avg Avast Antivirus Ad Aware Monitoring Software Encryption Backup


    A Slow System?
    Harassed by DLL errors?
    Plagued by constant Blue Screens?
    Receiving error messages and don't know why?

     
    • Most popular Software downloads

      • Pctools
      • kaspersky
    About | Contact Us | Old Sitemap Security Software review and download . All rights reserved PoweredBy Yahoo!API.