Your question is quite a serious one, and unfortunately it has been posed many times throughout our tragic history. Here is how one rabbi answered.

Out of the Depths

Rabbi Ephraim Oshry (1914–2003) was a young rabbi in Kaunas (Kovno), Lithuania, when on June 23, 1941, the Nazis invaded the city and herded all the Jews into the ghetto.

As a rabbi in the ghetto, he was presented with many truly harrowing and heartbreaking questions of Jewish law relating to those dark days. As a twist of fate would have it, he had access to Jewish books, since the Nazis had made him custodian of a warehouse of Jewish books that they planned on using for an exhibit of “artifacts of the extinct Jewish race.”

He recorded brief notes of these questions and the answers given, and eventually hid them. Following the liberation of the ghetto in August of 1944, Rabbi Oshry recovered and expanded his notes, and soon began publishing his set of Holocaust-era responsa entitled She’eilot u-Teshuvot mi-Ma’amakim, “Responsa From the Depths,” some of which can be seen online.

He records the following question:1

Among those in the ghetto, there was a Jewish man who possessed a German passport issued before the outbreak of the war. Since his name was not a conspicuously Jewish one, he could have passed for a non-Jew, but in order to complete the deception, he would have to write the letters “R.C.” in his passport, indicating that he was a Roman Catholic. He asked Rabbi Oshry whether this was permissible, since adding these two letters might appear to be acknowledging a deity other than the G‑d of the Jews.

The issue at heart of this question is perhaps best summed up by Maimonides in his Sefer Hamitzvot:

The 9th mitzvah is that we are commanded to sanctify G‑d's Name.

The biblical source for this commandment is G‑d's statement, "Sanctify Me amidst the Jewish people."2

This mitzvah requires us to publicize the true belief to the masses. This must be done without fear of retribution, to the extent that even if a powerful tyrant tries to force us to deny G‑d (exalted be He), we may not obey him. Rather, we must unquestioningly submit to death, not even allowing him to think that we have denied G‑d (exalted be He) [by outwardly denying Him], even if we still maintain belief in Him in our hearts . . .

Thus, the questioner wanted to know if adding “R.C.” to his passport could be considered denying his faith.

Levels of Deception

Rabbi Oshry responded that he could write the two letters R.C., for, though non-Jews would think the letters indicated that he was a Roman Catholic, in his own mind, he could think of the letters “R.C.” as a transliteration of the Hebrew word רק or rak.3 It was irrelevant how non-Jews would construe those letters.

This answer is based on the halachah in the Code of Jewish Law that in times of religious persecution, one is permitted to change his clothing so that he will not be recognized as a Jew, since doing so does not overtly declare that he is not Jewish.4 Additionally, Rabbi Moses Isserlis adds in his gloss to the Code of Jewish Law that it is permitted for one to make an ambiguous statement that could be interpreted to mean that the Jew declared himself to be a non-Jew, when in fact, he meant something else. Similarly, if he is able to deceive the non-Jews so that they believe he is not Jewish, it is permitted.5

How is this reconciled with Maimonides’ statement that one may not do anything that would cause the persecutor to think that he has denied G‑d? Rabbi Oshry went on to explain that Maimonides’ statement is referring to a situation in which it is already known that one is a Jew. However, if it is not known that he is Jewish, then, in times of persecution, one may make an ambiguous statement that could be construed by others to mean that he is not Jewish.

Thus, according to Rabbi Oshry, explicitly denying your faith is always forbidden. However, in times of danger, you are permitted to make statements or do actions that could be construed as implying that you aren’t Jewish.

Going Beyond the Letter of the Law

But though it is permissible to give the impression that you are not Jewish, there are countless stories of people who were ready to give up their lives rather than imply even for a moment that they weren’t part of the Jewish people.

When the Nazis entered France, they immediately ordered a census of all the inhabitants, including information regarding their race and religion. When they came to the Rebbe’s apartment, he was not home. Since their intent was obvious, when asked regarding their religion, the Rebbe’s wife, Rebbetzin Chaya Mushka, answered, “Orthodox.” This was not a lie, because it could have been interpreted as “Orthodox Jews.” Nevertheless, the implication was “Russian Orthodox.” When the Rebbe returned and heard of this, he hurried to the census office and asked to correct the matter by adding the word “Jew.”

On a similar note, here is a fascinating contemporary story that occurred during the First Gulf War: The Dog Tag Dilemma