The Reformers regarded the doctrine of justification as the cardo (Latin for "hinge") upon which the whole of Christian doctrine hangs. It is the cardinal doctrine based on the words of the Apsotle Paul, "For by grace you have been saved through faith. And this is not your own doing; it is the gift of God" (Eph 2:8). So a sinner is justified before God by grace, through faith in Christ.
Now faith consists of three elements: notitia (knowledge of the objective person and work of Christ in the economy of redemption), assensus (belief that these objective facts are true), and fiducia (trusting personally in the efficacy and sufficiency of Christ and His work). These three work together to form the content of saving faith. Remove "fiducia" and you get the Hodges/Ryrie/Stanley formula for antinomian, semi-Pelagian, "free grace" faith, wherein assent to fact is all that's needed to be justified (Lose your faith down the line? No worries. A one-time expression of belief is the sole requirement for salvation. But heavenly rewards? You need lots of good works for that!). On the other hand, replace "fiducia" with "the determination of the will to obey truth" (The Gospel According to Jesus, p. 173) and you get JMac's semi-legalistic, works-based faith. It is clear that the former kind of faith best describes the Apostle James' "devil's faith", warranting no further exposition here, while the latter expression confuses justification with sanctification, something which I believe merits discussion.
Christ's 33 years of life and subsequent death earned for His elect both justification and sanctification. The sinner who puts faith in Christ is justified in the sight of God by virtue of Christ's active and passive obedience; the former fulfilling for him the requirement of perfect holiness/obedience and the latter appeasing the wrath of God. But what of personal obedience and good works? If sanctification is the domain of these two, wherein the Christian is conformed more and more into the likeness of Christ through the Holy Spirit, can a person who appears to lack personal holiness have the assurance of salvation?
Firstly, it must be asserted that the elect, by virtue of union with Christ, must by necessity be justified and sanctified. In other words, sanctification always flows from justification, but they are distinct. This distinction is no small point to make for on it hangs the issue of assurance. Michael Horton states, referring to the "lordship salvation" debate between Hodges and JMac, "This question of assurance is at the root of the present controversy. After all, it is not enough to be saved by grace. We must also have assurance that we are saved by grace" (Christ the Lord, p. 51). Secondly, given this distinction, it is apparent that assurance is chiefly concerned with justification—with the question of "Has my faith really saved me?" Given the Reformed definition of faith above, it can be seen that the nature of saving faith is objective and outward-oriented. It is not one's faith per se that saves, but Christ upon whom this faith rests.
So then, is assurance of salvation grounded on faith itself or on the fruits of faith (obedience and good works)? I will let John Calvin give the answer:
Now if we ask in what way the conscience can be made quiet before God, we shall find the only way to be that unmerited righteousness be conferred upon us as a gift of God. Let us ever bear in mind Solomon's question: "Who will say, 'I have made my heart clean; I am pure from my sin'?" [Prov. 20:9]. Surely there is no one who is not sunken in infinite filth! Let even the most perfect man descend into his conscience and call his deeds to account, what then will be the outcome for him? Will he sweetly rest as if all things were well composed between him and God and not, rather, be torn by dire torments, since if he judged by works, he will feel grounds for condemnation within himself? The conscience, if it looks to God, must either have sure peace with his judgment or be besieged by the terrors of hell. Therefore we profit nothing in discussing righteousness unless we establish a righteousness so steadfast that it can support our soul in the judgment of God....For no one can ever confidently trust in it [one's obedience—M.H.] because no one will ever come to be really convinced in his own mind that he has satisfied the law, as surely no one ever fully satisfied it through works....First, then, doubt would enter the minds of all men, and at length despair, while each one reckoned for himself how great a weight of debt still pressed upon him, and how far away he was from the condition laid down for him. See faith already oppressed and extinguished!...Therefore, on this point [assurance—M.H.] we must establish, and as it were, deeply fix all our hope, paying no regard to our works, to seek any help from them...For, as regards justification, faith is something merely passive, bringing nothing of ours [not even repentance and a determination of the will to obey—M.H.] to the recovering of God's favor but receiving from Christ that which we lack (Institutes, 3.13.3—5, cited in Michael Horton, Christ the Lord, p. 52—53).