gpg with --clearsign damaged files

59 Views Asked by At

I'm having some problems unpacking the tgz archive because gnupg with --clearsign corrupted my file and the checksum is now incorrect. I found similar topics, but without any answers to them. On the gnugpg website it is also written about this, but without an answer to what to do with it. Thank you for your time, have a nice day!

You can get the same situation if you do:

sudo dd if=/dev/random of=test.bin bs=1 count=1M
md5sum test.bin > test.md5
gpg --output test.sig --clearsign test.bin
mv test.bin test.bin.old
gpg --output test.bin --decrypt test.sig
md5sum -c test.md5

I tried comparing files using cmp, looking for similar topics, even downloading the source code to find the source of the problem, but due to problems with the keys, it didn't work out, no answers. I assume that the problem is in the CRLF, but I don't know how to solve it, nothing works, gzip says that the archive is damaged, and tar that an unexpected EOF occurs, please help!

1

There are 1 best solutions below

0
Timothy Legge On

If you are attempting to encrypt and sign the following works:

sudo dd if=/dev/random of=test.bin bs=1 count=1M
md5sum test.bin > test.md5
gpg --encrypt --output test.sig --sign --armor -r [email of key]
test.bin
mv test.bin test.bin.old
gpg --decrypt test.sig > test.bin
md5sum -c test.md5