From patchwork Sat May 13 11:51:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 9725171 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2ED0360325 for ; Sat, 13 May 2017 11:53:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1DCF9288DD for ; Sat, 13 May 2017 11:53:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 10F6E288E2; Sat, 13 May 2017 11:53:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC3E8288DD for ; Sat, 13 May 2017 11:53:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753708AbdEMLw2 (ORCPT ); Sat, 13 May 2017 07:52:28 -0400 Received: from mail-pg0-f49.google.com ([74.125.83.49]:36683 "EHLO mail-pg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753724AbdEMLwJ (ORCPT ); Sat, 13 May 2017 07:52:09 -0400 Received: by mail-pg0-f49.google.com with SMTP id x64so21745525pgd.3 for ; Sat, 13 May 2017 04:52:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wHsxEplnkumY/l7XDItmmsiYQlfyB6aqQjglGgjhyqM=; b=YfWW+GkAArYlutCgcvV8nueRBFJx3xLTOEwR+EXUJ2DBIv1vntaDI2gkxg3cYAtMWs E25ppMRpBy6a8mQWIageD3VPW4hpz8MZNUM4UMFXHMYV9tfZoCqlL1gEupkcw3I3R2wK 92jW5zawbD7V+IbZ/jQlQ/Fvtlo61e/rA9JzU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wHsxEplnkumY/l7XDItmmsiYQlfyB6aqQjglGgjhyqM=; b=jKUx5CvfnGpOn/llhcJjSLt+j4VIWvpgSOBaUVP6RuuFaZkY8AhvjuD1jPcoUJQG8o DXIKW6v8WdIVudIXVLbt+sEWYehCeUtDRMjxHxMdxrpm/NHwXd8wYI5ng0r37//gKdyt FbZVNtH8aEtOwjIkIERXzGmfY/QQvCNe+ASL3Jh1DNcQMmvv06IPiEIlHcPu6ORNAzlk yHbyooS2jbTgjA+0RL0Bf1Ih+NnDyLawIwfsx2teGTCvUi8FxFCox6gS5+78EqkEJqpd fWJz2oufiJiJ+3BE4N+X6oTszHWok01t/3tyT40ZGhMBtiI6sTPHjHctbFO7Er1M1hxl YL8Q== X-Gm-Message-State: AODbwcDO8qoggiIzKp90DQpIcWFuTjtcIqz9uizUichbj28ASLSaeCkw 1AEM/KjDIF4vWRF6 X-Received: by 10.99.39.194 with SMTP id n185mr9171782pgn.15.1494676328898; Sat, 13 May 2017 04:52:08 -0700 (PDT) Received: from www.outflux.net (173-164-112-133-Oregon.hfc.comcastbusiness.net. [173.164.112.133]) by smtp.gmail.com with ESMTPSA id 6sm11605924pfo.132.2017.05.13.04.52.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 May 2017 04:52:06 -0700 (PDT) From: Kees Cook To: Jonathan Corbet Cc: Kees Cook , David Howells , Tyler Hicks , John Johansen , Tetsuo Handa , Paul Moore , Mimi Zohar , Casey Schaufler , James Morris , David Safford , linux-doc@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 15/17] doc: ReSTify keys-ecryptfs.txt Date: Sat, 13 May 2017 04:51:51 -0700 Message-Id: <1494676313-144890-16-git-send-email-keescook@chromium.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1494676313-144890-1-git-send-email-keescook@chromium.org> References: <1494676313-144890-1-git-send-email-keescook@chromium.org> Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Adjusts for ReST markup and moves under keys security devel index. Cc: David Howells Cc: Tyler Hicks Signed-off-by: Kees Cook --- Documentation/security/00-INDEX | 2 -- .../security/{keys-ecryptfs.txt => keys/ecryptfs.rst} | 19 ++++++++++++------- Documentation/security/keys/index.rst | 1 + 3 files changed, 13 insertions(+), 9 deletions(-) rename Documentation/security/{keys-ecryptfs.txt => keys/ecryptfs.rst} (91%) diff --git a/Documentation/security/00-INDEX b/Documentation/security/00-INDEX index a840095bb11c..08a6e7a195ef 100644 --- a/Documentation/security/00-INDEX +++ b/Documentation/security/00-INDEX @@ -1,7 +1,5 @@ 00-INDEX - this file. -keys-ecryptfs.txt - - description of the encryption keys for the ecryptfs filesystem. keys-request-key.txt - description of the kernel key request service. keys-trusted-encrypted.txt diff --git a/Documentation/security/keys-ecryptfs.txt b/Documentation/security/keys/ecryptfs.rst similarity index 91% rename from Documentation/security/keys-ecryptfs.txt rename to Documentation/security/keys/ecryptfs.rst index c3bbeba63562..4920f3a8ea75 100644 --- a/Documentation/security/keys-ecryptfs.txt +++ b/Documentation/security/keys/ecryptfs.rst @@ -1,4 +1,6 @@ - Encrypted keys for the eCryptfs filesystem +========================================== +Encrypted keys for the eCryptfs filesystem +========================================== ECryptfs is a stacked filesystem which transparently encrypts and decrypts each file using a randomly generated File Encryption Key (FEK). @@ -35,20 +37,23 @@ controlled environment. Another advantage is that the key is not exposed to threats of malicious software, because it is available in clear form only at kernel level. -Usage: +Usage:: + keyctl add encrypted name "new ecryptfs key-type:master-key-name keylen" ring keyctl add encrypted name "load hex_blob" ring keyctl update keyid "update key-type:master-key-name" -name:= '<16 hexadecimal characters>' -key-type:= 'trusted' | 'user' -keylen:= 64 +Where:: + + name:= '<16 hexadecimal characters>' + key-type:= 'trusted' | 'user' + keylen:= 64 Example of encrypted key usage with the eCryptfs filesystem: Create an encrypted key "1000100010001000" of length 64 bytes with format -'ecryptfs' and save it using a previously loaded user key "test": +'ecryptfs' and save it using a previously loaded user key "test":: $ keyctl add encrypted 1000100010001000 "new ecryptfs user:test 64" @u 19184530 @@ -62,7 +67,7 @@ Create an encrypted key "1000100010001000" of length 64 bytes with format $ keyctl pipe 19184530 > ecryptfs.blob Mount an eCryptfs filesystem using the created encrypted key "1000100010001000" -into the '/secret' directory: +into the '/secret' directory:: $ mount -i -t ecryptfs -oecryptfs_sig=1000100010001000,\ ecryptfs_cipher=aes,ecryptfs_key_bytes=32 /secret /secret diff --git a/Documentation/security/keys/index.rst b/Documentation/security/keys/index.rst index ddfe7e4726e6..d34f663354bb 100644 --- a/Documentation/security/keys/index.rst +++ b/Documentation/security/keys/index.rst @@ -6,3 +6,4 @@ Kernel Keys :maxdepth: 1 core + ecryptfs