Jun 12

Ever need to send information you want protected from prying eyes? You’ve come to the right place. By following the instructions found right here, you’ll soon be able to sign and encrypt your email using your Apple Mail email client.

We’ll be setting up Mac GNU Privacy Guard to do this. MacGPG for short. MacGPG uses the very secure Public-key Cryptography scheme.

Public-key Cryptography uses a Private/Public key pair. The public key is exactly like it sounds. It’s as public as you want it to be. Post it on your website, email it to your friends and co-workers, or not. It’s entirely up to you. On the other hand, the private key is kept, well, private, You only keep this key on your system, never giving access to that key to anyone.

When someone wants to send you a secret encrypted message, they need your public key. Any message encrypted with the public key can ONLY be decrypted with the associated private key. So anyone that wants to send you a secret message only needs your public key to do so. They also need to have installed MacGPG just like you did.

So, they encrypt their message using your public key and send it to you. Because you have the only copy of your private key on your computer, you are the only person able to decrypt this message and read it.

Now the same is also true in reverse. Any message encrypted with the secret key can be decrypted with the public key.

So if you want to send an encrypted message to someone:

  1. Encrypt your message using your private key.
  2. Email it to your friend.
  3. They then decrypt it by using your public key.

I know what you’re thinking.

What’s the use of encrypting a message anyone can decrypt?

The point is to prove you’re the one that created the message. Now this is a greatly simplified explanation of what actually occurs, but hopefully you get the basic idea. Lets dig in.

First you’re going to need to download and install Mac GNU Privacy Guard also kown as Macgpg.

You can get a copy from http://macgpg.sourceforge.net/

Scroll down to the area labeled “files”.

  1. Download the latest disk image for your version of Apple OS X.
  2. It should automatically mount and the image you see to the right should pop up on your desktop.
  3. Next you’ll want to double click the installer package (labeled GnuPG for Mac OS X 1.4.8 as of this writing, or whatever version you downloaded)
  4. Follow the prompts and choose your boot volume, usually “Macintosh HD” for the install location.
  5. Typically the default prompts will work fine on your Mac. You will need your admin password so you can allow the program to install itself.

Now that you have installed MacGPG, lets see about generating a “key pair”.

If you are scared of the command line (its OK really) you can opt for the GPG Keychain access GUI available from the same page.

If you prefer working at the command line you can preform the follwowing:

First launch Terminal.app.

  1. Open a new finder window
  2. Click your Applications folder
  3. Scroll down to the Utilities folder and click it
  4. Double-click Terminal.app
  5. Paste the following instruction into the open Terminal window and hit “enter”
gpg –gen-key

Typically option 1 is recommended.

  • Enter your name
  • Enter your email address
  • you don’t have to enter a comment but you can if you wish.

Once you get yourself a key pair its time to install GPGMail.

Head over to http://www/sente.ch/software/GPGMail/

  • Quick note, if your running Leopard you’ll need to download and install the Beta version of the plugin, as of this writing this will be GPGMail_d53_Leopard.dmg I’ve had no issues using this version on my primary computer.
  • download the image and mount it.

next run the Applescript “Install GPGMail” this will copy the bungle over to your Library/Mail/Bundles folder and enabe plug-in support for Mail.app.

If your running the Leopard and had to use the beta version you’ll need to copy some files into your /Library/Mail/Bundles folder (create the Bundles folder if one does not exist) and run the following 2 commands at the command prompt to enable plug in support.

Now go ahead and fire up Maill.app you’ll now see a new section called PGP in the Preferences panel (Mail > Preferences) as well as a few check boxes to to sign and encrypt your messages. now go bug a friend to set this up and send a few test messages to test it out, remember you need your friends public key before you can send them a encrypted message just as he/she will need yours before they can send you one.

To get your public key to send to your friend you only need to run the following:

gpg –export –output key.pub

or if you installed GPG Keychain fire it up, select your key, and click the export button, thats it. Now email your friend your key. or toss it on a flash drive, once you get his you can use GPG keychain the same way but click Import this time. or if your more comfortable with the command line:

gpg –import key.pub

written by Brandon Leon \\ tags: , ,

Jun 10

Thats right yesterday at the WWDC08 conference Steve Jobs announced the new iPhone 3G, by using the 3G network Apple has more then doubled the speed your able to surf the internet and they’ve added GPS to boot, thats right no more rough estimate of your location GPS can get your location to within a few steps of where your standing.

So apple has set 5 goals for the new iphone

  1. 3G
  2. Enterprise Support
  3. Third party applications
  4. More countries
  5. More affordable

And apple has achieved all of the above goals, they have added 3G (and GPS) Enterprise support by adding better Microsoft Exchange support, they have enabled Third party applications via the App store (due to release next month with iPhone 2.0 software), iPhone will be avaliable in 70 countries over the 6 its currently available in. And last but not least a $199 price tag ($299 for 16gig).

written by Brandon Leon \\ tags: ,

Jun 10

If your anything like me you spend a lot of time at a bash terminal, weather I’m upgrading this very Wordpress blog, or any other sites I run I usually do so over an SSH connection.

One thing I come to use quite often is my history. often times I don’t quite recall which switches I used to run a command I may have used yesterday. by typing “history” at the command line I get the past 1000 commands (500 by default on most systems) I ran. while thats a bit much lets say I wanted to recall where I saved the last tar archive I created. a simple “history | grep tar” will show all the lines that contain the word tar.

now for some useful options for how your systems history functions, I kicked my system up to record the last 1000 commands you can adjust this by making some changes to the environment in your personal bash configuration file (~/.bashrc) or in the global bash configuration file (/etc/bash.bashrc).

export HISTCONTROL=ignoreboth
export HISTSIZE=1000

the first line will tell bash to ignore lines that match the last command you ran so if you run ps -awfux 3 times in a row (even if its over a couple hours) it will only record a single instance of that command.

the second line defines the size of the history file, in my case I chose to save the past 1000 lines.

written by Brandon Leon \\ tags: , ,