In Romans 4:5 it says that the elect do not work, they have faith in God Who justifies the ungodly(which all people are by nature, including the elect before God regenerates them). Upon regeneration, the elect are given faith and repentance by God(Ephesians 2:8, Acts 11:18) and they believe in God Who justifies the ungodly. Thus, faith is not a work of man, it is a gift which God gives based on the perfect righteousness of His Son, a righteousness which He imputes to the elect, so that they stand legally justified before God. No man can stand legally justified before God based on anything he does. The only standard for legal justification is the righteousness of Christ imputed to a person, for there is nothing a person can do, no act he can perform, no mental assent he can make, to acquire such a perfect righteousness. Legal justification is only acquired by the imputation of Christ's righteousness to an ungodly person, such as the elect are prior to God regenerating them.