Refactor memory allocation for the symmetric ciphers context structures.