I read the following question (Shell Script mktemp, what's the best method to create temporary named pipe?) but I'm wondering whether it is preferable to use a temporary named pipe to transfer sensitive data between programs as opposed to an unnamed/anonymous shell pipe?
Specifically I'm interested in whether this type of approach (from http://blog.kdecherf.com/2012/11/06/mount-a-luks-partition-with-a-password-protected-gpg-encrypted-key-using-systemd/) is safe:
# Open the encrypted block device gpg --batch --decrypt $key_file 2>/dev/null | sudo $CRYPTSETUP -d - luksOpen $mount_device $key >& /dev/null || exit 3
In which cases could the Luks Keyfile be hijacked?