In the Zohar in chapter XXXI, Rabbi Eleazar states:
The probable cause of their great dissimilarity of nature arose from coitions [aka coitus as in sexual intercourse] of the being termed the serpent, and Adam with Eve who thus brought forth two sons, one of which, Cain, was from an impure, the other, Abel, from a pure progenitor; hence the difference in their lives and actions. As Cain was the issue from the death angel, he killed his brother who issued from the right side of the tree of life. And through him has come all the evil generations of demons and elementals now in the world.
http://www.sacred-texts.com/jud/zdm/zdm040.htm
Serpent seed doctrine has its origins in the Talmudic book of the Zohar.