<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>TommyBlue.it &#187; gpg</title>
	<atom:link href="http://www.tommyblue.it/tag/gpg/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tommyblue.it</link>
	<description>Bombardare per la pace è un po' come trombare per la verginità...</description>
	<lastBuildDate>Sun, 13 Jun 2010 23:43:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Mettiamo il lucchetto alle email: gestione delle chiavi GPG da riga di comando</title>
		<link>http://www.tommyblue.it/2009/10/15/mettiamo-il-lucchetto-alle-email-gestione-delle-chiavi-gpg-da-riga-di-comando/</link>
		<comments>http://www.tommyblue.it/2009/10/15/mettiamo-il-lucchetto-alle-email-gestione-delle-chiavi-gpg-da-riga-di-comando/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 17:25:41 +0000</pubDate>
		<dc:creator>TommyBlue</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[Memoria usiliaria]]></category>
		<category><![CDATA[Sicurezza]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[gpg]]></category>
		<category><![CDATA[wot]]></category>

		<guid isPermaLink="false">http://www.tommyblue.it/?p=650</guid>
		<description><![CDATA[Onestamente GPG non mi è mai rimasto troppo simpatico, ma come tutte le cose che non mi rimangono troppo simpatiche probabilmente è perchè non l&#8217;ho mai studiato per bene. Nella mia svogliatezza avevo trovato in Thawte un ottimo compagno che con la sua email certificata X.509 faceva di me un accanito utilizzatore di posta certificata [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.tommyblue.it/wp-content/uploads/2009/10/lock.jpg" rel="lightbox[650]"><img class="alignleft size-full wp-image-651" title="lock" src="http://www.tommyblue.it/wp-content/uploads/2009/10/lock.jpg" alt="lock" width="200" height="217" /></a>Onestamente <a href="http://www.gnupg.org/" target="_blank">GPG</a> non mi è mai rimasto troppo simpatico, ma come tutte le cose che non mi rimangono troppo simpatiche probabilmente è perchè non l&#8217;ho mai studiato per bene. Nella mia svogliatezza avevo trovato in Thawte un ottimo compagno che con la sua email certificata X.509 faceva di me un accanito utilizzatore di posta certificata (da non sbagliare con la PEC &#8220;de noattri&#8221;).</p>
<p>Adesso <a href="https://search.thawte.com/support/ssl-digital-certificates/index?page=content&amp;id=AD196&amp;actp=LIST&amp;viewlocale=en_US" target="_blank">scopro</a> però che dal 16 novembre 2009 Thawte non supporterà più la certificazione delle email. Damn!</p>
<p>Nel cercare quindi una valida alternativa (ci sarebbe anche <a href="http://www.cacert.org/" target="_blank">CAcert</a> ma non mi convince troppo, probabilmente per i soliti motivi) torno con la coda tra le gambe da mamma <a href="http://www.gnu.org/" target="_blank">GNU</a> col suo GPG.<br />
Stavolta però faccio le cose sul serio e, complici Enigmail per Thunderbird 3beta che non funziona un gran che e l&#8217;influenza che mi lascia un po&#8217; di tempo per cazzeggiare, ho aperto il manuale di GPG e genererò le mie chiavi manualmente, prendendo appunti in questo articolo.</p>
<p>Let&#8217;s go&#8230;</p>
<p><span id="more-650"></span>Di guide ce ne sono un sacco, io ho usato <a href="http://www.gnupg.org/gph/en/manual/book1.html" target="_blank">questa</a> anche se è basata su GPG versione 0.9.4 e io invece uso la 2.0.12</p>
<p>Il primo passo è quello di creare una nuova coppia di chiave (pubblica/privata) con gpg &#8211;gen-key:</p>
<pre>~$ gpg --gen-key
gpg (GnuPG/MacGPG2) 2.0.12; Copyright (C) 2009 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
[...]</pre>
<p>Nel generare le chiavi ho utilizzato l&#8217;algoritmo RSA (non presente nella versione 0.9.4) di 4096 bit e ho impostato 1 anno come durata. Subito dopo aver generato le chiavi è bene anche generare un certificato di revoca. Questo è importante, infatti se si perdesse la chiave privata (o venisse compromessa) il certificato di revoca è l&#8217;unica cosa che ci permette di far sapere agli altri che non devono usare la chiave pubblica associata alla chiave compromessa.</p>
<p>Al termine della generazione della coppia di chiavi ci è stato restituito un messaggio del genere:</p>
<pre>sub   4096R/6C04473B 2009-10-15 [expires: 2010-10-15]</pre>
<p>il numero 6C04473B è l&#8217;ID della nostra chiave, che useremo per generare il certificato di revoca. Lo stesso ID lo si può trovare guardando le chiavi installate nel sistema con <strong>gpg &#8211;list-keys</strong>.<br />
Creiamo quindi la revoca:</p>
<pre>gpg --output revoke.asc --gen-revoke 6C04473B</pre>
<p>Il file <strong>revoke.asc</strong> contiene il certificato di revoca e va tenuto con molta attenzione, pena la non possibilità di annullare una chiave e confessare con imbarazzo a chi continua a scrivervi email cifrate con la vecchia chiave che non potete leggerle, ovvero che siete un coglione! parlo per esperienza&#8230;. :(</p>
<p>Bisogna adesso esportare la chiave pubblica. Si può farlo in due formati: binario e ASCII. Nell&#8217;ordine:</p>
<pre>gpg --output pub.gpg --export indirizzo_email
gpg --armor --export indirizzo_email &gt; pub_ascii.gpg</pre>
<p>La chiave pubblica in formato ASCII può essere più facilmente pubblicata sul web o inviata per email.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Condividi questo post:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F10%2F15%2Fmettiamo-il-lucchetto-alle-email-gestione-delle-chiavi-gpg-da-riga-di-comando%2F&amp;title=Mettiamo%20il%20lucchetto%20alle%20email%3A%20gestione%20delle%20chiavi%20GPG%20da%20riga%20di%20comando&amp;bodytext=Onestamente%20GPG%20non%20mi%20%C3%A8%20mai%20rimasto%20troppo%20simpatico%2C%20ma%20come%20tutte%20le%20cose%20che%20non%20mi%20rimangono%20troppo%20simpatiche%20probabilmente%20%C3%A8%20perch%C3%A8%20non%20l%27ho%20mai%20studiato%20per%20bene.%20Nella%20mia%20svogliatezza%20avevo%20trovato%20in%20Thawte%20un%20ottimo%20compagno%20che%20con%20la" title="Digg"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F10%2F15%2Fmettiamo-il-lucchetto-alle-email-gestione-delle-chiavi-gpg-da-riga-di-comando%2F&amp;title=Mettiamo%20il%20lucchetto%20alle%20email%3A%20gestione%20delle%20chiavi%20GPG%20da%20riga%20di%20comando&amp;notes=Onestamente%20GPG%20non%20mi%20%C3%A8%20mai%20rimasto%20troppo%20simpatico%2C%20ma%20come%20tutte%20le%20cose%20che%20non%20mi%20rimangono%20troppo%20simpatiche%20probabilmente%20%C3%A8%20perch%C3%A8%20non%20l%27ho%20mai%20studiato%20per%20bene.%20Nella%20mia%20svogliatezza%20avevo%20trovato%20in%20Thawte%20un%20ottimo%20compagno%20che%20con%20la" title="del.icio.us"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F10%2F15%2Fmettiamo-il-lucchetto-alle-email-gestione-delle-chiavi-gpg-da-riga-di-comando%2F&amp;t=Mettiamo%20il%20lucchetto%20alle%20email%3A%20gestione%20delle%20chiavi%20GPG%20da%20riga%20di%20comando" title="Facebook"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F10%2F15%2Fmettiamo-il-lucchetto-alle-email-gestione-delle-chiavi-gpg-da-riga-di-comando%2F&amp;title=Mettiamo%20il%20lucchetto%20alle%20email%3A%20gestione%20delle%20chiavi%20GPG%20da%20riga%20di%20comando&amp;annotation=Onestamente%20GPG%20non%20mi%20%C3%A8%20mai%20rimasto%20troppo%20simpatico%2C%20ma%20come%20tutte%20le%20cose%20che%20non%20mi%20rimangono%20troppo%20simpatiche%20probabilmente%20%C3%A8%20perch%C3%A8%20non%20l%27ho%20mai%20studiato%20per%20bene.%20Nella%20mia%20svogliatezza%20avevo%20trovato%20in%20Thawte%20un%20ottimo%20compagno%20che%20con%20la" title="Google Bookmarks"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F10%2F15%2Fmettiamo-il-lucchetto-alle-email-gestione-delle-chiavi-gpg-da-riga-di-comando%2F" title="Identi.ca"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F10%2F15%2Fmettiamo-il-lucchetto-alle-email-gestione-delle-chiavi-gpg-da-riga-di-comando%2F&amp;title=Mettiamo%20il%20lucchetto%20alle%20email%3A%20gestione%20delle%20chiavi%20GPG%20da%20riga%20di%20comando&amp;source=TommyBlue.it+Bombardare+per+la+pace+%C3%A8+un+po%27+come+trombare+per+la+verginit%C3%A0...&amp;summary=Onestamente%20GPG%20non%20mi%20%C3%A8%20mai%20rimasto%20troppo%20simpatico%2C%20ma%20come%20tutte%20le%20cose%20che%20non%20mi%20rimangono%20troppo%20simpatiche%20probabilmente%20%C3%A8%20perch%C3%A8%20non%20l%27ho%20mai%20studiato%20per%20bene.%20Nella%20mia%20svogliatezza%20avevo%20trovato%20in%20Thawte%20un%20ottimo%20compagno%20che%20con%20la" title="LinkedIn"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F10%2F15%2Fmettiamo-il-lucchetto-alle-email-gestione-delle-chiavi-gpg-da-riga-di-comando%2F&amp;title=Mettiamo%20il%20lucchetto%20alle%20email%3A%20gestione%20delle%20chiavi%20GPG%20da%20riga%20di%20comando" title="Reddit"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://twitter.com/home?status=Mettiamo%20il%20lucchetto%20alle%20email%3A%20gestione%20delle%20chiavi%20GPG%20da%20riga%20di%20comando%20-%20http%3A%2F%2Fwww.tommyblue.it%2F2009%2F10%2F15%2Fmettiamo-il-lucchetto-alle-email-gestione-delle-chiavi-gpg-da-riga-di-comando%2F" title="Twitter"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://ping.fm/ref/?link=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F10%2F15%2Fmettiamo-il-lucchetto-alle-email-gestione-delle-chiavi-gpg-da-riga-di-comando%2F&amp;title=Mettiamo%20il%20lucchetto%20alle%20email%3A%20gestione%20delle%20chiavi%20GPG%20da%20riga%20di%20comando&amp;body=Onestamente%20GPG%20non%20mi%20%C3%A8%20mai%20rimasto%20troppo%20simpatico%2C%20ma%20come%20tutte%20le%20cose%20che%20non%20mi%20rimangono%20troppo%20simpatiche%20probabilmente%20%C3%A8%20perch%C3%A8%20non%20l%27ho%20mai%20studiato%20per%20bene.%20Nella%20mia%20svogliatezza%20avevo%20trovato%20in%20Thawte%20un%20ottimo%20compagno%20che%20con%20la" title="Ping.fm"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.tommyblue.it/2009/10/15/mettiamo-il-lucchetto-alle-email-gestione-delle-chiavi-gpg-da-riga-di-comando/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Aggiungere una chiave GPG di un repository</title>
		<link>http://www.tommyblue.it/2009/02/25/aggiungere-una-chiave-gpg-di-un-repository/</link>
		<comments>http://www.tommyblue.it/2009/02/25/aggiungere-una-chiave-gpg-di-un-repository/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 00:33:40 +0000</pubDate>
		<dc:creator>TommyBlue</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[Informatica]]></category>
		<category><![CDATA[Memoria usiliaria]]></category>
		<category><![CDATA[Software Libero]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[gpg]]></category>
		<category><![CDATA[repository]]></category>

		<guid isPermaLink="false">http://www.tommyblue.it/?p=344</guid>
		<description><![CDATA[I comandi son solo due, ma me li dimentico sempre :D gpg --keyserver subkeys.pgp.net --recv CHIAVE gpg --export --armorCHIAVE &#124; sudo apt-key add - Et Volià&#8230; Condividi questo post:]]></description>
			<content:encoded><![CDATA[<p>I comandi son solo due, ma me li dimentico sempre :D</p>
<p><code>gpg --keyserver subkeys.pgp.net --recv CHIAVE<br />
gpg --export --armorCHIAVE | sudo apt-key add -</code></p>
<p>Et Volià&#8230;</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Condividi questo post:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F02%2F25%2Faggiungere-una-chiave-gpg-di-un-repository%2F&amp;title=Aggiungere%20una%20chiave%20GPG%20di%20un%20repository&amp;bodytext=I%20comandi%20son%20solo%20due%2C%20ma%20me%20li%20dimentico%20sempre%20%3AD%0D%0A%0D%0Agpg%20--keyserver%20subkeys.pgp.net%20--recv%20CHIAVE%0D%0Agpg%20--export%20--armorCHIAVE%20%7C%20sudo%20apt-key%20add%20-%0D%0A%0D%0AEt%20Voli%C3%A0..." title="Digg"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F02%2F25%2Faggiungere-una-chiave-gpg-di-un-repository%2F&amp;title=Aggiungere%20una%20chiave%20GPG%20di%20un%20repository&amp;notes=I%20comandi%20son%20solo%20due%2C%20ma%20me%20li%20dimentico%20sempre%20%3AD%0D%0A%0D%0Agpg%20--keyserver%20subkeys.pgp.net%20--recv%20CHIAVE%0D%0Agpg%20--export%20--armorCHIAVE%20%7C%20sudo%20apt-key%20add%20-%0D%0A%0D%0AEt%20Voli%C3%A0..." title="del.icio.us"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F02%2F25%2Faggiungere-una-chiave-gpg-di-un-repository%2F&amp;t=Aggiungere%20una%20chiave%20GPG%20di%20un%20repository" title="Facebook"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F02%2F25%2Faggiungere-una-chiave-gpg-di-un-repository%2F&amp;title=Aggiungere%20una%20chiave%20GPG%20di%20un%20repository&amp;annotation=I%20comandi%20son%20solo%20due%2C%20ma%20me%20li%20dimentico%20sempre%20%3AD%0D%0A%0D%0Agpg%20--keyserver%20subkeys.pgp.net%20--recv%20CHIAVE%0D%0Agpg%20--export%20--armorCHIAVE%20%7C%20sudo%20apt-key%20add%20-%0D%0A%0D%0AEt%20Voli%C3%A0..." title="Google Bookmarks"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F02%2F25%2Faggiungere-una-chiave-gpg-di-un-repository%2F" title="Identi.ca"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F02%2F25%2Faggiungere-una-chiave-gpg-di-un-repository%2F&amp;title=Aggiungere%20una%20chiave%20GPG%20di%20un%20repository&amp;source=TommyBlue.it+Bombardare+per+la+pace+%C3%A8+un+po%27+come+trombare+per+la+verginit%C3%A0...&amp;summary=I%20comandi%20son%20solo%20due%2C%20ma%20me%20li%20dimentico%20sempre%20%3AD%0D%0A%0D%0Agpg%20--keyserver%20subkeys.pgp.net%20--recv%20CHIAVE%0D%0Agpg%20--export%20--armorCHIAVE%20%7C%20sudo%20apt-key%20add%20-%0D%0A%0D%0AEt%20Voli%C3%A0..." title="LinkedIn"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F02%2F25%2Faggiungere-una-chiave-gpg-di-un-repository%2F&amp;title=Aggiungere%20una%20chiave%20GPG%20di%20un%20repository" title="Reddit"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://twitter.com/home?status=Aggiungere%20una%20chiave%20GPG%20di%20un%20repository%20-%20http%3A%2F%2Fwww.tommyblue.it%2F2009%2F02%2F25%2Faggiungere-una-chiave-gpg-di-un-repository%2F" title="Twitter"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://ping.fm/ref/?link=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F02%2F25%2Faggiungere-una-chiave-gpg-di-un-repository%2F&amp;title=Aggiungere%20una%20chiave%20GPG%20di%20un%20repository&amp;body=I%20comandi%20son%20solo%20due%2C%20ma%20me%20li%20dimentico%20sempre%20%3AD%0D%0A%0D%0Agpg%20--keyserver%20subkeys.pgp.net%20--recv%20CHIAVE%0D%0Agpg%20--export%20--armorCHIAVE%20%7C%20sudo%20apt-key%20add%20-%0D%0A%0D%0AEt%20Voli%C3%A0..." title="Ping.fm"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.tommyblue.it/2009/02/25/aggiungere-una-chiave-gpg-di-un-repository/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
