1 / 7

Public Key Cryptography

Public Key Cryptography. By Alex Adam and Ben Hamilton. The Problem. When something is encrypted with symmetric keys meaning that the key used to encrypt and decrypt is the same, the key can be hacked at the sender and receiver location.

nguyet
Télécharger la présentation

Public Key Cryptography

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Public Key Cryptography By Alex Adam and Ben Hamilton

  2. The Problem • When something is encrypted with symmetric keys meaning that the key used to encrypt and decrypt is the same, the key can be hacked at the sender and receiver location. • Take this example, if in the 1200’s a war commander was to be sent a message and it were intercepted with the decryption key inside, it would be completely compromised and the enemy would have Intel. • So how do you encrypt something and then decrypt it so that even if the message were intercepted, it wouldn’t be decrypt able? • It can’t be done with this insecure standard method of encrypting the message with one key and decrypting it with the same key because knowledge of that key would ruin everything. ??????????????????????????

  3.  TheSolution • The solution to this is to use a public key system. A public key system makes use of a public key which is available to everyone and a private key which is only available to who the message is intended for. • When the message is sent, the message is encrypted by a combination of the two keys and when it is received it is decrypted using a combination of the two keys. • You can’t decrypt the message with only the knowledge of one of the public key which makes this asymmetric key system much more secure.

  4. Pseudocode • Array a,b,c • Number j, publicKeyPart1, publicKeyPart2 publicKeyExponent, privateKeyPart1, privateKeyPart2, privateKeyExponent • Function encode{ • publicKeyPart1= random number • publicKeyPart2= random number • publicKeyExponent= random number • privateKeyPart1= random number • privateKeyPart2= random number • privateKeyExponent= random number • Label show publicKeyPart1, publicKeyPart2 publicKeyExponent, privateKeyPart1, privateKeyPart2, privateKeyExponent • For j=0 to txtInput length, j++ • a at j = ascii txtInputsubstring at j length 1 • For j=0 to txtInput length, j++ • a at j = a at j *(publicKeyPart1+privateKeyPart1) + (publicKeyPart2^publicKeyExponent) + (privateKeyPart2^privateKeyExponent) • Repeat for b and c } • Function decode{ • txtInput.removeAllText • For j=0 to txtInput length, j++ • a at j = a at j – ((publicKeyPart2^publicKeyExponent) - (privateKeyPart2^privateKeyExponent)) / j (publicKeyPart1+privateKeyPart1) • For j=0 to txtInput length, j++ • txtInput += addLetter(a at j) • } • Function decodePublic{ • txtInput.removeAllText • For j=0 to txtInput length, j++ • b at j = b at j – ((publicKeyPart2^publicKeyExponent) / publicKeyPart1) • For j=0 to txtInput length, j++ • txtInput += addLetter(b at j) • } • Function decodePrivate{ • txtInput.removeAllText • For j=0 to txtInput length, j++ • c at j = c at j – ((privateKeyPart2^privateKeyExponent) / privateKeyPart1) • For j=0 to txtInput length, j++ • txtInput += addLetter(c at j) • }

  5. Explanation • My pseudo code shows what my program is based off of. • First I make 3 arrays and the different components of the private and public keys. • Then I take the text in the input box and convert it to ASCII values and store them in all 3 arrays. • Afterwards I encrypt the ASCII values for each array index by using both the private and public keys. • The decode function decrypts the text and shows it to the user by using both keys and does this only for array a. • The decodePublic function attempts to decrypt the text using only the public key and shows the text to the user. It does this only for array b. • The decodePrivate function attempts to decrypt the text using only the private key and shows the text to the user. It does this only for array c. • The whole point of having these three functions instead of just the first decode function which does it all correctly is to demonstrate that the private key on its own and the public key on its own can’t do anything. But when combined they unlock the secret text.

  6. Diagram

  7. In Real Life • This algorithm like most other public key encryption algorithms can be used for almost anything. • Secure bank transactions, privacy while chatting online and any kind of communication really. • It even has applications that aren’t involved with computers like sending letter. • For example, two people meet face to face and decide on a private key, then the sender can send an encrypted message along with public key in the mail and if it’s intercepted, it can’t be deciphered. • Another example is army communications. Two or more personnel decide on a private key and the rest is just as in the first example except that they’re probably not going to be discussing cooking recipes like civilians would.

More Related