Let's imagine that cipher (say AES256 in CBC mode) is initialized when application starts:
C = cipher.Create K = kdf(password, iterations, salt) C.Initialize(K, iv) burn(K)
At this point I have initialized cipher C. Key K is burned. Cipher C will be used to encrypt/decrypt data on demand (data source is encrypted file).
If I plan to keep instance of initialized cipher C in memory for lifetime of my running application, can I assume the key material from inside initialized cipher can be captured (memory dump etc) and re-used by attacker? Or in other words, is keeping initialized cipher in memory basically equal to keeping key in memory? If so, what can be done to avoid this kind of leak?