1. A method for performing a storage operation in a pipeline storage system in which one or more data streams containing data to be stored are written into data chunks, the method comprising: when encryption is requested for the storage operation, generating an encryption key associated with a first archive file to be stored; when a data stream containing the archive file is processed in the pipeline storage system, encrypting the archive data from the data stream using the encryption key to create an encrypted data chunk; storing the encrypted data chunk on a storage medium; and storing the encryption key in a manner accessible during a restore operation of the encrypted data chunk.