In Genesis 24:2-9, we read of how Abraham instructed his chief servant to "place his hand under his thigh" and swear an oath. This oath was an important one because it indicated that Abraham's covenantal son (Isaac) should marry a monotheist and not one of the idolatrous Canaanite women. This oath "under the thigh" secured the monotheistic tradition of the Abraham's descendants.
 And Abraham said to his servant, the oldest of his house, who had charge of all that he had, "Put your hand under my thigh,
 and I will make you swear by the LORD, the God of heaven and of the earth, that you will not take a wife for my son from the daughters of the Canaanites, among whom I dwell,
 but will go to my country and to my kindred, and take a wife for my son Isaac."
 The servant said to him, "Perhaps the woman may not be willing to follow me to this land; must I then take your son back to the land from which you came?"
 Abraham said to him, "See to it that you do not take my son back there.
 The LORD, the God of heaven, who took me from my father's house and from the land of my birth, and who spoke to me and swore to me, `To your descendants I will give this land,' he will send his angel before you, and you shall take a wife for my son from there.
 But if the woman is not willing to follow you, then you will be free from this oath of mine; only you must not take my son back there."
 So the servant put his hand under the thigh of Abraham his master, and swore to him concerning this matter.
The placing of one's hand under the "thigh" is a euphemistic way to refer to swearing upon the testicles of the master. The testicles are the sign of Abraham's descendants (they literally contained the "seed" that God had promised to bless in Genesis 15, 17, 22).
By placing his hand there, the servant of Abraham made a solemn oath concerning the blessed progeny of Abraham. This association between testicles and testimony is not particularly Semitic or Jewish. Although the etymology is contested by some (e.g famed etymologist Carl Darling Buck), the word Latin word testes is identical to the same word for "witnesses". It may be that testis derives from tri-literal roots ter ("three") and stas ("stand") referring to the ancient custom that a testimony comes three witnesses who stand in court (Hat tip to Michael Bolin, Ph.D. Cand. for this insight).
This etymological connection between testicles and witnesses is also found in Greek, French, and obviously English. The Abrahamic Covenant in general is sealed upon the genitals of Abraham and his descendants. It's not a "yucky" practice but a powerful sign of the powers of generation in the bringing about of redemption in God's economy. Circumcision is a sign that points to the promised Seed of Redemption, originating in the promise of Genesis 3:15. Circumcision is no longer necessary, because Christ has been born. Christ was the last to receive true circumcision because the sign was completed and fulfilled in Him. Thus, Christians receive baptism alone when they enter into the New Covenant of Christ. Saint Paul explains that the benefit of circumcision is received by the Christian through baptism (cf. Col 2:10-11).