For cascading encryption (ie. AES-Twofish-Serpent), the most secure implementation is with mutually independent keys. My question is if it is secure to hash the previous key for each layer of encryption. In my case, Serpent will be the innermost cipher and AES the outermost.
password = "my_hopefully_secure_password" masterKey = argon2(password,...) serpentKey = sha3_256(masterKey) twofishKey = sha3_256(serpentKey) aesKey = sha3_256(twofishKey) ciphertext = aes(twofish(serpent(plaintext,serpentKey),twofishKey),aesKey)
In this case, an attacker would have to attack AES first, since it's the outer shell. Suppose that the attacker successfully found the key to AES and decrypted it. Now the attacker is left with Twofish and Serpent, but the AES key doesn't reveal anything because it's a hash of the Twofish key (hashes are one-way). If the attacker broke Twofish, they still wouldn't know Serpent's key because the Twofish key is only a hash of the Serpent key.
Is this secure?
Edit: Is this secure and does it provide 256-bit security? Would this scheme correctly implement cascading encryption and provide three layers of protection?