Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 20BEE13C80E for ; Thu, 23 May 2024 13:36:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716471397; cv=none; b=GyqfB5bVyqeOPS26jQ3k4/rLyl+4KjIP0KQg/cSmchc8et/s9ELCalJBzayjkVQNKZ4z4hksRVVZbiZ3tsUB3gzlu713CEKKZ5kG9VwaLLUyP5x3fQbLd6grrkZN2OFk4xHU80Uf01pe7md11/onQIuOGr116FyNpLyvC/n+Atc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716471397; c=relaxed/simple; bh=CM8wHWsQhb6nBkI5sT6VghNmVLSsK1SRVpym/X9/WnE=; h=From:In-Reply-To:References:To:Cc:Subject:MIME-Version: Content-Type:Date:Message-ID; b=kCIJJndnt5lSHW+LJNmn11Cl3qsTwth/qcX7XZaqyLcmVTKtdg9+lef5wIYq+k68hV0T9OP602vJtAlSzOrw/ngVxjDgSYp4ohgnCb/rjrH7C6J7WoXYiSCThEpyhCzYZK+KdfSRlsp90s1OpxqYng+vTciHbHZLBCqT4XQx7FQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=WQQF9amg; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="WQQF9amg" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1716471394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vXxBSHmoAMy4p5FvXFciFTuZOZzNT/zIajI6dPFeaA8=; b=WQQF9amgpsQEGj1gg91pEFLoQdSL5LT6PKM1Q6xNWsHsO+qBGmCxGKt4i1iVZ7j6+nkR/N Kn6457rurCxWyWXE+BRhCXNTLpz+4/eJyqHzWu8dNqxVoaf0lTXBXeB9HyCEGT9M3EHrvw V+jXjcV8ZghdyTcuRMIhj7dAVNa+XE4= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-512-9ybZC16bMV-pSc_RjrjyHA-1; Thu, 23 May 2024 09:36:33 -0400 X-MC-Unique: 9ybZC16bMV-pSc_RjrjyHA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8D6903801EC7; Thu, 23 May 2024 13:36:32 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id D52C51C0654B; Thu, 23 May 2024 13:36:29 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20240523132341.32092-1-jarkko@kernel.org> References: <20240523132341.32092-1-jarkko@kernel.org> To: Jarkko Sakkinen Cc: dhowells@redhat.com, linux-integrity@vger.kernel.org, keyrings@vger.kernel.org, David Woodhouse , Eric Biggers , James Bottomley , Herbert Xu , "David S. Miller" , Andrew Morton , Mimi Zohar , Paul Moore , James Morris , "Serge E. Hallyn" , linux-crypto@vger.kernel.org (open list:CRYPTO API), linux-kernel@vger.kernel.org (open list), linux-security-module@vger.kernel.org (open list:SECURITY SUBSYSTEM) Subject: Re: [PATCH v2] KEYS: trusted: Use ASN.1 encoded OID Precedence: bulk X-Mailing-List: linux-integrity@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <575952.1716471389.1@warthog.procyon.org.uk> Date: Thu, 23 May 2024 14:36:29 +0100 Message-ID: <575953.1716471389@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 Jarkko Sakkinen wrote: > There's no reason to encode OID_TPMSealedData at run-time, as it never > changes. > > Replace it with the encoded version, which has exactly the same size: > > 67 81 05 0A 01 05 > > Include OBJECT IDENTIFIER (0x06) tag and length as the epilogue so that > the OID can be simply copied to the blob. This seems reasonable. We have a limited set of OIDs we can generate (currently 1). Better to store the BER-encoded form and copy that in rather than trying to turn a pretty-printed OID into the BER encoding unless we absolutely have to. David