That sounds like you are believing the error of neonomianism, faith replaces the Law for righteousness, the "law of faith".
"Therefore being justified by faith,.... Not that faith is at the first of our justification; for that is a sentence which passed in the mind of God from all eternity, and which passed on Christ, and on all the elect considered in him, when he rose from the dead; see Ro 4:25; nor is it the chief, or has it the chief place in justification; it is not the efficient cause of it, it is God that justifies, and not faith; it is not the moving cause of it, that is the free grace of God; it is not the matter of it, that is the righteousness of Christ: we are not justified by faith, either as God's work in us, for, as such, it is a part of sanctification; nor as our work or act, as exercised by us, for then we should be justified by works, by something of our own, and have whereof to glory; but we are justified by faith objectively and relatively, as that relates to the object Christ, and his righteousness; or as it is a means of our knowledge, and perception of our justification by Christ's righteousness, and of our enjoying the comfort of it;..." John Gill on Romans 5:1
"By God’s act you are in Christ Jesus; God has made him our wisdom, and in him we have our righteousness, our holiness, our liberation. Therefore, in the words of scripture, ‘If anyone must boast, let him boast of the Lord.’" (1Cor 1:30-31, REB)
Christ was innocent of sin, and yet for our sake God made him one with human sinfulness, so that in him we might be made one with the righteousness of God. (2Cor 5:21, REB)
Old Testament prophecy:
“Behold, the days are coming, says the LORD, when I will raise up for David a righteous Branch, and he shall reign as king and deal wisely, and shall execute justice and righteousness in the land. In his days Judah will be saved, and Israel will dwell securely. And this is the name by which he will be called: ‘The LORD is our righteousness.’ (Jer 23:5-6, RSV)
“Behold, the days are coming, says the LORD, when I will fulfil the promise I made to the house of Israel and the house of Judah. In those days and at that time I will cause a righteous Branch to spring forth for David; and he shall execute justice and righteousness in the land. In those days Judah will be saved and Jerusalem will dwell securely. And this is the name by which it will be called: ‘The LORD is our righteousness.’ (Jer 33:14-16, RSV)