Apple has added a new layer of security to the iPhone 3GS called the ECID field. According to GeoHot when iTunes starts the restore process, they contact Apple servers to generate signatures just for your device. It's important you get these signatures for your phone before a new version of the software comes out.
Put your iPhone into recovery mode. If you do not know how to do this then you can follow this tutorial.
Launch the USBView application. If you do not already have this application you can download it here. It is a small free utility provided by Microsoft.
Click to select Config Discriptors from the Options menu.
Click to select Refresh from the File Menu.
Select the Apple Recovery (iBoot) device from the USB Device Tree in the left panel then Copy (highlight and press Control+c) your ECID from the Descriptor fields on the right.
Open your web browser and navigate to purplera1n.com. Paste (control+v) the ECID into the field provided and press the Enter key.
The site will generate a file and ask you whether you would like to save or open it. Click to Save the file and store it in case you need it in the future.