Hello,
I have an encrypted archive, only part of the archive (first 10MB of the tar.gz) is actually encrypted, since the archive is quite large and asymmetric decription is slow.
On the receiving side I want the download and decryption + inflating to be as quick as possible. That's why I'm using pipes, not download locally and then decrypt and then inflate.
I intend to use tee:
curl
http://server/file | tee >(dd bs=1M count=10 | openssl... | ???) | dd bs=1M skip=10 | ???
-curl downloads the file
-tee splits the stream:
1. first stream acts only on the first 10MB, decrypts using openssl
2. second stream acts only after the first 10MB
??? don't know how to go on from here
Question: how do I join back these pipes in one pipe to input to "tar xzf -"?
Thank you.