Building a trusted environment for security applications