It is narrated from Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) used to recite the tashahhud in the prayer. He said: We used to preserve it from the Messenger of Allah (peace and blessings be upon him) just as we preserve the letters of the Qur'an - down to the waws and the alifs. He said: When he (peace and blessings be upon him) sat on his left hip, he would say: "All verbal, physical and monetary acts of worship are for Allah alone. O Prophet, peace be upon you, and the mercy of Allah and His blessings. Peace be upon us and upon the righteous servants of Allah. I bear witness that there is no deity except Allah, and I bear witness that Muhammad is the servant of Allah and His Messenger." Then he would supplicate to his Lord, then give the salam and turn away.
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 9896