Jami` at-Tirmidhi, Book 6, Hadith 63 (Tirmidhi 606)

Ali bin Abi Talid (may Allah be pleased with him) narrated that :

the Messenger of Allah said: "The screen between the eyes of the jinns and nakedness of the children of Adam when one of you enters the area of relieving oneself is saying: 'Bismillah.'"