file extension confusion: --clearsign makes binary .asc

Hans-Christoph Steiner hans at guardianproject.info
Thu Jul 25 18:32:23 CEST 2013


On 07/25/2013 11:15 AM, Werner Koch wrote:
> On Thu, 25 Jul 2013 17:05, hans at guardianproject.info said:
> 
>> Right, so when you do --clearsign without --armor on a binary file, the
> 
> Clearsign always enables the armor option.  The sole purpose of
> clearsign is to send human readable (aka plain ascii) text using a
> simple ascii encapsulation.  If you don't feed it with ascii (or utf-8)
> you still get the clearsign format.  Actually it is not even possible to
> use clearsign for non-ascii because the specs demand certain
> conversation which are not reversible (line ending, trailing whitespace,
> ^From).

So are you saying that OpenPGP's spec for --clearsign does not allow for
base64-encoded binary data?  If so, I think that running "gpg --clearsign" on
a binary file should give a warning that its not a supported format.

I just tried --clearsign with a PNG on my Linux Mint/Maya machine, and both
gpg 1.4.11 and gpg2 2.0.17.  In both cases, the resulting file was not ASCII,
but the format I described: binary data and ASCII signature.  I attached the
PNG and the resulting file.

$ gpg --clearsign icon.png

You need a passphrase to unlock the secret key for
user: "Hans-Christoph Steiner <hans at at.or.at>"
4096-bit RSA key, ID 374BBE81, created 2009-06-20

$ less icon.png.asc
"icon.png.asc" may be a binary file.  See it anyway?
$ gpg --version
gpg (GnuPG) 1.4.11
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: ~/.gnupg
Supported algorithms:
Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA
Cipher: 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, CAMELLIA128,
        CAMELLIA192, CAMELLIA256
Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
$ rm icon.png.asc
$ gpg2 --clearsign icon.png

You need a passphrase to unlock the secret key for
user: "Hans-Christoph Steiner <hans at at.or.at>"
4096-bit RSA key, ID 374BBE81, created 2009-06-20

$ less icon.png.asc
"icon.png.asc" may be a binary file.  See it anyway?
$ gpg2 --version
gpg (GnuPG) 2.0.17
libgcrypt 1.5.0
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: ~/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA
Cipher: 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, CAMELLIA128,
        CAMELLIA192, CAMELLIA256
Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2



-- 
PGP fingerprint: 5E61 C878 0F86 295C E17D  8677 9F0F E587 374B BE81
-------------- next part --------------
A non-text attachment was scrubbed...
Name: icon.png
Type: image/png
Size: 9413 bytes
Desc: not available
URL: </pipermail/attachments/20130725/5e6f07e7/attachment-0001.png>
-------------- next part --------------
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

?PNG

   
IHDR   H   H   U?G  
=iCCPicc  x?SgTS?=???BK???KoR RB??Ti?? ??@????"?q????"??A??y(??(6T??}??7o????9g??}> F`?D???dJ? <6.
'w
T ??@?-
?? ????? ???m@  n???8?P??
 $
 ????B ? 2r2 2
 ?t? %  [
?j ;e?O v?$? ?(S*@? @&?? ? X??? ?` (??s?? `??? `? ??)d `?
S? ??GE? 3(???x?W\!?S  ?d??Tn!??
\]?x?87C?P?	????ee??? ?3 ?FvD????9;?:;?8?:|????????????? ???E???? ? ??
?e
???/??
 ?B??_??????T?B?fg???k+
m??_???	_????????????

?
?2??r<[&?q??
??.??wL?'??b?P?GK?i
???$
I??H???????k `?~?B[P???. ??%? ?w??? 1??w 0???
h ??
 ??
??? ?4P6h?>??#??;x??P??8X BH?L?C.,?UP%??B?Z??F8-p?????<?^??0
o`
A2?DX?6b??"?#?Ef!~H0??!?H
"E??Rd5R??#U?^?
?
9??E.!=?=?F~C>??@?
j??\?
B???h
??G
?
h%Z?
B?????>G?0??3?l0.??B?x,?c?b????6????b#?{??"??;!?0? $,",'????
Ba???$???nD>1??B?%+?u?c???[????!??\H??8Ri	?????D:C?!????d?6??A%
?
ry;??4?:y???B?P
)??x??R@??
???\?
R?jTS?5?*?.??Qk?m???8M?fN?E??h?h??F?y?C?+:?nDw???%??J?a?Ez?=C?a??1J??~??=?+&?i??b?3?
?z?9?c?;???
_E??B?Z?Y??
U???????|?
??WUG?jfj<5??r?j??jw???Y??????/?i?5?4?4D??4?i?0?1???V?jY?Yl??g??K??????34?5?4?5Oj?r0?????q?pns>L??=E<e???)?????%?*?j???A???N????H??c?????K???T?T??©?S?L????Z?F?.???;????'??wNoD?????E?????`???`??i?g?&?g?x>j?kh?4?k?m8ndn4?????1?k?l???x???$?d?I??}S?)?4?t?i??[3s???f-fC?Z?|?|??L
O?E57-I?\?t???P+'?T?j???????z?u?4?4?i?i5???0l?mrll?l9????-?/?L???6?u?}?w??????0?????7G+G?c????????WLo??r??
?]3?:??B??:?;}rvq?;7:???$??p??esø???DW??'\?9?)????n??~?}h??L????
F
??
???Y??????4?x?x>?2?y?y
z[z?y?~?c?#?9????[?;????v?i?????{?o???????$?L 10(pS?
?
_???v??lvG#(2?*?I?U?<?-
?
?9??
?9?9-???
?(?<lQ??????K#:#Y?
#F???*?z0?b?rn{?jtBt}?????X??e?W?t?$q?????????y~??HpJ(J?=?|~??K
td,8?Pu?`??DbbL????PA?`,???#iT?n>y?????
?r?`?Gry?P?G???T???	OR%y???;?mzh?????LJfb?q??4]??????#???z?-?hT
$??F??g?*?
??Ki?\????S??.7:?h?z?4?k????????]BX"\??p?}???]?,OZ??xE??+???J_?S?}Ay???1??
?
W??	X?P?R$/???}??u?u?u????s???r?}IE??Ra??o
???fbC??2?]I?oo??t?\?<??s???-???-??.?z?bF??m?m?m??????M?o???*??V?Ou??
?w??)?y}????z?Kv?#?swo??????}?}9???F?v~????N?????~???:?]???
,k@?
Ç]?????F??M????pXy??????>t??(?h????8?:V?4/n
mIm?m?k?9>?x{?{?m???D?I?e?h?
OM???=vFvf?l????????????}>???
??uzw???q??%?K?/s/?\q?????u?'???u;w7_u??z??Z[??S?=????{??M??+????=???;	wz??????~???+?R{T?X?q???7?:??????z??A????????q??)?i??`????a??k??=x.{>>R??/;^X???W?_?FcG^?_N?V?J????3^????=~??f?m?;?w?s?w~??08????????A?NdNL????%c3?    cHRM  z%  ??  ??  ??  u0  ?`  :?  o?_?F   bKGD ? ? ?????   	pHYs  
  
 ??  ?IDATx??kl??????
?IY???W?[??f7M???#t???u??-?F?u??"?&???FQ h>?k;1??v?M'????8?eQ?(Q???
9??z??wf8?e?&=??
g????????????}?0
E?\.9?3)??K1??,`?1
!???$??N?S9q?D{dd???????w? O=?I?X?\n??K)???l?r]w?u??8??R (?L
?IE~
?q
?+??I??? ?T*?\.??{??]@???g?oa?<???????l6???????I{????????!2?
?m#???1?8??t:lnn??????2?J%????}??A?pcc??\.z?~? =???q????O?r??v????{???255E.?#I? ?????>Q????,<?#?????d2!h4??????2;;[?V????j??J??v?PP????~?=??????j???X,>===????O
}??gll?8?i6?lnnR??i6???O??q?
??8x?G.??T*1<<????b!KKK???k???+?????^???b??r??	???? 
:t???U?o??????
{??{???????j?h4?j5???????r?1?'&?e?.?B???av??A?\?T*Q,q
??g???K/??_??J???c??1==????o???I677?????????O>9???!?V? X__gyy???U:? ?L?|>O>?'??b?6 Q??>?v?QA?P`?]LNNR.??d2?J%???????^??y???g?????Z???T,i6??}??????????W???{7}?YZZb~~?F???y???199?????ø?????&j??J?
.P???r??}??????>????7<???_??OW*????dL7u~???q
|???????#??3??GFFX__Gk????>}?3g?`?azz?Çs??a&''???????}fff8y?$?N???s????$	ccc?}??LMMQ,?Z???AO
??|?g?}<???????T*sO=???????#
*
?{?,..
????????;\?ess?Ð??.\???
;8p? ???GJ??'????Z?6?(:k???
@!??)!?A???????|?A??n??&???????l6?w/
????(???|????W??T*????t?
8p?v???O}?S?????}???lll`?6I?p??I.^?????
brr???Y^~?e???t2I?i????j?z??w7?
9????o#?@k?c?=f????y????q
?

????}N???1?????YYYa???? c
;w???c|?;????G?T*?..,,??y?P?=??#???x?????SO=????i??????z!??~??^?????O~????~vv??V????????v??????_]]5???J????o1????y?v?P87;;?????s?{???r??????f?(??p???P*?0??n?????M/,,?'N??????????t?? FGG?r??|??v/^???)%???,--155????)?????4?=??????"?V?\?*3????)?J?Z?????????{????L<??H)????<?L?$I?}???O???
?????
?????Ç???,<??C????xo??"?"
??g????LMM111??~?#????????????????????L?$?q?????????7==?????DQD??a}}?R???8A??8????;'??????>?O?>}? =??3?j5
?????g???={???u<?#
C?????	???9z?(?>??_???[?8N?f??N?????r?:;;?z???k???]CCC??m????B????f?I7???h4~Z,/
?~???)????^???
<??T*H)I??J????*?\???a? ??_|????????????1???>|?????/???R.???l???????&Ij?=?????'??,_??o?z??]??LOOJkM??DA?^gaa?$Ip]?r??k???9v??=???VWWo	??
?????3g~??o??S?N?
;v`?6A???@??BJ?S
??V???|?????????s?R? iY??r-?"????>o???O?
=?'N??^??R@???'??I???_?~??_{??o??????0
{?
)?^?s?}?K_b?]?????YYYA???$I??|>?3g????????;???rx???O??z??T?U2?
 aR?Th6? T*r??1?F??????mnn??}?1????I??B)E?Z??j??t3???O????u?z????_??_dff?sss
???z?Z?????u?0$I??z??-????
;???U?T?
?^Q???j5N?:utnnn%I???7?????:u?T(??
?
?v?M?Z%?????w??)`?P?Z%I?|?V?x?"J)??N?G)??g9s???_??Wt????0h???????C???j?C?^?????]?'?????f?(?2???M&&&h6??Tb?????????/???233s???m?|?I???2>>N?\?Y??E?j?F??WJ?=K????("I?j??v??n?jA?sss?^????v???E?
=J?V??????kH??\??]?$????5?X?-?1q
Q?_7??l6??? 
C?g7;??:??S??????E
????^??z??????F)??`o(??t:A????#I?R??????dq
EJ???u%?=PZ?m?=@an3?;5z?VJ?[?????\??PoB=6?;	hp^?^??\oT?7?w?.?????)?7?A???a@????\?[	??y? ??!????1h???????
??????]1Y???c0???}??G?z?????#?Kr?\???X?Q at q?Hyt???c??_}c?\?f$!???~??Em??g??y??l?"?+}$y???R?
?B?@.?#[?b[F??!r?
?k???}???eu6? ?G
7???ep?R???E??'2v?[??u??4??)KJ?X#
??D'DID?Q at a?P?rum??In
?\?z?~?\?>??5G?v0?q3???k???K
??,???s?`?Y3??RZ?0Y??c?????????Q?*?)??E??u<vOO`0I@?"!?@jp?E?xh?'?qkB?????
???>
?@?
?d?????c9e?[???_??CL???T?????(s??+
??'P?B?Z
???U???X??*"61J+?Qh?0??ip\?\?	
?Do?P?B"?DK?HE?];??s??>?)(????$F???(?VZp?~?? ?? ?$Rb+F?UW?2I
???NP??`?<?A$??+HHdWAqsq????????l?[t???h??h?V?\}u?" _u?U),?V?X?$:?
&&??X??G??.
}?z???fFO1 J+?0??SY?p??H-?AFc?ml??2,3??N4?t

Ø+C?2??????"P9"
??aD???#"V1?I?!?
??z%@??ED?j???0
?t:4[M?:??&?N_u???$V?BH
4a0?^??1??&??g?>v
????^?1@??M;nc	??N
9?q*?z???=Ui?????Y??M!?qD??A?????i?m:A? N???
?-??Dx[?)`Fw?'?h1???X??1??? ?g????TP?N?????tH?m
???E??{?A?>
?????>A?a??G!Q
'I??4#
B??B
?'?B /???B1? !?Pt?"?????
??h?>B??H;n#o?;I?N??
UH?#??[???5?v?Em?Fm??f}?v?E?$*NCN?TIR? d???t=F?= ?
H????Pa@???? ?p??w?5;3;?S?do?#?Uj?j??nJA??C;i?H? ??
a???#??'>V.??t??U??G
??? 
?p?+V7]?????_O?!?a???.?????{8<???I:I?@???:???*???U?N??
??	T@?#,au??????w??q%?????Y?
?v?f"U????o??N?=cS
???]?	<?#T??uH??v>
)nPK7	? ?j??b[6?????X|?P???V???=@????-C???2N??	??)w?Z.?
??K?opj?}f??-?x??r?????0$?DN@?????Dl66y?WX?<????:?[p?????F0????+?kl??v???E?|?0Hi?[?[???sGY^;????ytZ???W??vB?	?t[\[?3oS?V?22???t
?? ?Y?J@???Pi??Q??K??A??q??$hs?z???E?l???+z????J???8]?nP'!?(?\LP
X????e?L?t$:JUc????z??r9?X??pl?|1?py??H'?`?!$ VK?X??o??
VW??u?d??mD(??WD?????V?]P?I??V?hW;dv?H!?!?/???h???00f???o	)p
?\>Gq?@~8????R??%?T?????&?z
%????B`?abd7?R???R??'7(j'$????&?$d?2?	(???.?>?^??J???'d?d?Y??,?R??"=?????`"??4??4"?z@?
H?B???
????)?]??]c{X?,?IG?t?4??Q at +oV??h????h??`z???_?z?1?$???]O?#??
Fi?2?H?b??5Fk??-?2??Ie?h?es?=?=~??j$I?t??<	?Z?7??[iZo??????x??0
?h?}???&?i?I[???,?w?:??????1?{??]$&&T??H"?
5*T?T??/??
FvW?K??
?
YHq????/?Qc
???0?S?9B"t?~Lbt??BE??d}	?H??!??o?%??F????B??~
?l??Q?cy??	T Bt?????"????y???m??@?l????rv~?I?$??2?s???,???tp?b?-?UL'?H?c??5W?E???+?
I??p?????S?e[?9???a?&tD?$???K?D(?*(??$}????7h+???%?
???~?j??o???1!?m??e?
e?J
"cHdB?w?K??5o!R??*??Xdn??18??f??[^?@i?-??+??????d
???\29????,pA??P?eZ?[ ?b?!???D!}!??#???UC??????Rz at EW?ö]??Z??n?X??]??36?g#]?A
?21?1qoWc
?1?$RD?p3$n%?'??"?7%1:?[?6W?|??2?[??f-??n?|?z?L?Y?E????8X???Xi3M??F?A?t?HE??1piG????X??*-?[1??0?`9??]erwe?T?? Ib??M?:w?o?{
1)??^???e??b??Zt?????$?H'm?	??w??{?MR :?$?JW?D???iK??z?????
Q
"???
c??N4?o7?A??t?1Bn-????\Ka*@?I??hT???l?f???o?w??^??Y?6?????VQ?A?R ??X
+t??[?s?yPiOa??V+C+??,?'v?}e?r?l0Wl??7%5X?EqG??,??	??H?*?H???l??BJ{
4?.k?e9y????????
(I??~H
??????vlrC9r#???N???7?HaI??????rV_??tY??4????G??[=@?R?W?m ?uo?c?RJr?,??v?
?-?:?o??????????[Jc?Fk?@?Qs5??!???????`???A*??????r!!???vm?????3?2$:?v??T?N$??~??????U???7?sLt?\?
>?`yE?E??e^'????'x??? ?ZV7?\???A?DX??$*!??~rw?:?
??
?c?:c9?G?H(?\jW$]?1??
m???o?R??\?????T ??R??@H??]???"?Q??6[2Dr?w???1i??6F'?sKNA?~?{u??v?h??;?,O~L? $???<?+?????? ???v?? ?
??3????v??@.???M?2?1??w]???J
?????????.)?*??`???4N?&n'[?
 	d?C???Y¢$?F?
?.???p?r?Qo?
??

i	?8? ?Df0?oq????{9????#?w]X??^???4?u?7U?WT1??B
?U?^?
?b???}????J?;????$??????????	?;9IZ
9]0? ??FR???????N?G?w;??RnR??CR??
8?M=??U?   %tEXtdate:create 2013-05-08T16:45:24-04:00??13   %tEXtdate:modify 2013-05-08T16:42:15-04:001???    IEND?B`?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJR8VEaAAoJEJ8P5Yc3S76BF8kP/297F23iLN/Kc5/LbcBjP229
EsjYFUI4PiFu7Ny3bWLsOmU3HrKrWvBhUoVut9i8vBO3kBTnnRjE0AbkFc2sBY4i
TTPaHvraPBvJm5weELCsDZFhqm/I/vPd79sGi62m34r1LJyE2rox2Lav9GUZuwnb
74htFjWi57fe0KmkU4phwfR1REf7VZciW04ZfQx2bftxkh1Io3KZWwm9oK77jtlb
5CTNEOnuYp/Fgj1Qp+BEN9Iss2tFlLnlAU5SN8FdyY5lWfGVVikO9CrBZmLHi0Qh
EUvNLONth8nlDOVB8c8owts/g+4AlqSqO6BznrTeDPvz5usBofDh30RAd3+iaBeT
lDZELw3IZgxMuI7jCuSxHRjuIWYZMmi+FeE4uWAiRX7xYjHS8QIBA8YYyY+p2GB2
xNX7bCcUR4CrVsh84woHxsUhBrvaOhfqhO0wDEffTzBHPu9oCQ9OTnt6i1P43cN5
N8wnDkqadv+zsHCvLM1uIM9BqKAcsB1SyM1Nc+G7LEx4Wyy30LJIJInHkddDSkPz
u0NRpDBYDY4EJlt+c4pqjE9pSlT6Kgw14KGLYkEo/zHs4Pn+Cm2VlESHoYtV4R71
13MuELQ09dzozOknQyKPjgtBbXftRK2+p1NILpl2EsZtd+psCoGysBl1bQTlLg3i
pUTa14f++PzzoZJ246av
=1yW+
-----END PGP SIGNATURE-----


More information about the Gnupg-devel mailing list