La Genèse 17:23 Midrash : Midrash Tanchuma, Bereshit Rabbah & Midrash Tehillim

וַיִּקַּ֨ח אַבְרָהָ֜ם אֶת־יִשְׁמָעֵ֣אל בְּנ֗וֹ וְאֵ֨ת כָּל־יְלִידֵ֤י בֵיתוֹ֙ וְאֵת֙ כָּל־מִקְנַ֣ת כַּסְפּ֔וֹ כָּל־זָכָ֕ר בְּאַנְשֵׁ֖י בֵּ֣ית אַבְרָהָ֑ם וַיָּ֜מָל אֶת־בְּשַׂ֣ר עָרְלָתָ֗ם בְּעֶ֙צֶם֙ הַיּ֣וֹם הַזֶּ֔ה כַּאֲשֶׁ֛ר דִּבֶּ֥ר אִתּ֖וֹ אֱלֹהִֽים׃

Abraham prit Ismaël son fils, tous les enfants de ses esclaves et ceux qu’il avait achetés à prix d’argent, tous les mâles de la maison d’Abraham; il retrancha la chair de leur excroissance, ce jour-là même, ainsi que Dieu le lui avait dit.

Midrash Tanchuma

R. Isaac Nappaha began the discussion with the verse An altar of earth shalt thou make Me…. in every place I cause My name to be mentioned, I will come unto thee and bless thee (Exod. 20:21–24). The Holy One, blessed be He, declared: Since I reveal Myself to anyone who brings a burnt offering or a peace offering in order to bless him, how much more so would I reveal Myself to Abraham, who sacrificed himself for Me. Hence, it is said: And the Lord appeared unto Him. R. Aha said: I will prove to you that the Holy One, blessed be He, strengthened Abraham. On the very day he circumcised himself, and while his blood was still flowing, he circumcised Ishmael and all the men of his household. How many men were born in his home? Three hundred and eighteen. (Now if that many were born in his home) how many others must he have purchased, and yet it is written: And Abraham took Ishmael and all that were born in his house, and all that were bought with money (Gen. 17:23), and: In that selfsame day was Abraham circumcised, and Ishmael his son, and all the men of his house born in the house, and bought with money, etc. (ibid., vv. 26–27). (It continued) until Abraham piled up a hill of foreskins, and a river of blood poured forth from his home.

Bereshit Rabbah

“The refugee came and told Abram the Hebrew, and he was dwelling in the plains of Mamre the Emorite, brother of Eshkol and brother of Aner, and they were allies of Abram” (Genesis 14:13).
“The refugee came” – Reish Lakish in the name of bar Kappara: This is Og; he is the “refugee.” Why is he called Og? Because he came and found Abram sitting and engaging in the mitzva of baking [unleavened] loaves [ugot] [for Passover].71See Exodus 12:39. His intentions [in informing Abraham] were not to act for the sake of Heaven. Rather, he said: ‘This Abraham is a zealot. If I say to him now: Your nephew has been taken captive, he will go out to war and be killed, and I will take his wife Sarai.’ The Holy One blessed be He said to him: ‘By your life, you will receive reward for your strides that you walked [to travel to Abraham], in that you will live long in the world.72He was ultimately killed by Moses, centuries later (Numbers 21:35). But because you thought to kill that righteous man, by your life, you will see thousands upon thousands and tens of thousands upon tens of thousands of his descendants, and the end of that man73You, Og. will be only to fall into their hand,’ as it is stated [by Moses]: “The Lord said to me: Do not fear him, as [I have delivered him]…into your hand” (Deuteronomy 3:2).
“And told Abram the Hebrew [Ivri]” – Rabbi Yehuda, Rabbi Neḥemya, and the Rabbis, Rabbi Yehuda says: The entire world was on one side and he was on the other side [ever].74In an ideological sense. Rabbi Neḥemya said: Because he was among the descendants of Ever. The Rabbis say: It is because he is from the other side [ever] of the river,75Abraham came to the land of Israel from the other (eastern) side of the Euphrates. and he spoke the Hebrew [Ivri] language.
“He was dwelling in elonei Mamre” – Rabbi Yehuda and Rabbi Neḥemya, Rabbi Yehuda said: [This means] in the plains of Mamre. Rabbi Neḥemya said: In the palace of Mamre. According to the opinion of Rabbi Yehuda, it is a place whose name is Mamre. According to the opinion of Rabbi Neḥemya, it is a person whose name was Mamre. And why was he called Mamre? Rabbi Azarya in the name of Rabbi Yehuda in the name of Rabbi Simon: It is because he was brazen-faced regarding Abraham.76He was bold in his support of Abraham, as the Midrash goes on to relate. When the Holy One blessed be He told Abraham to circumcise himself, he went and consulted with his three friends.77Listed in Genesis 14:24. Aner said to him: ‘You are already one hundred years old and you are going to bring pain upon yourself?’ Eshkol said to him: ‘What, are you going to put an end to yourself in the midst of your enemies?’78People will say that you have castrated yourself. Mamre said to him: ‘[This is] your God who stood by you [during your ordeal] in the fiery furnace, and during [your war with] the kings, and during the famine, and in this matter that He has said to you, to circumcise yourself, you do not heed Him?’ The Holy One blessed be He said to him: ‘You gave him counsel to circumcise himself; by your life, I will not appear to him in Aner’s palace, nor in Eshkol’s palace, but only in your palace.’ That is what is written: “The Lord appeared to him in the palace of Mamre” (Genesis 18:1).

Bereshit Rabbah

“Abraham took Ishmael his son, and all those born in his house, and all those purchased with his money, every male among the people of Abraham’s household, and he circumcised the flesh of their foreskin on that very day, as God had spoken with him” (Genesis 17:23).
“Abraham took Ishmael his son, and all those born in his house” – Rabbi Aivu said: When Abraham circumcised [the foreskins of] all those born in his house, he stacked them into a mound of foreskins. When the sun shone upon them, they became wormy,28They began to rot. and their odor rose before the Holy One blessed be He like the incense of the spices, and like a burnt offering that is given over completely into the [altar’s] fire.29And is referred to as “a pleasing aroma to the Lord” (Exodus 29:41). The Holy One blessed be He said: ‘When the descendants of this man will come to commit transgressions and evil deeds, I will remember this aroma and become filled with mercy for them, and I will take pity on them.’