When binary encoding is specified, the channels between Tcl and gpg are fconfigured with "-encoding binary".  However, this means that new-line translation still takes place and so binary data containing 0x0d bytes will be corrupted. For binary data, the channels should be fconfigured with "-translation binary".

J.