"And God [Elohim] spoke" (Exodus 20:1): "Elohim" means none other than a Judge who exacts punishment and is faithful to pay reward. "All the words": this teaches that the Omnipresent spoke the Ten Commandments in a single utterance, something impossible for flesh and blood to do, as it says, "all the words." And why does Scripture then say, "I am" and "You shall have no"? It teaches that the Omnipresent spoke the Ten Commandments in a single utterance and then went back and specified each utterance on its own. I might think that even all the commandments in the Torah were spoken in a single utterance; therefore Scripture says "these." These words were spoken in a single utterance, while the rest of the commandments in the Torah were spoken each one on its own. "Saying" [lemor]: this teaches that they would answer of yes, yes, and of no, no. These are the words of Rabbi Ishmael. Rabbi Akiva says: of yes, yes, and of no, yes.
God the Faithful Judge and the Ten Words in One Utterance
Yalkut Shimoni on Torah 285:4
(שמות כ א) וַיְדַבֵּר אֱלֹהִים אֵין אֱלֹהִים אֶלָּא דַּיָּן לִפָּרַע וְנֶאֱמָן לְשַׁלֵּם שָׂכָר. אֵת כָּל הַדְּבָרִים מְלַמֵּד שֶׁאָמַר הַמָּקוֹם עֲשֶׂרֶת הַדִּבְּרוֹת בְּדִבּוּר אֶחָד מַה שֶּׁאִי אֶפְשָׁר לְבָשָׂר וָדָם לוֹמַר כֵּן, שֶׁנֶּאֱמַר אֵת כָּל הַדְּבָרִים וּמַה תַּלְמוּד לוֹמַר אָנֹכִי וְלֹא יִהְיֶה לְךָ אֶלָּא מְלַמֵּד שֶׁאָמַר הַמָּקוֹם עֲשֶׂרֶת הַדִּבְּרוֹת בְּדִבּוּר אֶחָד וְחָזַר וּפְרָטָן דִּבּוּר דִּבּוּר בִּפְנֵי עַצְמוֹ. שׁוֹמֵעַ אֲנִי אַף כָּל הַדִּבְּרוֹת שֶׁבַּתּוֹרָה נֶאֱמְרוּ בְּדִבּוּר אֶחָד תַּלְמוּד לוֹמַר הָאֵלֶּה, הַדְּבָרִים הָאֵלֶּה נֶאֶמְרוּ בְּדִבּוּר אֶחָד וּשְׁאַר הַדִּבְּרוֹת שֶׁבַּתּוֹרָה נֶאֶמְרוּ דִּבּוּר דִּבּוּר בִּפְנֵי עַצְמוֹ. לֵאמֹר, מְלַמֵּד שֶׁהָיוּ אוֹמְרִים עַל הֵן הֵן וְעַל לָאו לָאו דִּבְרֵי רַבִּי יִשְׁמָעֵאל. רַבִּי עֲקִיבָא אוֹמֵר, עַל הֵן הֵן וְעַל לָאו הֵן.