I have been programming in C++ for a while now. I heard about RSA Encryption algorithm, and i have read many online sites on how it works. But i still cant grasp how the algorithm works. i have tried to make programs with RSA, but they doesnt encrypt.

If you could please explain the algorithm and how to use it in a program that encrypt files in c++ or c.

This is the exponentiation cypher, upon which RSA is based. Let's start with this.

Pick a prime number, p. Pick another prime number e (smaller than p), making sure that e and (p-1) are relatively prime.

Now, take your plaintext. Replace each letter by numerical equivalent (00 for A and 25 for Z would be one such method, for example - it's what I'll use, but if you want spaces and other symbols, you'll need something different) ending up with a two digit number for every letter.

Write these all out, and split them into blocks of length 2n (i.e. there are n letters in each block, and each block has 2n digits in). The number n is the largest possible integer such that the largest possible value of a block of length 2n is less than p.

i.e. if p is between 25 and 2525, then n would have to be one (such that the largest block value, which will be 2n long, which is two digits, is 25), and if p was greater than 2525 and less than 252525, then n would be 2 (making a largest block value, 2*n = 4 digits long, of 2525).

Take each of the blocks. Call a block P. The corresponding cypherblock is P^e (mod p).

This is the encryption side. When you've got that, I'll cover decryption :)

Is C similar to C# (C-sharp); or are they completely different ? I was wondering if I should begin learning C# and the transition to C will be a tad ...

Write a program that displays all numbers divisible by 3 and 4 within a range entered by user. Display five numbers per line. Numbers are separated by exactly two spaces. ...

Hi guys. I am trying to create a program where the user inputs an integer and the program will cout the nth prime number. Unfortunatly when I try to cout ...