Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp177095lqb; Thu, 23 May 2024 14:39:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUhk7jU7EECXN1BrpAikAN/HskTDIvZwCdDgMk0bHrKgCX2bLrATN53QIEB47hscJPOyADN8zQS5oyoTmLPFWo3BPXGJMGlQ0olBhkSTA== X-Google-Smtp-Source: AGHT+IEN7QIZLzbyTV1dkTiTGsbpOMRHKZ2kKDA+EE/OwPQPQlrkNNaBXELsfmLBQIfxnPKFrris X-Received: by 2002:a17:906:3111:b0:a5c:d694:bb33 with SMTP id a640c23a62f3a-a62649d3f0fmr26715066b.45.1716500373384; Thu, 23 May 2024 14:39:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716500373; cv=pass; d=google.com; s=arc-20160816; b=GvTcJsfSDnTcuLQdS3dW3qrxTwtHRYxs/mAXJIiARReBo40pXnlhoaQSezHDVJOHSK KFxfDRjbT2yJ8g/WkEzjkui8hSXiWTp+lVIEe9/zF++Jpz06+GXrJN1WJ1Fn68cSwwIV 1FN/OV/DAV2HEi9NvPWUnx+6Uu866WTGt5oWG7FsRc/PKwCHLq9MCOpIELtRrw9eK7ph 8mmYeQki8JRLnPY5sdaXDMsTQTZ/zKC9NueCV7UfL/p/pNr7598bbMBlz12n/CvtYJLz B0mkpeybW8Zoe8MseM+J7Ee2jV8AW/5++zMSjd2QI2cRPHPZOI/jm5BdmCyzqxF2NAbh IBUA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=BflUS/DaOEoP+/FeRiR0QmgBIyVv251QJvvtweuDG3g=; fh=EWV9+2gYi9JQDEZq7/nt7K2Cuc9Rcw74qiVy/+QJCtY=; b=IQur2n3oiDxIuov2zCGc8OVfHkWZv+B1mqQvTV+lPqRbMRxGnOM0nQgBnU0Yt5uyEi Y6v7x3KxJwIOldO8EKF54hyi/4f6f0vaJCDmIbqruIM6VKtRlZCHYN81Pt/fwSDbG09/ x0RVpzK88tnpduyX6m7i3JTwL6mEjzQzZRZhpKuepEUGODFLAgXgQ9o8hoHsoPQZtxFN vzcrSn8AOvygElcIVMMqnKVTDv3pwPfSTLEQ/uQUxQ3OO7u9yvud552qFsqsCO6TvTNc Eki6iGrnHnep+08D7jPQ71aEPt85eumRSjZvZepfNEVdtqYVVeS7mdQ6BrpPD5JaFU2p 2nJg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=c0H9br4a; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-4378-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-crypto+bounces-4378-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a626cc38a48si8508866b.396.2024.05.23.14.39.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 14:39:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-4378-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=c0H9br4a; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-4378-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-crypto+bounces-4378-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 1DF1A1F24ADF for ; Thu, 23 May 2024 21:39:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6F8DD127E22; Thu, 23 May 2024 21:39:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="c0H9br4a" X-Original-To: linux-crypto@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1FFCC42A94; Thu, 23 May 2024 21:39:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716500366; cv=none; b=AnCdp0eamBTeSDPh+90P1gfJv1U9laD9kFNFXDS1T5dPXUv87Kc8lRI0s91LA0Xq5eQJKJk0VXjsCkRCbUe9QI5M6Mx1EtoGPrRWlID3IB3WNyxP4cT7ch/yKrKEqOM37fX84twhwgYl4qotaeVjYulClVc/y0Jkv8BYSSQmnMI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716500366; c=relaxed/simple; bh=MABXd/LGmZtWyBG3t8ftCTHS+SQ0rjqhQSLRN+Nb7+g=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=iXPKd3yIwN48uNtB6qs5JWSFYfkGb5wYEaIOBHMxiQX6lW0cB/O3udEWG038/Z/bQ+Wxq2ZKEhEuvsqq5+QlBeH6rCiTSlBxyZEVQni/9jvyWZYSNLvVKXCLpZKkAohAdFXZCo0KJpQvFtyQN+cYn6ep9MiA0W+kyzJBK9iKWOs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=c0H9br4a; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 649A6C2BD10; Thu, 23 May 2024 21:39:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716500365; bh=MABXd/LGmZtWyBG3t8ftCTHS+SQ0rjqhQSLRN+Nb7+g=; h=Date:Cc:Subject:From:To:References:In-Reply-To:From; b=c0H9br4aUfy6r2sPGYZft2AlGhkDWbS4YJ36sTxNOtPAgEyvNFKQXpmj4jBKRon+0 Ee+o6XyoGXbFMNmIzmEYR5l7kTJ7g9oWLqgetF4i+lftbbbXZOG7ACUrtHBqrXzJmt e5vVLVAZgZcJfERrxYbjQwdUE6P/wQgseaCwo/C+tcz7kKpNb7QtlYQpCEOi4lKXCi WnaoUfsuyI8xWt9M2q941ViJBgzxvVXHwZeDUjnNie8/Jz+Sn1g3OGQgNx1P2S1xpG I2KTqvuU6EkJ0hl7kzftKI0IEW5nRt82VxYzijzN2iUv8Olii7KWOsge0UPbZeQoYY BAW+6SoWnb1zw== Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 24 May 2024 00:39:20 +0300 Message-Id: Cc: , , , "James Prestwood" , "David Woodhouse" , "Eric Biggers" , "James Bottomley" , , "David S. Miller" , "open list" , "David Howells" , "James Bottomley" , "Stefan Berger" , "Ard Biesheuvel" , "Mario Limonciello" Subject: Re: [PATCH v5 5/5] keys: asymmetric: ASYMMETRIC_TPM2_KEY_RSA_SUBTYPE From: "Jarkko Sakkinen" To: "Jarkko Sakkinen" , "Herbert Xu" X-Mailer: aerc 0.17.0 References: <20240523212515.4875-1-jarkko@kernel.org> <20240523212515.4875-6-jarkko@kernel.org> In-Reply-To: <20240523212515.4875-6-jarkko@kernel.org> On Fri May 24, 2024 at 12:25 AM EEST, Jarkko Sakkinen wrote: > + /* > + * ABI requires this according include/crypto/akcipher.h, which says > + * that there is epilogue with algorithm OID and parameters length. > + * Neither size nor semantics is documented *anywhere*, and there's no > + * struct to hold them. > + * > + * So zeroing out the last eight bytes after the key blob seems like th= e > + * best bet, given no better (or any) information. The size of the > + * parameters (two u32's) was found from crypto/asymmetric/public_key.c= . > + */ > + memset(work, 0, 8); This is a mystery (or nightmare). BR, Jarkko