Building Secure Resources to Ensure Safe Computations in Distributed and Potentially Corrupted Environments