A good start would be to read this book. (It's small.) Then whatever web tutorials you find, you'll be able to recognize where they fall short. 🙂
(I don't happen to know off-hand of any tutorials on the subject that I would unequivocally guarantee to be secure -- at least to a practical level of security.)