Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) narrates: We used to talk during the prayer; one of us would greet another with salam. Then the Messenger of Allah (peace and blessings be upon him) said: "Allah, the Mighty and Majestic, brings about whatever new ruling He wills from His command, and He has brought about the new ruling that you should not speak during the prayer."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 10094