From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=62.149.156.116 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795083572; b=5OCjd6AN2PYWePfnNM8Ng/vRykzdSuPdySuf57b9HZkOgU8SI+lttbsyyEcoXdRSQmDs oMP4CNBU/a3pZx1J+hESa9qhSeGotsABnirKCNOFDHwFRX/r3gBxHJjA+7RSUi/8+PtHY RM3hKB6oJEL0xVVh001d17Ljf2wkc7oEgHut2YsbxzULH1u3Zz8QFVpRr3C104N9hHkWW YVRFIzQKaKARwLncQ7Tyjr6sNYF6YyjOLhrlfPpHsPRYhLL9F3bBaEbaKp/4eULOgtYnJ 2qTT64ZVD7qefM3fVlH1K3F28qFgFHDYgtzarSh/jZor38uIsMeI5Ch5+FsMX30cn2Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795083572; h=DMARC-Filter:Received:DKIM-Signature:Message-ID:Date:MIME-Version: User-Agent:Subject:Content-Language:To:Cc:References:From:In-Reply-To: Content-Type:Content-Transfer-Encoding:X-CMAE-Envelope; bh=qoTfovvGGzpx6qWwGgUcp8ZrLCtEAOaZqm/XAVRtgu8=; b=KBtxHAUnjxJtakUY/beO1yaV978H0+TeHBMs89WpZikC6q7cpDNCj1YT2h271SOGv90r NzbCT8mmofPxWvScqHXzJH+zPbGALOrQWvtqElCiDqJyOJTdnWmgK1k5ygoJrngRbFUeK vB1jvl4XiS5fTEHJnkTYNxqlaHOR+wyp3GlabrXYGXT77qaXsR3Yo7mQXUiyvhtWmXsA+ ENO/zd4RIMuJXsFF1P/iEP5SPgEInAKUdPjaPCVVGRFq07zKitc8SKvWyaSGWvt7J27YG /gwAHeNPmjkS0TIqmro90eJZoG8Rznju27FF7J2uak3u7scDVY0zAf9bADt+94cnChw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=enneenne.com; spf=pass smtp.mailfrom=enneenne.com; dkim=pass header.d=aruba.it header.i=@aruba.it header.a=rsa-sha256 header.s=a1 header.b="YbUT/4nB"; arc=none smtp.remote-ip=62.149.156.116 Received: from smtpcmd11116.aruba.it (smtpcmd11116.aruba.it [62.149.156.116]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A872F60A260B for ; Thu, 19 Nov 2026 10:19:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A872F60A260B Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=enneenne.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=enneenne.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=aruba.it header.i=@aruba.it header.a=rsa-sha256 header.s=a1 header.b=YbUT/4nB Received: from [192.168.0.186] ([101.57.122.26]) by Aruba SMTP with ESMTPSA id TzEoxCjbX6VShTzEoxQo8b; Thu, 19 Nov 2026 11:19:31 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aruba.it; s=a1; t=1795083571; bh=xVDB/U48+KhBs5UAsVUdiYW+qscID3emDO8ims3vEAk=; h=Date:MIME-Version:Subject:To:From:Content-Type; b=YbUT/4nBgfoaIXJwrMhQeMlvt9sIO8ewa18oowgWvXyRXmLc2FHqa2uE+1ff4WSTf +SlwXjDXm5+E/qUhmEoIB20CoCnXl3yFBCAfguB9RFKweMi7UXcT5bvO6X6JzcKsVY YdpDu59seHkq9sF+x9RNqBAoaQVUMas1goxW3myB1EgiT3nhghCefk4/uA0S5tFFps TKVA8foIHclyKVCWFHy5lEMDBTPNoWtxVHid8dwSdINvi25UgNeSV0dcPqLyfphhGR kGKvJwZviyVJAXY+tsejDtlxxsZooEEM2WPMcXCcmF3vDQZeiDtSbhOPjEWtT1DFPA jFwJQ9Lcm3lfg== Message-ID: <6fc1eaee-3a60-49d9-a5a0-74b662f2232f@enneenne.com> Date: Thu, 19 Nov 2026 11:19:30 +0100 X-Mailing-List: linux-security-module@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH 0/9] KEYS: keycrypt: keys that user space can use but never read Content-Language: en-US To: Jarkko Sakkinen , Demi Marie Obenour Cc: David Howells , keyrings@vger.kernel.org, Herbert Xu , "David S. Miller" , Jens Wiklander , Sumit Garg , op-tee@lists.trustedfirmware.org, =?UTF-8?Q?Horia_Geant=C4=83?= , Pankaj Gupta , Sahil Malhotra , Ahmad Fatoum , Richard Weinberger , "Christophe Leroy (CS GROUP)" , Eric Biggers , Arnd Bergmann , Paul Moore , James Morris , "Serge E. Hallyn" , Jonathan Corbet , Shuah Khan , Randy Dunlap , linux-crypto@vger.kernel.org, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org, linux-api@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <20261118140421.584086-1-giometti@enneenne.com> <650f89ef-9745-4f75-b254-80fa5ac4773d@gmail.com> From: Rodolfo Giometti In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4xfNmI1DIntSdZQogEw4CF+ExsMW52Dv4KVdQXYoEI2SlV11eEe+IxA80+xUydMG7wJYG2UEM6OiD9fNlRWY7iZyyfEynPQDNyEEdFhZWKfwj8abUd2CVm Lq49bpZ8Z2hgx71DU6sYhhPLl43jb2ht+KlVBI2Wws/GNH5B314G6kSkVXdUI0zRZd2gi9GuTGtx9GWmWncQRI4c/1+DT6GPQBX8WtlSvd+6+m3S0U28wDVb 9Hs0soZ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pFWF2L On 19/11/2026 01:37, Jarkko Sakkinen wrote: [snip] > The exitential problem here is that KEYCTL_CRYPT_OPEN creates a circular > relationship between the keyrings API and a specific key type. Agreed: it should be a key_type operation, dispatched the way KEYCTL_PKEY_* dispatches to asym_eds_op, so that keyctl knows no key type. > At hardware level I did not see any support for TPM, which narrows down > the potential user base. On a TPM system the sw backend can take its master from a TPM-sealed trusted key, but there keycrypt adds little over a trusted key. The users are SoCs with a TEE and often no TPM, OP-TEE on i.MX for one. > The remaining potential user base is further reduced by those that use > trusted keys; leaving out those who need to solve the assumed problem > that only this patch set can presumebly sort out. > > And we don't really know at this point that cut. This is pretty much > the break down of what is wrong here. > > If there is/was a problem to sort out, it should be so constrained that > it should be as quick to describe as stepping over a nail really. The nail: a device must encrypt and decrypt its own files, also from a minimal initramfs, with a key that root or a kernel exploit can use on the device but never copy off it. Trusted keys hand their users the key's bytes (dm-crypt, encrypted keys and AF_ALG read them). CAAM's "pk" option is the one exception, but even there a new key is drawn in kernel memory before the CAAM wraps it, and user space reaches it only through AF_ALG, which the kernel calls insecure and deprecated (Documentation/crypto/userspace-if.rst, and "Userspace interface (deprecated)" in crypto/Kconfig), privileged by default, with no purpose bound to the key. The i.MX93 has no CAAM at all: there the key can live in OP-TEE, and keycrypt lets the keyring use it without it ever leaving the TA. The stream of patch 9 has no user yet and can go. Ciao, Rodolfo -- GNU/Linux Solutions e-mail: giometti@enneenne.com Linux Device Driver giometti@linux.it Embedded Systems phone: +39 349 2432127 UNIX programming