Our Gemara on Amud Aleph discusses a prohibition against excessively friendly greetings toward pagans, such as repeating a blessing of peace, as opposed to merely responding, which would be proper courtesy. However, Rav Kahana seemed to have a different practice:
וְאֵין כּוֹפְלִין ״שָׁלוֹם״ לְגוֹי: רַב חִסְדָּא מַקְדֵּים וְיָהֵיב לְהוּ שְׁלָמָא. רַב כָּהֲנָא אֲמַר לְהוּ ״שְׁלָמָא לְמָר״.
It was stated above in the name of Rav that one may not double the greeting of shalom extended to a gentile. The Gemara relates that Rav Ḥisda would greet gentiles first so that he would not have to respond to the greeting extended to him with a twofold shalom. Rav Kahana, by contrast, would wait for their greeting, and then say to them: Peace to my master, thereby freeing himself from having to say shalom twice.
Rashi is troubled by Rav Kahana’s response and suggests that when he said "peace unto my master," he secretly had in mind his teacher, and not the pagan. Tosafos wonders why it was necessary for Rashi to add that piece, since, after all, Rav Kahana did not repeat himself. Some say that Rashi's text actually had Rav Kahana repeating the greeting, which makes sense because it is clear that Rav Kahana waited to make a response, which the Gemara says leads to repetition because now one must show extra courtesy. Others say that Rashi was reacting to the word "master" as it is incongruous to refer to a pagan as a master. Thus, Rashi suggested that Rav Kahana really had in mind his teacher.
Tosafos raises another question: How is he allowed to do this? Is this not dishonest?
It is most interesting that Tosafos apparently holds that "stealing knowledge" (גניבת דעת) is a severe enough prohibition, even in regard to a pagan and what is required to maintain good relations, where you might think it would be OK to stretch the truth a bit. Nevertheless, Tosafos finds misleading in this way to be unacceptable.
Chasam Sofer asks on Tosafos, but we find that it is an accepted practice to speak in this form of double entendre to a gentile. It states in Shavous (35b):
כל מלכיא האמורים בדניאל חול חוץ מזה שהוא קדש (דניאל ב, לז) אנת מלכא [מלך] מלכיא די אלה שמיא מלכותא חסנא ותקפא ויקרא יהב לך
All kings that are stated with regard to Daniel are non-sacred, except for this one, which is sacred: "You, O king, king of kings, unto whom the God of heaven has given you the kingdom, the power, and the strength, and the glory" (Daniel 2:37).
Similarly, Pesach Einayim, based on the Zohar, notes that Yaakov also had a similar intention when he bowed and greeted his brother Esau (Bereishis 33:3). So why is Tosafos troubled by this form of dishonesty when it is a commonly utilized strategy when encountering a possibly troublesome, if not dangerous, person?
I believe that Tosafos sees a fundamental difference between the casual greeting of a pagan and encounters with dignitaries. When encountering a dignitary, such as when Daniel spoke to Nebuchadnezzar or when Yaakov met Esau, having in mind God is not actually a falsehood. That is because the archetype of kingship itself comes from God. For example, Gemara Berachos (58a) tells us about Rav Shayla's encounter with a king and emperor of his time:
פְּתַח רַבִּי שֵׁילָא וַאֲמַר: ״לְךָ ה׳ הַגְּדֻלָּה וְהַגְּבוּרָה וְגוֹ׳״. אָמְרִי לֵיהּ: מַאי קָאָמְרַתְּ? אֲמַר לְהוּ, הָכִי קָאָמֵינָא: ״בְּרִיךְ רַחֲמָנָא דְּיָהֵיב מַלְכוּתָא בְּאַרְעָא כְּעֵין מַלְכוּתָא דִרְקִיעָא, וִיהַב לְכוּ שׁוּלְטָנָא וְרָחֲמִי דִּינָא״. אֲמַרוּ: חַבִּיבָא עֲלֵיהּ יְקָרָא דְמַלְכוּתָא כּוּלֵּי הַאי! יָהֲבִי לֵיהּ קוּלְפָא אֲמַרוּ לֵיהּ: דּוּן דִּינָא.
As they considered the sentence, Rabbi Sheila praised God for saving him from danger: "Yours, O Lord, is the greatness, power, glory, triumph and majesty; for all that is in heaven and on earth is Yours; Yours is the kingdom, O Lord, and You are exalted as head above all" (I Chronicles 29:11). They asked him: What did you say? He told them: This is what I said: Blessed is the Merciful One who grants kingdom on earth that is a microcosm of the kingdom in heaven, and granted you dominion and love of justice. They said to him: Indeed, the honor of royalty is so dear to you. They gave him a staff to symbolize his license to sit in judgment and said to him: Judge.
We see from Rav Sheila's praise how the forms of kingdom on earth are metaphors for God's complete dominion and mercy. This is why having in mind God when saying "master" to a king or leader is not considered lying, as opposed to referring to a random person on the street.
Everything in this world is a metaphor for something higher that exists as a universal truth. Whatever has been created or manifested on a physical plane is a reverse tip of the iceberg, with heavenly versions of the same process existing in its spiritual form. The Shalah (Toldos Odom:15) states that every word in Hebrew, the holy tongue, is a metaphor or borrowed term from a broader spiritual reality. For example, he says the Hebrew word for rain, "geshem," does not actually mean rain. Rather, it means the way in which God brings down sustenance and blessings from the upper world to all the lower worlds to allow for growth and development. In this world, rain is the physical manifestation of that, and thus Hebrew uses "geshem" as a metaphor to represent rain. Or, we might say, a mother's love is a representation of the Shekhina's involvement, love, and care in this world. So too, resting on Shabbos from "work" is a bigger idea than merely resting. Any experience, process, or emotion represents something much greater in an advanced form. Everything has God's fingerprints on it.