The 317th prohibition is that we are forbidden from cursing any Jew.
The source of this prohibition is G‑d's statement, "You shall not curse the deaf."
I will now explain why only "the deaf" are mentioned.
When a person, in accordance with his impression of the damage he has suffered, is aroused to take revenge against the person who harmed him, he will not rest until he takes revenge to match the damage he feels. Only then will his desire be put to rest and the impression erased from his mind.
Some people will calm down after just cursing and shaming the other person, keeping in mind the extent of damage and shame that they feel is "due" the other person. Sometimes it is more serious, and he won't be calmed until he destroys all the person's possessions, realizing the pain he will cause him through this destruction. At times it is even more serious, and he won't be calmed until he takes physical revenge through beating the person, or causing him loss of limb. Sometimes it could reach the most serious level, when he won't be calmed until he kills the person and nullifies his very existence.
And sometimes the transgression is so small that he doesn't even want to punish the other person. He will be calmed merely by yelling, getting angry at him or cursing him — even [so quietly] that if the person was present he wouldn't hear. It is well known that hot-tempered people will calm down even with this reaction when the offense was very minute, although the other person will not know of his anger nor hear his curse.
We might think that the Torah prohibits cursing a Jew only when he will hear it, because of the shame and pain he feels, but there is nothing wrong with cursing a deaf person, since he doesn't hear it and doesn't feel any pain as a result. The Torah therefore told us that this too is forbidden, because it is concerned not only with the one who is being cursed, but with the one who is uttering the curse. A person is prohibited from gearing himself for revenge and becoming accustomed to getting angry.
We indeed find that our Sages used this verse, "Do not curse the deaf," to prove that it is prohibited to curse any Jew. The Sifra says, "This verse speaks only of a deaf person. How do we know that all Jews are included? From the phrase, '[A Nasi] of your people do not curse.' If so, why does this verse mention specifically the deaf? To teach you that [cursing] the dead is excluded: Just as the deaf are alive, the prohibition likewise includes anyone who is alive." And the Mechilta says, "The phrase, 'Do not curse the deaf,' refers to even the most downtrodden human beings."
When we say that this transgression is punishable by lashes, it is only when the curse was uttered using G‑d's Name. Even if a person curses himself, he is punished by lashes.
In summary, one who curses a person using G‑d's Name transgresses the prohibition, "Do not curse the deaf." One who curses a judge transgresses two prohibitions and receives two sets of lashes. One who curses a Nasi receives three sets of lashes. The Mechilta says, "The phrase, 'A Nasi of your people [do not curse],' includes both a Nasi and a judge. Why does the Torah also say, 'Do not curse a judge'? To punish the person for each prohibition separately."
From here our Sages said that a person could transgress four prohibitions with a single statement: the son of a Nasi who cursed his father. He transgresses the following four prohibitions: cursing his father, a judge, a Nasi, and a Jew.
We have therefore explained what we set out to do.
The details of this mitzvah are explained in the 4th chapter of tractate Shavuos.