A Comprehensive Analysis of The Environmental Impact On Ropufs Employed In Hardware Security, And Techniques For Trojan Detection