Yirmeyahu / Jeremiah 17:7 · Drash
בָּרוּךְ הַגֶּבֶר אֲשֶׁר יִבְטַח בַּיהוָה וְהָיָה יְהוָה מִבְטַחוֹ׃
Blessed is the man who trusts in the Eternal, and the Eternal will be his trust.
Drash דְּרָשׁ
Yosef's whisper
A slave in a foreign house, without family and without protection. On whom can he lean? The midrash hears what Yosef whispered as he came in to his master.
Tanchuma: of Yosef (Joseph) it says: "Blessed is the man who trusts in the Eternal." Even Potiphar, a wicked man, saw that the Eternal was with Yosef, because the Name of the Holy One, blessed is He, never left his lips. Coming in to serve his master, Yosef whispered a prayer: "You are my trust, let me find favour in the eyes of Potiphar." And when Potiphar asked whether he was casting spells, Yosef answered: "I am praying to find favour in your eyes."
How Midrash Tanchuma explain it
Midrash Tanchuma Blessed is the man who trusts in the Eternal
"But he refused and said to his master's wife" (Bereshit / Genesis 39:8). Of this Scripture says: "Blessed is the man who trusts in the Eternal" (Yirmeyahu / Jeremiah 17:7). You find that when he was in his master's house, "And the Eternal was with Yosef (Joseph), and he became a successful man" and so on (Bereshit / Genesis 39:2). "And his master saw that the Eternal was with him" and so on (Bereshit / Genesis 39:3). Could Potiphar, a wicked man, see that the Holy One, blessed is He, was with him? What is "that the Eternal was with him"?
But the Name of the Holy One, blessed is He, never left his lips. When he came in to serve him, he would whisper and say: "Master of the world, You are my trust, You are my patron, grant me grace, kindness and mercy in Your eyes, in the eyes of all who see me, and in the eyes of Potiphar my master." And Potiphar would say to him: "What are you whispering? Are you perhaps casting spells on me?" And he would answer him: "No, I am praying to find favour in your eyes."
Takeaway
"You are my trust" (בִּטְחוֹנִי) is the same word as in Yirmeyahu's (Jeremiah's) verse: "and the Eternal will be his trust" (מִבְטַחוֹ).
The verse "But he refused" tells how Yosef refused Potiphar's wife. The midrash shows where his strength came from: he kept the Eternal in his words all the time.