The Sifrei expounds on the verse in Numbers to derive the parameters of the challah obligation — including the species, minimum amounts, and the status of the dough — providing the Midrash Halakha behind the mitzvah.
וידבר ה' אל משה [וגו'] בבואכם אל הארץ אשר אני מביא אתכם שמה ר' ישמעאל אומר שינה הכתוב ביאה זו מכל ביאות שבתורה. שבכל ביאות שבתורה אומר והיה כי תבואו אל הארץ והיה כי יביאך, וכאן הוא אומר בבואכם. ללמדך שכיון שנכנסו לארץ מיד נתחייבו בחלה. אשר אני מביא אתכם שמה מכאן אתה אומר פירות חו"ל שנכנסו לארץ חייבים בחלה (ובמעשר). יצאו מכאן לשם, ר' אליעזר מחייב ור' עקיבא פוטר. ר' יהודה אומר (אפילו) פירות חו"ל שנכנסו לארץ ר' אליעזר פוטר, שנאמר והיה באכלכם מלחם הארץ. [ ור' עקיבא מחייב שנאמר שמה]. [מלחם הארץ] למה נאמר לפי שהוא אומר ראשית עריסותיכם, שומע אני אף שאר פירות במשמע. הרי אתה דן, נאמר כאן לחם (עוני) ונאמר להלן לחם. מה לחם האמור להלן חמשת המינים אף לחם האמור כאן חמשת המינים. ואלו הן חטים ושעורים וכוסמין ושבולת שועל ושיפון (יצאו אורז ודוחן והפרגים והשומשומים שאין באים לידי חימוץ אלא לידי סרחון). הרימו תרומה לה' בתרומה גדולה הכתוב מדבר. או אינו אלא, בתרומת חלה. כשהוא אומר חלה תרימו תרומה הרי חלה אמורה, הא מה אני מקיים תרימו תרומת ה', בתרומה גדולה הכתוב מדבר, דברי ר' יאשיה. ר' יונתן אומר לפי שהוא אומר ראשית דגנך תירושך ויצהרך חובה. אתה או מר חובה זו אינו אלא רשות, תלמוד לומר תרימו תרומה לה'. [תתנו את כל תרומת ה' חובה ולא רשות]. כתרומת גרן כן תרימו אותה מה תרומת גרן אחת [לאלף] אף חלה אחת [לאלף] מה תרומת גרן מדמעת ועולה באחד ומאה (אף זו אם נפלה לתוך מאה מדמעת) וחייבים בחומש, אף תרומת חלה כיוצא בה, דברי ר' יאשיה. [אמר לו] ר' יונתן (אומר) אתה מקישה לתרומת גרן סתומה, אני אקישה לתרומת מעשר המפורשת. (אומר לו) ותנטל אחת מעשרה. (אמר לו תנטל) אמר לו הרי הוא אומר כתרומת גרן כן תרימו אותה, לתרומת גרן הקשתה ולא הקשתה לתרומת מעשר. ראשית עריסותיכם שומע אני אף עיסת תרומה ועיסת מעשר שני במשמע. ת"ל חלה. תרימו תרומה את שמורם קדש והשאר חולין, ולא שזה וזה קדש. אבל אמרו עיסת מעשר שני בירושלים חייבת בחלה:
(Bamidbar 15:15-17) "And the L-rd spoke to Moses, saying: … upon your coming to the land whither I bring you there": R. Yishmael says: Scripture varied (linguistically) this "coming" from all the other "comings" in the Torah. For in all the other instances it is written "And it shall be, when you come to the land"; "And it shall be when the L-rd shall bring you" (all such expressions connoting permanent settlement), whereas here it is written "upon your coming" (connoting the moment of arrival), to teach that the mitzvah of challah (the Cohein's share of the dough) devolved upon them immediately upon their entering the land "whither I bring you there": From here you derive that produce grown outside the land which enters the land is subject to challah. It is from here (Eretz Yisrael) to there that R. Eliezer ruled it subject to challah, and R. Akiva exempts it. R. Yehudah says: Produce grown outside the land which entered the land — R. Eliezer exempts it, it being written (Ibid. 19) "and it shall be, when you eat of the bread of the land," and R. Akiva rules it subject to challah, it being written "there" (i.e., in Eretz Yisrael). What is the intent of "when you eat of the bread of the land"? From (Ibid 20) "the first of your dough," I would understand even other produce (as being subject to challah). You, therefore, reason: It is written here "bread" and elsewhere (Devarim 16:3) "bread." Just as "bread" there is of the five species: wheat, barley, rye, oats, and spelt, so, "bread" here. (Bamidbar, Ibid. 19) "that you shall separate an offering (terumah)": This speaks of the "great terumah" (taken from one's produce [viz. Devarim 18:4]) — But perhaps it speaks of the challah offering! — (This cannot be, for) (Bamidbar, Ibid. 20) "challah, you shall offer up an offering" already speaks of challah. How, then, is "you shall offer up an offering to the L-rd to be understood? As referring to the "great terumah," (which is taken before the challah is separated). (Devarim 18:4) "The first of your corn, your wine, and your oil … shall you give to him" (the Cohein). This is mandatory. You say that it is mandatory, but perhaps it is optional (i.e., if you separate it, you must give it to him, but you need not separate it.) It is, therefore, written "You shall separate terumah" — It is mandatory and not optional. I might think that flours, too, are subject to challah; it is, therefore, written "the first of your dough" — when it has become dough. [From here they ruled: One may eat a chance meal of started dough of wheat before it has been rolled out, or of barley before it had been well kneaded, (after which it becomes subject to challah). If one ate of it — of wheat flour, after it had been rolled out, or of barley flour after it had been well kneaded, (without taking challah) — he is liable to the death penalty. Once she had added the water, she must remove her challah, so long as there not remain there (in the kneading-trough) five quarter-kavs or more of flour that had not been mixed with water, (for if there did, they are subject to challah.)] For challah is not taken from (unprocessed) flour. If one had not taken challah from the dough, I might think he may not take it from the bread; it is, therefore, written (Bamidbar, Ibid. 19) "And it shall be when you eat of the bread of the land, you shall separate, etc." R. Akiva says: All (vis-à-vis the separation of challah) is contingent upon its forming a crust in the oven. (Ibid. 24) "As terumah of the threshing floor, so shall you offer it" (the challah). Just as with terumah, (the designated separation is) one (part) to a thousand, so, challah. And just as terumah of the threshing floor is "raised" (if it became intermixed) with one hundred and one times (its amount of non-terumah — which may then be eaten by non-Cohanim); and it creates a forbidden admixture for non-Cohanim if it fell into (only) a hundred of non-terumah; and it creates liability to the death penalty and to the one-fifth (chomesh) restitution penalty (viz. Vayikra 5:16) — so, with challah. These are the words of R. Yoshiyah. R. Yonathan "whispered" to him: You liken it to terumah of the threshing floor, (the percentage of) which is unspecified (in the Torah)? I will liken it to terumath ma'aser (Bamidbar 18:26), (the percentage of) which is explicit (in the Torah) — and one-tenth should be taken (as challah). He responded: It is written "As the terumah of the threshing floor, so shall you offer it." It is likened to terumah of the threshing floor, and not to terumath ma'aser.