This tutorial can be used to jailbreak before applying the BlackSn0w unlock to your device.
Create a folder on your desktop called Pwnage
Download RedSn0w from here and place it in the Pwnage folder. Likewise, download the latest 3.1.2 firmware from below and place it in the same folder.
3.1.2 (3G): iPhone1,2_3.1.2_7D11_Restore.ipsw
Extract the RedSn0w application from the RedSn0w zip file to the Pwnage folder.
***If you are running iPhone OS 3.1.2 or 3.1.3 you may skip this step***
Connect your iPhone to the computer and launch iTunes.
Select your iPhone from the list of devices on the left. Now hold down shift and click the Restore button. Restore is preferred as it won't create any wasted space on your iPhone.
Navigate to the Pwnage folder on your desktop and select the firmware ipsw. Click the Open button to continue.
Once iTunes has finished updating your iPhone to the desired firmware you may launch redsn0w.exe from the Pwnage folder on your desktop.
Once RedSn0w opens click the Browse button
Even if you are on firmware 3.1.3, still select firmware 3.1.2. Redsn0w works the same way on firmware 3.1.2 or firmware 3.1.3. If you select firmware 3.1.3, you will get an error, as Redsn0w does not recognize the 3.1.3 file yet.
Select the firmware ipsw we placed in the Pwnage folder on our desktop then click Open
Once the firmware has been verified click the Next button to continue.
From this window you can select the jailbreak options you would like. If you have already pwned your device check the Already pwned option.
Verbose boot displays detailed information on boot of your device and is generally only needed by developers and advanced users.
Make sure Cydia is selected. For this tutorial we will also select Custom boot logo and Custom recovery logo.
When you click to select each custom logo option a dialog window will appear asking you to select the image. Locate the image you would like to use then press the Open button.
*Remember the rules for boot logos are: RGB or Grayscale format with Alpha channel and dimension below 320x480. If you would like to use the iClarified ones they can be found here: Boot Logo, Recovery Logo
Click the Next button to continue
Please plug your iPhone into the computer and make sure its OFF then click the Next button
RedSn0w will now guide you through the steps to get into DFU mode.
Hold down both the Home button and the Power button for 10 seconds.
Release the Power button and continue holding the Home button until RedSn0w detects the device.
Your iPhone will now reboot
RedSn0w will then begin uploading the new RAM Disk and Kernel.
Once this is complete you will be notified that RedSn0w is done. Click the Finish button. After your iPhone finishes rebooting (5 minutes or so), it will be jailbroken with Cydia on the SpringBoard.
*As usual a big thanks to the iPhone Dev-Team for their contribution to the community!