{"id":39,"date":"2016-11-14T16:36:58","date_gmt":"2016-11-14T16:36:58","guid":{"rendered":"http:\/\/www.hestben.se\/HestbenTechnical\/?p=39"},"modified":"2016-11-14T16:36:58","modified_gmt":"2016-11-14T16:36:58","slug":"a-noobs-guide-to-installing-gentoo-on-a-core-i5-2500k-cryptsetup","status":"publish","type":"post","link":"https:\/\/www.hestben.se\/HestbenTechnical\/?p=39","title":{"rendered":"A noobs guide to installing Gentoo on a core i5 2500K &#8211; cryptsetup"},"content":{"rendered":"<p>So, I use cryptsetup to encrypt a drive I have, so I would really like to continue using cryptsetup.<br \/>\nIt is easy to emerge cryptsetup with <code>emerge --ask sys-fs\/cryptsetup<\/code>.<br \/>\nThen, trying to run it, for example <code>cryptsetup benchmark<\/code>, I got the error:<br \/>\n<code>Required kernel crypto interface not available.<br \/>\nEnsure you have algif_skcipher kernel module loaded.<\/code><br \/>\nI searched and found <a href=\"http:\/\/www.gossamer-threads.com\/lists\/gentoo\/user\/300618\">this thread<\/a>. I extracted the parts I needed for it to work for me:<br \/>\nThe following kernel configuration options needed to be enabled:<br \/>\n(If I recall correctly)<br \/>\n<code>CONFIG_CRYPTO_XTS<br \/>\nCONFIG_CRYPTO_AES_X86_64<br \/>\nCONFIG_CRYPTO_AES_NI_INTEL<\/code><br \/>\nThe first two are for my encryption algorithm <code>xts-plain64<\/code>. The Intel option is because I have an Intel CPU.<br \/>\nStill no go, I found I had to enable some hashes as well (logically):<br \/>\n<code>CONFIG_CRYPTO_SHA1<br \/>\nCONFIG_CRYPTO_SHA1_SSSE3<br \/>\nCONFIG_CRYPTO_SHA256_SSSE3<br \/>\nCONFIG_CRYPTO_SHA512_SSSE3<br \/>\nCONFIG_CRYPTO_SHA1_MB<br \/>\nCONFIG_CRYPTO_SHA256<br \/>\nCONFIG_CRYPTO_SHA512<\/code><br \/>\nStill no go. Later in the thread I found that I needed these options as well (Yes, I am using it as a block device):<br \/>\n<code>CONFIG_BLK_DEV_DM<br \/>\nCONFIG_DM_CRYPT<\/code><br \/>\nStill no go. I started to get really annoyed, because, I had chosen to include a lot of the options in the kernel, so for each new try, I had to reboot the kernel. So, I searched for &#8216;algif&#8217; in the thread and found that these options might also be needed:<br \/>\n<code>CONFIG_CRYPTO_USER_API<br \/>\nCONFIG_CRYPTO_USER_API_HASH<br \/>\nCONFIG_CRYPTO_USER_API_SKCIPHER<\/code>.<br \/>\nI chose these options to be modules, and could load that module in right away, without a reboot. That did the trick.<br \/>\nThere was some debate in the thread, whether you needed to include options in the kernel, or not, to be able to boot if your root is encrypted. I don&#8217;t have it setup that way, so it didn&#8217;t bother me, but somebody said it should be able to boot with the crypto options as modules, because modules can be loaded during boot.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So, I use cryptsetup to encrypt a drive I have, so I would really like to continue using cryptsetup. It is easy to emerge cryptsetup with emerge &#8211;ask sys-fs\/cryptsetup. Then, trying to run it, for example cryptsetup benchmark, I got the error: Required kernel crypto interface not available. Ensure you have algif_skcipher kernel module loaded. &hellip; <a href=\"https:\/\/www.hestben.se\/HestbenTechnical\/?p=39\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;A noobs guide to installing Gentoo on a core i5 2500K &#8211; cryptsetup&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.hestben.se\/HestbenTechnical\/index.php?rest_route=\/wp\/v2\/posts\/39"}],"collection":[{"href":"https:\/\/www.hestben.se\/HestbenTechnical\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hestben.se\/HestbenTechnical\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hestben.se\/HestbenTechnical\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hestben.se\/HestbenTechnical\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=39"}],"version-history":[{"count":3,"href":"https:\/\/www.hestben.se\/HestbenTechnical\/index.php?rest_route=\/wp\/v2\/posts\/39\/revisions"}],"predecessor-version":[{"id":42,"href":"https:\/\/www.hestben.se\/HestbenTechnical\/index.php?rest_route=\/wp\/v2\/posts\/39\/revisions\/42"}],"wp:attachment":[{"href":"https:\/\/www.hestben.se\/HestbenTechnical\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=39"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hestben.se\/HestbenTechnical\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=39"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hestben.se\/HestbenTechnical\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=39"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}