# Help me develop a public-key system (for fun)

• moonman239
In summary, the conversation discusses the concept of public-key encryption and the possibility of building a personal algorithm. The proposed algorithm involves converting messages into numbers and using public and private keys to sort and decrypt the message. The conversation also mentions the potential drawbacks of this method and the need for further details to develop a successful algorithm.

#### moonman239

Help me develop a public-key system (for fun) :)

I just read up on public-key encryption and now I'm kind of interested in building an algorithm of my own. How about something like this:

1) Alice could type her message to Bob into a computer

2) The computer converts the letters and characters into numbers.

3) The computer then uses Alice's public key to determine how to sort the digits.

4) The computer then uses Bob's private key to change the message to throw off frequency analysis. For example if 4 appears more frequently than 2, Bob's public key dictates that at least one 4 should be replaced with a number that will now appear more or less frequent than the 4.

5) Alice then sends this message to Bob, whose computer decrypts the message.

In a public-key scheme, you use the receiver's public key to encrypt the message. The receiver uses his private key for decryption.

Simply subbing more letters to throw off frequency analysis will still be susceptible to more advanced attacks, such as this.

Public-key encryption is very expensive, so usually the sender uses it only to send a small private key, and then use less expensive private encryption to send data.

It'll be interesting to see what kind of algorithm you can come up with, though. We need more details!