Duplex stream implementation for Crypto.