I can't tell you about Mac because I don't have one nor work with one anymore. Go to settings>General>About and scroll down. If your bootrom (firmware) says 05.12.01 then you should be okay to JB and unlock. Other factors for other bootroms may make it difficult but since I'm not IT person, I won't speak on that, I can only tell you what I did by reading this forum and looking at what others have said.
However if your phone has never been jailbroken before, use Spirit for the JB Spirit and then go to Cydia and do a search for ultrasn0w. Install, reboot and then try it. It worked for me and I have the same bootroom and OS 3.1.3 (7E18).