{"id":659,"date":"2015-09-18T15:21:11","date_gmt":"2015-09-18T13:21:11","guid":{"rendered":"http:\/\/monodes.com\/predaelli\/?p=659"},"modified":"2015-09-18T15:21:11","modified_gmt":"2015-09-18T13:21:11","slug":"moving-a-gpg-key-privately-short-circuit-synapse","status":"publish","type":"post","link":"https:\/\/monodes.com\/predaelli\/2015\/09\/18\/moving-a-gpg-key-privately-short-circuit-synapse\/","title":{"rendered":"Moving a GPG Key (Privately) | Short-Circuit Synapse"},"content":{"rendered":"<p>Sometimes I have to move my GnuPG key between computers for some reason, and although GnuPG does have features to export your private key, they are not as well documented, probably out of choice to discourage their use, as they can be a security issue. I have developed the following method to export <em>both<\/em> the public and private keys together, so that they can be easily imported, and with the minimum of secret data written to disk.<\/p>\n<ol>\n<li>Find out the keyid of the key you wish to export. You can get this from the output of\n<pre><code class=\"\" data-line=\"\">gpg -K<\/code><\/pre>\n<p><code class=\"\" data-line=\"\"> <\/code>Note that the capital K is important so that it lists secret rather than public keys.<\/li>\n<li>First, export the public key. This is of course public info, so no worries about security here\n<pre><code class=\"\" data-line=\"\">gpg --output pubkey.gpg --export {KEYID}<\/code><\/pre>\n<p><code class=\"\" data-line=\"\"> <\/code><\/li>\n<li>Now, in one fluid step, we will export the secret key, combine it into one file with the public key, and then encrypt it for transfer\n<pre><code class=\"\" data-line=\"\">gpg --output - --export-secret-key {KEYID} |\\\n cat pubkey.gpg - |\\\n gpg --armor --output keys.asc --symmetric --cipher-algo AES256<\/code><\/pre>\n<p><code class=\"\" data-line=\"\"> <\/code><\/p>\n<p>You will be prompted for a passphrase during this, this is the passphrase just for this temporary encryption for transfer. So use a good passphrase for security, and <strong>remember that passphrase!<\/strong><\/p>\n<\/li>\n<li>Now, transfer the keys.asc file to the new computer or wherever. Because it\u2019s encrypted you could technically do this over the internet and it <em>should<\/em> still be secure, but I would suggest not using the internet for added security. When I last did this I just used a normal flash drive.<\/li>\n<li>On the new computer, we need to import the keys from the file. So, run this command to unpack and then import the keys (using pipes again)\n<pre><code class=\"\" data-line=\"\">gpg --no-use-agent --output - keys.asc | gpg --import<\/code><\/pre>\n<p><code class=\"\" data-line=\"\"> <\/code><\/li>\n<li>And that, should be, that.<\/li>\n<\/ol>\n<p>Sorgente: <em><a href=\"https:\/\/montemazuma.wordpress.com\/2010\/03\/01\/moving-a-gpg-key-privately\/\">Moving a GPG Key (Privately) | Short-Circuit Synapse<\/a><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">Sometimes I have to move my GnuPG key between computers for some reason, and although GnuPG does have features to export your private key, they are not as well documented, probably out of choice to discourage their use, as they can be a security issue. I have developed the following method to export both the&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/monodes.com\/predaelli\/2015\/09\/18\/moving-a-gpg-key-privately-short-circuit-synapse\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-659","post","type-post","status-publish","format-standard","hentry","category-senza-categoria"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6daft-aD","jetpack-related-posts":[{"id":7730,"url":"https:\/\/monodes.com\/predaelli\/2020\/11\/05\/7730\/","url_meta":{"origin":659,"position":0},"title":"View this gist on GitHub\u2026","author":"Paolo Redaelli","date":"2020-11-05","format":false,"excerpt":"View this gist on GitHub Nel caso vada fuori linea vedi pagina 2 Signing VirtualBox Kernel Modules These are the steps I followed enable VirtualBox on my laptop without disabling UEFI Secure Boot. They're nearly identical to the process described on \u00d8yvind Stegard's blog, save for a few key details.\u2026","rel":"","context":"In &quot;Documentations&quot;","block_context":{"text":"Documentations","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/"},"img":{"alt_text":"sparkles","src":"https:\/\/i0.wp.com\/github.githubassets.com\/images\/icons\/emoji\/unicode\/2728.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":6956,"url":"https:\/\/monodes.com\/predaelli\/2020\/03\/27\/how-to-import-export-wordpress-theme-customizer-settings\/","url_meta":{"origin":659,"position":1},"title":"How to Import \/ Export WordPress Theme Customizer Settings","author":"Paolo Redaelli","date":"2020-03-27","format":"link","excerpt":"How to Import \/ Export WordPress Theme Customizer Settings Want to export \/ import WordPress theme customizer settings? Here's a step by step guide on how to import \/ export theme customizer settings in WordPress. Basically, use Customize Export\/Import plugin on both instances of WordPress!","rel":"","context":"In &quot;Basilica's website&quot;","block_context":{"text":"Basilica's website","link":"https:\/\/monodes.com\/predaelli\/category\/basilicas-website\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":239,"url":"https:\/\/monodes.com\/predaelli\/2015\/06\/06\/autodifesa-email-una-guida-per-combattere-la-sorveglianza-di-massa-con-la-criptazione-di-gnupg\/","url_meta":{"origin":659,"position":2},"title":"Autodifesa Email &#8211; una guida per combattere la sorveglianza di massa con la criptazione di GnuPG","author":"Paolo Redaelli","date":"2015-06-06","format":false,"excerpt":"La sorveglianza di massa viola i nostri diritti fondamentali e mette a rischio la libert\u00e0 di parola. Questa guida ha l'obbiettivo di insegnarti una tecnica di autodifesa contro la sorveglianza: la criptazione delle mail. Una volta finito, sarai in grado di inviare e ricevere email cifrate e quindi potrai avere\u2026","rel":"","context":"In &quot;Software Libero&quot;","block_context":{"text":"Software Libero","link":"https:\/\/monodes.com\/predaelli\/category\/software\/software-libero\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2486,"url":"https:\/\/monodes.com\/predaelli\/2017\/05\/19\/solved-pdf-export-on-linux-53-times-bigger-than-on-windows-qcad-org-forum\/","url_meta":{"origin":659,"position":3},"title":"(solved) PDF export on linux 53 times bigger than on Windows &#8211; QCAD.org Forum","author":"Paolo Redaelli","date":"2017-05-19","format":false,"excerpt":"(solved) PDF export on linux 53 times bigger than on Windows - QCAD.org Forum Briefly: hatches are bad. Remove them and your PDF will shrink \u00a0","rel":"","context":"In &quot;Senza categoria&quot;","block_context":{"text":"Senza categoria","link":"https:\/\/monodes.com\/predaelli\/category\/senza-categoria\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10758,"url":"https:\/\/monodes.com\/predaelli\/2023\/09\/01\/using-csv-file-as-data-storage-and-access\/","url_meta":{"origin":659,"position":4},"title":"Using CSV File as data storage and access","author":"Paolo Redaelli","date":"2023-09-01","format":false,"excerpt":"Thanks adamchainz! You can use \u201cCSV\u201d table storage in (at least) these database backends: SQLite: https:\/\/www.sqlite.org\/csv.html 42 MySQL\/MariaDB via the \u201cCSV\u201d storage engine: https:\/\/dev.mysql.com\/doc\/refman\/8.0\/en\/csv-storage-engine.html 15 . Or MariaDB via the CONNECT storage engine: https:\/\/mariadb.com\/kb\/en\/connect\/ 1 However these will be slow though. Changes to CSV based tables require a lot of\u2026","rel":"","context":"In &quot;Django&quot;","block_context":{"text":"Django","link":"https:\/\/monodes.com\/predaelli\/category\/python\/django\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":11626,"url":"https:\/\/monodes.com\/predaelli\/2024\/05\/05\/40-tools-for-ethical-hacking\/","url_meta":{"origin":659,"position":5},"title":"40 tools for ethical hacking","author":"Paolo Redaelli","date":"2024-05-05","format":false,"excerpt":"I know many of them, but not everyone! Shame on me! Here are 40 tools for ethical hacking! Nmap: Network scanner used for network discovery and security auditing. Wireshark: Network protocol analyzer for packet inspection and troubleshooting. Metasploit: Penetration testing framework for exploiting vulnerabilities. John the Ripper: Password cracking tool\u2026","rel":"","context":"In &quot;Tricks&quot;","block_context":{"text":"Tricks","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/tricks\/"},"img":{"alt_text":"\ud83d\udd0d","src":"https:\/\/static.xx.fbcdn.net\/images\/emoji.php\/v9\/tc1\/1\/16\/1f50d.png","width":350,"height":200},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/659","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/comments?post=659"}],"version-history":[{"count":0,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/659\/revisions"}],"wp:attachment":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/media?parent=659"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/categories?post=659"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/tags?post=659"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}