restored 512kB buffer (was smaller to test for small resource decryption)