Now it is evident that no one is justified before God by (ἐν) the law, for “The righteous shall live by (ἐκ) faith.” (Galatians 3:11 ESV)
"living ἐν something [the Law]"
"living ἐκ something [faith]"
When an author chooses different words, the presumption should be they intend a different meaning.
Strong’s states:
ἐν [the Law]: in, on, among
ἐκ [faith]: from out, out from among, from, suggesting from interior outwards
An example from Matthew highlights the difference:
Now the birth of Jesus Christ took place in this way. When his mother Mary had been betrothed to Joseph, before they came together she was found to be with (ἐν) child from the Holy Spirit. (Matthew 1:18 ESV)
and Judah the father of Perez and Zerah by (ἐκ) Tamar, and Perez the father of Hezron, and Hezron the father of Ram, (Matthew 1:3 ESV)
The child can be ἐν or ἐκ the mother. Living by ἐν the Law is like the child living inside the mother; living by ἐκ faith is like the child living outside the mother. The child in the mother is in bondage to the mother; the child outside the mother is free from that bondage. At the same time in order for one to be “in among” or “out from among” a second (the mother in this example) must be present.
Paul states:
But the law is not of (ἐκ) faith, rather “The one who does them shall live by (ἐν) them.” (Galatians 3:12 ESV)
The Law did not come out of faith. This is obvious. Abraham was justified by faith 430 years before the Law (Gal 3:17). Rather, the Law brought forth those who live by works.
Despite being justified ἐκ faith and not ἐν Law, Paul states the Law played an essential role for the Gentiles:
Now before faith came, we were held captive under the law, imprisoned until the coming faith would be revealed. So then, the law was our guardian until Christ came, in order that we might be justified by (ἐκ) faith. (Galatians 3:23-24 ESV)
The Law which held them captive was also their guardian. Yet Paul states it was "the coming faith," a current event, not something which happened to Abraham which would be revealed. He is speaking to what he said earlier where he also continued the use of ἐν and ἐκ:
Christ did redeem us from (ἐκ) the curse of the law, having become for us a curse, for it hath been written, `Cursed is every one who is hanging on a tree,' that to the nations the blessing of Abraham may come in (ἐν) Christ Jesus, that the promise of the Spirit we may receive through the faith. (Galatians 13-14 YLT)
The Spirit is received through the faith that by the crucifixion Christ redeemed ἐκ (out from among) the curse of the Law in order that ἐν (in among) Christ Jesus the blessing of Abraham might come to the Gentiles. That the Christ was resurrected means, like the mother, He occupies both positions. However, the order is reversed. Christ redeemed "out from among" the Law in order that the blessing of Abraham may come "in among" Christ Jesus.
The combination of blessing and curse is taken from what was spoken to Abram:
Now the LORD said to Abram, “Go from your country and your kindred and your father's house to the land that I will show you. And I will make of you a great nation (ἔθνος LXX), and I will bless you and make your name great, so that you will be a blessing. I will bless those who bless you, and him who dishonors you I will curse, and in you all the families of the earth shall be blessed.” (Genesis 12:1-3 ESV)
The Law which cursed Jesus remains and it will be cursed. Yet the promise remains:
And the Scripture, foreseeing that God would justify the Gentiles (ἔθνη) by faith, preached the gospel beforehand to Abraham, saying, “In you shall all the nations (ἔθνη) be blessed.” So then, those who are of faith are blessed along with Abraham, the man of faith. (Galatians 3:8-9 ESV)
Paul's argument can be paraphrased: The faith they have in Christ is that He became cursed by the Law and therefore the Law will be cursed and no longer enslave those who by faith believe the promise made to Abram: "I will make of you a great ἔθνος."