Thursday, May 21, 2009

How to securly encrypt your emails.

I had trouble finding a good online tutorial walking one through all of the steps necessary to set up gpg, set up private/public keys, and use that to communicate securely with a friend. Anyhow the following is a quick tutorial of how to do this on Mac and Linux. If you are on windows try: and see if you can use my tutorial along with whatever how-to guides they have to get it working.

If both you and your friend are new to Gnu Privacy Guard, then both of you should do the following.

1. install gnu privacy guard:
mac: and download current version
linux: it may already be installed in your system, on the command line type: gpg and see if anything happens. If not google "install gnu privacy guard [the name of your linux distro]" and there will surely be a tutorial.

On the command line:
2. type gpg --gen-key

3. I would select the first option DSA/emgammal or whatever

4. Choose the highest available encryption

5. Follow the rest of the instructions to finish generating a key. Your passphrase should be a longer sentence like "oh no i do not know how to type anymore after that accident"(please not that sentence though) and somehow remember that sentence.

6. type gpg --list-keys

7. You will have something that looks like:
pub 1024D/F217E383 2009-05-04
uid John St John (my launchpad key)
sub ******************************
****** (I blanked out my secret key info)

In the above example, the underlined text portion (F217E383) is my public key's ID. To upload that key to a keyserver so anyone can send you an encrypted file type:

gpg --send-key Your Key ID

8. To get my key so you can send me an encrypted file type in:

gpg --search-keys 'your_friend''

and double check with your friend on phone or in person that the key you see is in fact theirs. You can also do the search by name, or probably key ID.

9. Now make a text file say "secret.txt" for example and type whatever message you want in it.

10. When you are in that folder on the command line type:

gpg --encrypt --sign --recipient 'your_friend'' secret.txt (or whatever your file is called)

follow the instructions...

11. you should have a file now called secret.txt.gpg that is an encrypted file that is impossible to decrypt by anyone who doesn't have access to your friend's private key.

12. add that file as an attachment to an email to your friend.

13. Have you friend download the attachment, then on the command line change to the directory that the file was downloaded to, and type:
gpg --decrypt file_name

Tuesday, March 24, 2009

Dividing Fractions in the Real World

Let me preface this by stating that I learned the trick for dividing fractions, simply multiplying one of the terms by the other's inverse, a long time ago. However I always find things more understandable when I have a good concrete example of how something works. My girlfriend is very strong in math, and wants to be an elementary or middle school math teacher, and she gave me the following example to think about. Say for example you have 4 quarts of ice cream, and you want to split it up into cups that each hold 2/3 of a quart. First you take 2/3 of each quart of ice cream, leaving 1/3 quarts in each ice cream container. Since you started with the 4, you have now filled up 4 cups. You have four 1/3 quart portions left and you want to fill up 2/3 quart cups with that portion, so two of those 1/3 quart portions will fill each cup, meaning two more cups are needed. 

I thought it was a very good way to think about division. Perhaps I was taught an example like that in school, but all I remember was the simple inversion trick. I didn't get a really good understanding for what I was doing. 

Another thing that helps with fractions is to change what I subvocalize when I see one. I was taught to think "two thirds" when I see 2/3 for example. If on the other hand I think "out of three parts, take two", when I see 2/3, I get a much better understanding for what the fraction actually means.

Monday, March 16, 2009

fonolo 4 Android: A look back at Software Engineering

This term taking Software Engineering with professor Anthony Hornof (credit him for the image to the right) was a great experience. My team developed an application for the Android phone which we subsequently distributed on the Android marketplace, and is downloadable in the US on any Android based cell phone. Learning how to develop this type of application, with the end user in mind, and also working on managing the team was definitely a valuable experience in the long run. If any future developers are interested in checking out the source code for this application, it is available at Perhaps I will crank out another Android based application in my free time in the near future.

Saturday, January 24, 2009

My Android App

Now that I have the critical aspect of my group's Android app up and running, I wanted to say a little about how cool it could be. It is an application that integrates with an external service called fonolo, and will provide a clean Android specific user interface for working with fonolo.

What fonolo does is really cool. They eliminate the need to navigate those annoying phone menus when you call a typical large corporation. Instead they maintain a text representation of the options, and you can quickly skim through to select the exact location you want to get to. When you submit the request to fonolo they place the call on their end, automatically navigate the phone menus, and then call your phone with the company and department you want on the other end. The android app makes it even cooler because rather than having to navigate to the website and log into that, you can do it directly from the application in your Android based phone!

One big thing I am learning from this project is how cool of an operating system Android is. It is incredibly easy to write programs for the system, and you can write code on any operating system that supports Java(unlike the iPhone which requires OSX and XCode as far as I know). Additionally to deploy your application on the Android marketplace, you only have to pay a one time fee of $25 as a developer. For the same privalege you have to pay $99 for the iPhone marketplace. Once more Android based handsets come out I am sure Android will be very competitive in the internet phone marketplace.