Self-Reinforcing Memoization for Cryptography Calculations in Secure Memory Systems