{"id":382,"date":"2017-06-07T08:30:51","date_gmt":"2017-06-07T07:30:51","guid":{"rendered":"http:\/\/chewett.co.uk\/blog\/?p=382"},"modified":"2017-06-07T21:43:22","modified_gmt":"2017-06-07T20:43:22","slug":"encryption-using-veracrypt-raspberry-pi-cluster","status":"publish","type":"post","link":"https:\/\/chewett.co.uk\/blog\/382\/encryption-using-veracrypt-raspberry-pi-cluster\/","title":{"rendered":"Encryption using Veracrypt on the Raspberry Pi Cluster"},"content":{"rendered":"<p>One of the \u00a0objectives for the Raspberry Pi cluster is to manage a number of\u00a0servers including syncing their contents and backing up databases. The data included may contain personal information so they are always backed up to an encrypted drive. This means I need to be able to access the encrypted content on the Raspberry Pi Cluster.<\/p>\n<h2>What is Veracrypt?<\/h2>\n<p><a href=\"https:\/\/www.veracrypt.fr\">Veracrypt<\/a> is a piece of software that allows on the fly encryption. This means that while you are writing to a veracrypt volume the file is immediately encrypted. In addition to this when reading files from a veracrypt volume they are decrypted as they are read.<\/p>\n<p>To encrypt your data, Veracrypt allows encrypting full disk partitions or creating an encrypted file. Both of these act like a partition once opened and provide transparent encryption. The volumes can be protected by a number of methods including passwords and keyfiles.<\/p>\n<p>However on the fly encryption adds additional slowdown when writing or reading data since it must be encrypted\/decrypted first. For systems that\u00a0support this at the hardware layer this slowdown can be very minor.<\/p>\n<p>Veracrypt is based on the popular encryption software <a href=\"http:\/\/truecrypt.sourceforge.net\/\">Truecrypt <\/a>that was discontinued on the 28th of May, 2014. A number of improvements have been made to the software since being forked and is my chosen method of full disk encryption.<\/p>\n<p>The Raspberry Pi&#8217;s do not appear to have hardware crypto support so it is likely to be slow encrypting files. This is something that I am going to need to be aware of.<\/p>\n<h2>Installing Veracrypt on a Raspberry Pi<\/h2>\n<p>Veracrypt includes a binary compiled for Raspbian which can be downloaded from <a href=\"https:\/\/www.veracrypt.fr\/en\/Downloads.html\">their website<\/a>.<\/p>\n<p>To install the downloaded files you can run:<\/p>\n<pre>tar -xf veracrypt-1.19-raspbian-setup.tar.bz2\r\nchmod u+x veracrypt-1.19-setup-console-armv7\r\nsudo .\/veracrypt-1.19-setup-console-armv7<\/pre>\n<p>The first line uncompressed the file. Once it has been extracted it needs to be made executable by running <code>chmod<\/code>. Since I only want to run the program on the command line I have made the command line program executable. The final line then runs the installer.<\/p>\n<p>Pressing <code>1<\/code> during the installer will install veracrypt. This will prompt you to read the terms and conditions. Once they have been read <code>q<\/code> will quit out and then entering\u00a0<code>yes<\/code> will accept the terms.<\/p>\n<p>Once this has been done running veracrypt should give a prompt explaining its usage.<\/p>\n<p>However if when running this command you get the below error:<\/p>\n<pre class=\"fp-display-block-title t08\">error while loading shared libraries: libwx_baseu-3.0.so.0: cannot open shared object file: No such file or directory<\/pre>\n<p>You will need to install libwxbase 3.0 which can be done by running the below command:<\/p>\n<pre>sudo apt-get install libwxbase3.0-0<\/pre>\n<p>Once this has been done Veracrypt should be ready to use.<\/p>\n<p>I wont be documenting its use in this blog post but once you have an encrypted volume or file you can mount and decrypt it using<\/p>\n<pre>veracrypt test_encrypted.veracrypt \/mnt\/test<\/pre>\n<p>Where <code>test_encrypted.veracrypt<\/code>\u00a0is the file or volume (e.g. mounting a partition can be done using\u00a0<code>\/dev\/sda1<\/code>) and <code>\/mnt\/test<\/code> is the location to mount the encrypted volume. Once it has been mounted you can access the files as normal files.<\/p>\n<p>Now I am able to mount my encrypted drives I can work on setting up backups.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the \u00a0objectives for the Raspberry Pi cluster is to manage a number of\u00a0servers including syncing their contents and backing up databases. The data included may contain personal information so they are always backed up to an encrypted drive. This means I need to be able to access the encrypted content on the Raspberry [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"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,"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":[122],"tags":[125,101,127,126],"class_list":["post-382","post","type-post","status-publish","format-standard","hentry","category-raspberry-pi-cluster","tag-encryption","tag-raspberry-pi-cluster","tag-truecrypt","tag-veracrypt"],"wppr_data":{"cwp_meta_box_check":"No"},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p2toWX-6a","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":433,"url":"https:\/\/chewett.co.uk\/blog\/433\/veracrypt-error-device-mapper-reload-ioctl-error-fixed\/","url_meta":{"origin":382,"position":0},"title":"Veracrypt Error device-mapper: reload ioctl Error Fixed","author":"Chewett","date":"June 28, 2017","format":false,"excerpt":"When trying to mount an encrypted drive using Veracrypt I encountered this error: chewett@bunker-master2:\/mnt$ veracrypt \/dev\/sdc1 gen500 Enter password for \/dev\/sdc1: Enter PIM for \/dev\/sdc1: Enter keyfile [none]: Protect hidden volume (if any)? (y=Yes\/n=No) [No]: Error: device-mapper: reload ioctl on veracrypt2_0 failed: No such file or directory I did some\u2026","rel":"","context":"In &quot;Fixes&quot;","block_context":{"text":"Fixes","link":"https:\/\/chewett.co.uk\/blog\/category\/fixes\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":430,"url":"https:\/\/chewett.co.uk\/blog\/430\/raspberry-pi-read-file-system-fix-solved\/","url_meta":{"origin":382,"position":1},"title":"Raspberry Pi Read-only file system Fix Solved","author":"Chewett","date":"June 14, 2017","format":false,"excerpt":"If you are getting \"Read-only file system\" on your Raspberry Pi when mounting drives there is a simple fix. chewett@bunker-master2:\/mnt\/wd500$ touch test.txt touch: cannot touch \u2018test.txt\u2019: Read-only file system I noticed this happening when I tried to mount and work on my external hard drive. This is formatted with the\u2026","rel":"","context":"In &quot;Fixes&quot;","block_context":{"text":"Fixes","link":"https:\/\/chewett.co.uk\/blog\/category\/fixes\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2739,"url":"https:\/\/chewett.co.uk\/blog\/2739\/installing-influxdb-on-a-raspberry-pi\/","url_meta":{"origin":382,"position":2},"title":"Installing InfluxDB on a Raspberry Pi","author":"Chewett","date":"December 5, 2020","format":false,"excerpt":"Today I am writing a quick describing how you can install InfluxDB on a Raspberry Pi What is InfluxDB? InfluxDB is a relatively popular time series database that allows storing metrics and data. It is specifically designed to store and operate on data that is bound by a time component.\u2026","rel":"","context":"In &quot;Raspberry Pi Cluster&quot;","block_context":{"text":"Raspberry Pi Cluster","link":"https:\/\/chewett.co.uk\/blog\/category\/raspberry-pi-cluster\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/11\/raspberrypi_influxdb_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/11\/raspberrypi_influxdb_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/11\/raspberrypi_influxdb_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/11\/raspberrypi_influxdb_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/11\/raspberrypi_influxdb_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":2674,"url":"https:\/\/chewett.co.uk\/blog\/2674\/moving-the-raspberry-pi-cluster-to-a-raspberry-pi-4b-4gb\/","url_meta":{"origin":382,"position":3},"title":"Moving the Raspberry Pi Cluster to a Raspberry Pi 4B 4GB","author":"Chewett","date":"October 10, 2020","format":false,"excerpt":"Today I am talking about moving the Raspberry Pi Cluster primary node to a Raspberry Pi 4B 4GB model. I also discuss the improvements that the Raspberry Pi 4B has made over previous generations. Why move to a Raspberry Pi 4B Generally running the cluster does not require a large\u2026","rel":"","context":"In &quot;Raspberry Pi Cluster&quot;","block_context":{"text":"Raspberry Pi Cluster","link":"https:\/\/chewett.co.uk\/blog\/category\/raspberry-pi-cluster\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/10\/raspberrypi_4_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/10\/raspberrypi_4_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/10\/raspberrypi_4_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/10\/raspberrypi_4_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/10\/raspberrypi_4_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":1839,"url":"https:\/\/chewett.co.uk\/blog\/1839\/raspberry-pi-cluster-node-08-slave-helper-functions\/","url_meta":{"origin":382,"position":4},"title":"Raspberry Pi Cluster Node &#8211; 08 Slave Helper Functions","author":"Chewett","date":"December 19, 2018","format":false,"excerpt":"This post builds on\u00a0my previous posts in the Raspberry Pi Cluster series\u00a0by adding a number of slave helper functions.\u00a0 This update will begin the process of fully automating the slaves. Preparing the Slaves for Automation Before the slaves are ready to be fully automated there are a number of commands\u2026","rel":"","context":"In &quot;Raspberry Pi Cluster&quot;","block_context":{"text":"Raspberry Pi Cluster","link":"https:\/\/chewett.co.uk\/blog\/category\/raspberry-pi-cluster\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/rpi_cluster_08_slave_functions.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/rpi_cluster_08_slave_functions.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/rpi_cluster_08_slave_functions.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/rpi_cluster_08_slave_functions.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":292,"url":"https:\/\/chewett.co.uk\/blog\/292\/stacking-raspberry-pis\/","url_meta":{"origin":382,"position":5},"title":"Stacking Raspberry Pi&#8217;s","author":"Chewett","date":"June 3, 2017","format":false,"excerpt":"The\u00a0stackable Raspberry Pi case\u00a0purchased allows stacking Raspberry Pi B+ and Raspberry Pi 2\/3 but I was planning to modify this to stack\u00a0older Pi's. Stacking the Raspberry Pi (256 MB) The original Raspberry Pi does not have any mounting points. This makes it quite hard to stack using my chosen stacking\u2026","rel":"","context":"In &quot;Raspberry Pi Cluster&quot;","block_context":{"text":"Raspberry Pi Cluster","link":"https:\/\/chewett.co.uk\/blog\/category\/raspberry-pi-cluster\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/04\/stacked_cluster.jpg?fit=600%2C393&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/04\/stacked_cluster.jpg?fit=600%2C393&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/04\/stacked_cluster.jpg?fit=600%2C393&ssl=1&resize=525%2C300 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/382","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=382"}],"version-history":[{"count":8,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/382\/revisions"}],"predecessor-version":[{"id":399,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/382\/revisions\/399"}],"wp:attachment":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=382"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=382"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=382"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}