Few minutes ago, Dev-Team released their new PwnageTool for jailbreaking iPhone OS 3.1
iPhone 2G (1st Generation)

Use PwnageTool to do the magic and then restore with iTunes using your newly created .ipsw ‘nuff said, you don’t need to worry about anything, the baseband will be unlocked, the phone jailbroken.
iPod Touch 1G (Original iPod Touch)
Use PwnageTool to create a firmware image and restore with that .ipsw using iTunes.
iPod Touch 2G (New iPod Touch)
Sorry, no support at this time within PwnageTool, use Redsn0w for an earlier (pre 3.1) firmware release instead.
Torrent Link:
THIS DOES NOT SUPPORT THE 3GS OR NEW IPOD TOUCH. redsn0w for Mac OS X and Windows will follow sometime in the near future, please don’t bug us about it – we’ll release when we have something ready.