Wednesday, May 8, 2013

Final Post

This year has been more exciting and interesting than I could have asked for. One exciting moment for me was the first time I created a program without any help (polyalphabetic cipher) and got it to work. This year I learned about  analyzing malware, python, ciphers, homomorphic encryption, one time pad, and much more. I created programs for all of the cipher and one time pad. I really enjoyed learning about malware analysis and cryptography. My mentor made the simplest things seem exciting and I am glad I got him as my mentor. He changed my views on computer science so much that I will be majoring in CS in the fall. My internship is definitely one of the things I will miss most when I graduate.

I don't have any suggestions for the Research and Science program. Everything was great.

Advice for next year's interns:


  1. Keep up with your blog -(it will help you with your poster)
  2. Try something new -(it might surprise you how much you enjoy it)
  3. Talk to your mentor -(they're interesting people and it'll making working together more enjoyable)
  4. Ask questions -(shows interest and it'll help you understand what you're learning) 

Wednesday, April 24, 2013

Today I went to my internship. I learned about so many interesting things. I learned about secret sharing which is basically when you have a number on the y-axis (y-intercept). This number is your secret. To encrypt it you create a graph and have points on that graph. Depending on the graph you will not be able to figure out the number without a certain number of points. Like for example if you just have a linear graph you only need two points to figure out the y-intercept, while for a sine graph you need four points. The more points needed the more secure the message is.

I also learned about the three things that people try to maintain in cryptography.

  1. Confidentiality
  2. Integrity 
  3. Authentication 
In order to maintain confidentiality people use ciphers (methods of encryption). In order to maintain integrity hashing is used. A hash is a unique identifier that changes even if you only change one thing in the message or program. Authentication is maintain by using signatures similar to how we use signatures for signing important documents.

Another thing I learned about is Public Key Cryptography.  In PKC every person has two keys. One public key for people to use to send you encrypted messages and a private key to decrypt those messages. The two keys are opposite of each other meaning that if I encrypt using my private key anyone can use my public key to decrypt it. This allows people to have a signature. By encrypting part of the message with their private key they show that it is actually them sending the message.

Another thing I learned about is Deniable Encryption which allows you to have two different keys that will give you two different messages when used. This is useful if someone is kidnapped or held at gunpoint and forced to give a key to decrypt the message.

Wednesday, April 17, 2013

Today I went to my internship and we started preparing for my poster presentation. We talked about the key things I have done throughout the year and we also decided what I am going to demo.

Wednesday, April 10, 2013

Today I went to my internship and we talked about the code I used for my One Time Pad program and things I can do to improve it.

One Time Pad Encryption
Basically I start by converting the message into a bites, which is also known as one's and zero's. I then generate a random key of one's and zero's. I then compare the two strings. I then compare numbers at each position. If they are the same, it places a zero in that same position in the ciphertext. If they are different, the program puts a one in that position. The ciphertext is then printed to the screen.

One Time Pad Decryption

In order to decrypt the ciphertext, the program first compares the ciphertext with the key. Just like before if the number is the same, then it places a zero and if its different it places a one. This will give you the binary for the message. Then next step is to convert the binary to characters. After this step the program prints the original message to screen.

I am going to add a few improvements to my program. I am going to add the -e and -d commands which will allow me to control whether the program encrypts or decrypts. Right now, the program does both at the same time, which is unconventional. I also want to add a command that allows me to enter a key and ciphertext pair, and then will decrpyt the ciphertext and give me the original message.

Wednesday, April 3, 2013

Today I went to my internship. I made a polyalphabetic cipher. In a polyalphabetic cipher each character is shifted by a different Caeser Cipher. The Caeser Cipher used for each character is based on a key.  This prevents people from doing frequency analysis on the encrypted messages.

Polyalphabetic Cipher

I also learned about One Time Pad, which is the only encryption that cannot be decrypted. The way it works is that it first converts the message into bits (one's and zero's) and then does exclusive or with a randomly generated key. Exclusive or compares the message to the key and if the numbers are same at that position they place a zero and if they are different they place a one. The reason this is hard to decrypt is because the key is randomly generated every time. A rule with One Time Pad is that you can only use a key one time or the message will be decryptable. Another interesting thing I learned about is homomorphic cryptography. Homomorphic cryptography allows you to send an encrypted message to a company or another person, who can then manipulate the data/message without ever decrypting it. Then after they manipulate it, they can send it back to the original person who can then decrypt the manipulated data.


Tuesday, April 2, 2013

Before break I went to my internship. I started my final project, which is to create an encryption program that can encrypt and decrypt messages in different encryption methods. First I created a Caesar Cipher and added different options, encrypt and decrypt. I then created a Substitution Cipher and added the encrypt and  decrypt options. An important thing I had to remember to do was to make the different encryption methods and encrypt and decrypt mutually exclusive, meaning that you can not do both at the same time. My next step is to add a Polyalphabetic Cipher.

Example of the code I used in my program.

In the program above the program takes what ever is in the output.txt file and encrypts it. It then places that encrypted message in the input.txt file. The message in input is then decrypted and printed to the screen.