{"id":1151,"date":"2014-08-13T22:09:10","date_gmt":"2014-08-13T20:09:10","guid":{"rendered":"http:\/\/blog.rabahi.net\/?page_id=1151"},"modified":"2014-08-13T22:09:10","modified_gmt":"2014-08-13T20:09:10","slug":"encryption-survival-guide","status":"publish","type":"page","link":"https:\/\/blog.rabahi.net\/?page_id=1151","title":{"rendered":"Encryption Survival Guide"},"content":{"rendered":"<div id=\"toc_container\" class=\"no_bullets\"><p class=\"toc_title\">Contents<\/p><ul class=\"toc_list\"><li><a href=\"#Installation\"><span class=\"toc_number toc_depth_1\">1<\/span> Installation<\/a><\/li><li><a href=\"#Example_of_use\"><span class=\"toc_number toc_depth_1\">2<\/span> Example of use<\/a><ul><li><a href=\"#Create_encrypted_directory\"><span class=\"toc_number toc_depth_2\">2.1<\/span> Create encrypted directory<\/a><\/li><li><a href=\"#Use_encrypted_directory\"><span class=\"toc_number toc_depth_2\">2.2<\/span> Use encrypted directory<\/a><\/li><li><a href=\"#Mount_UnMount\"><span class=\"toc_number toc_depth_2\">2.3<\/span> Mount \/ UnMount<\/a><\/li><\/ul><\/li><li><a href=\"#Read_More\"><span class=\"toc_number toc_depth_1\">3<\/span> Read More<\/a><\/li><\/ul><\/div>\n<h1><span id=\"Installation\">Installation<\/span><\/h1>\n<pre lang=\"bash\">\r\nyum -y install encfs\r\n<\/pre>\n<h1><span id=\"Example_of_use\">Example of use<\/span><\/h1>\n<h2><span id=\"Create_encrypted_directory\">Create encrypted directory<\/span><\/h2>\n<pre lang=\"bash\">\r\necho \"Frist, create directory\"\r\nmkdir ~\/myDecryptDirectory\r\necho \"Then create your encrypt directory. We tell that ~\/myEncryptDirectory is mount in ~\/myDecryptDirectory.\"\r\nencfs ~\/myEncryptDirectory ~\/myDecryptDirectory\r\n<\/pre>\n<p>Answer at the questions like this:<\/p>\n<pre>\r\nThe directory \"\/mEncryptDirectory\/\" does not exist. Should it be created? (y,n) y\r\nCreating new encrypted volume.\r\nPlease choose from one of the following options:\r\n enter \"x\" for expert configuration mode,\r\n enter \"p\" for pre-configured paranoia mode,\r\n anything else, or an empty line will select standard mode.\r\n?> p\r\n\r\nParanoia configuration selected.\r\n\r\nConfiguration finished.  The filesystem to be created has\r\nthe following properties:\r\nFilesystem cipher: \"ssl\/aes\", version 3:0:2\r\nFilename encoding: \"nameio\/block\", version 3:0:1\r\nKey Size: 256 bits\r\nBlock Size: 1024 bytes, including 8 byte MAC header\r\nEach file contains 8 byte header with unique IV data.\r\nFilenames encoded using IV chaining mode.\r\nFile data IV is chained to filename IV.\r\nFile holes passed through to ciphertext.\r\n\r\n-------------------------- WARNING --------------------------\r\nThe external initialization-vector chaining option has been\r\nenabled.  This option disables the use of hard links on the\r\nfilesystem. Without hard links, some programs may not work.\r\nThe programs 'mutt' and 'procmail' are known to fail.  For\r\nmore information, please see the encfs mailing list.\r\nIf you would like to choose another configuration setting,\r\nplease press CTRL-C now to abort and start over.\r\n\r\nNow you will need to enter a password for your filesystem.\r\nYou will need to remember this password, as there is absolutely\r\nno recovery mechanism.  However, the password can be changed\r\nlater using encfsctl.\r\n\r\nNew Encfs Password: \r\nVerify Encfs Password: \r\n\r\n<\/pre>\n<h2><span id=\"Use_encrypted_directory\">Use encrypted directory<\/span><\/h2>\n<p>Now if you create a file in myDecryptDirectory, it will automatically encrypted in myEncryptDirectory.<br \/>\nLet&#8217;s give a try !<\/p>\n<pre lang=\"bash\">\r\necho \"create a file in myDecryptDirectory\"\r\necho \"hello world\" > ~\/myDecryptDirectory\/hello-world.txt\r\n\r\necho \"now display content from the file fresh created\"\r\ncat ~\/myDecryptDirectory\/hello-world.txt\r\n$>  hello world\r\n\r\necho \"let's see what's happened in ~\/myEncryptDirectory\"\r\nls ~\/myEncryptDirectory\r\n$> KOkS8bmWBJMptU-xu1oU5HX2\r\n\r\necho \"ok the file name is encrypted. let's check the file content\"\r\ncat ~\/myEncryptDirectory\/KOkS8bmWBJMptU-xu1oU5HX2\r\n$> z@\u00c9\u00fd\u00c7f\u00aaX-\u00ce\u00fez\u00e7\u00d0\u00b0t\u00c3G\u00fd\r\n<\/pre>\n<h2><span id=\"Mount_UnMount\">Mount \/ UnMount<\/span><\/h2>\n<p>To mount the directory : (same command to create a new encrypted directory)<\/p>\n<pre lang=\"bash\">\r\nencfs ~\/myEncryptDirectory ~\/myDecryptDirectory\r\n<\/pre>\n<p>To unmount the directory:<\/p>\n<pre lang=\"bash\">\r\nfusermount -u ~\/myDecryptDirectory\r\n<\/pre>\n<h1><span id=\"Read_More\">Read More<\/span><\/h1>\n<ul>\n<li>man encfs<\/li>\n<li><a href=\"https:\/\/wiki.archlinux.org\/index.php\/EncFS\" target=\"_blank\">wiki.archlinux.org<\/a><\/li>\n<ul>\n","protected":false},"excerpt":{"rendered":"<p>Contents1 Installation2 Example of use2.1 Create encrypted directory2.2 Use encrypted directory2.3 Mount \/ UnMount3 Read More Installation yum -y install encfs Example of use Create encrypted directory echo &#8220;Frist, create directory&#8221; mkdir ~\/myDecryptDirectory echo &#8220;Then create your encrypt directory. We tell that ~\/myEncryptDirectory is mount in ~\/myDecryptDirectory.&#8221; encfs ~\/myEncryptDirectory ~\/myDecryptDirectory Answer at the questions like [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":492,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-1151","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/1151","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1151"}],"version-history":[{"count":8,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/1151\/revisions"}],"predecessor-version":[{"id":1159,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/1151\/revisions\/1159"}],"up":[{"embeddable":true,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/492"}],"wp:attachment":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}