Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp1003542lqp; Thu, 23 May 2024 06:36:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUHGCLAfvkvA53nNjKF/ha/WrmkJshhgYmFvDOqqlUHT6jCod61HbfwMRuvbNCMq872aGJUhfW64cmY/hK6PjBpLCf1sau5kZEffbQ0+g== X-Google-Smtp-Source: AGHT+IHKBVDSm0F6VRaPm4jNhKdtsvVaLqvc9vgKmMbxx1e+8ft+oYRnHzmykEoShyBR2IpwyWiD X-Received: by 2002:a17:90a:bd87:b0:2bd:f712:48c5 with SMTP id 98e67ed59e1d1-2bdf7124a1bmr855970a91.49.1716471405714; Thu, 23 May 2024 06:36:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716471405; cv=pass; d=google.com; s=arc-20160816; b=Xi0ryHEQXCACnpdsotw0IkC02IOa+hezpxgGgcQ1nffWhCkS2fPhmESirD0eMqZOmG ahPMAw0Iov2M0yWYV0TUAlzDZUmaVibMd3CTIsnhDlHV9+XCknC98j1fBzBRqB6VAL9a Qr1o72Hu3L2AnRcENsi6zzyKqCKwgl0mCBg1V8t0lpfvMoyn2HFI05PHOm/SdKTkE979 F4kyeDdVyi+i79AcHp9N4aN6iH+PKVZn+Ikz5x2EzDSs25z36smDNcHQjzLJ7VTHL41I ycooy/mIOoFVzpuwKPqxcoUtif3CiuAfQS3171sbEVSYsHv8PZ2Q+Nb6+E1+2nKZkKrV WuiQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:content-id:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:cc:to:references :in-reply-to:from:organization:dkim-signature; bh=vXxBSHmoAMy4p5FvXFciFTuZOZzNT/zIajI6dPFeaA8=; fh=XeEKl4IwQCUyP1S5go6BVZ7lOwzR2DGcnN9zzzlfoFA=; b=MQ/ToVEnqqkV1TV6GgE8mFHECIp1DxqlofdFfjlw6oiWz2g1H/tP+piuLjxdzfYihI Qz/JNYqKg5Ax3DDuLeCk7a7r4cByNfY43WqeNqgnl+3JaSBCUJawM1uB9OF5wpIQhUCK IdTzxFV2fQZp5bOzPWMcqN3tTjPJDGmht+84kO0AA+YmsyBPagY/CBXq1zYStXF44WkS vkNArray+Tk+0BU2KQSN2S3q2GPKqenjvpQQG6FtNMAWJowbUO/emmv5lxn3ml3dntq2 0brwrLtkaGzGxolDS21LWy+gDIf1ticSWo8Du+Z8l09X5SDgjLCGf1HfW6N+Ye2RHhY0 gXtg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ih0EWF7D; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-crypto+bounces-4350-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-4350-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2bde8d3eca4si678900a91.115.2024.05.23.06.36.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 06:36:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-4350-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ih0EWF7D; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-crypto+bounces-4350-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-4350-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 2AF8C284AB8 for ; Thu, 23 May 2024 13:36:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4A38C14A4FC; Thu, 23 May 2024 13:36:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ih0EWF7D" X-Original-To: linux-crypto@vger.kernel.org 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 B722813C80E for ; Thu, 23 May 2024 13:36:40 +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=1716471402; cv=none; b=PW1mDklnLQ/7lw05ijj0pzjDf8szL6JdvqqjZRrUQEEg/i6Pm4Qf7hPUdKCzlGeUfJ6Waagq39Om08flrKZIBsRovP+wAcqSvX1Vd+dJ4doMPmxusYM+hpmYrFSWLRnvJBlcRQ9vtYSD0RZ4bNZOE6n24MOLRyT14zKz6F2M6HE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716471402; c=relaxed/simple; bh=CM8wHWsQhb6nBkI5sT6VghNmVLSsK1SRVpym/X9/WnE=; h=From:In-Reply-To:References:To:Cc:Subject:MIME-Version: Content-Type:Date:Message-ID; b=ZGijtwVYbVLAb/6VxeZUrUwrcu2VkCO4XimEdQoYND+Yxa/Zil9kxKDb0dcDLeHfObISGzLreQmOIWfEvp8A4U6ufSa3XPrXYXxhUBdwRBjYELpxMMPlza1fhFR+VWM1y3ELyAizkpxLXGwoT32gKGBHZcKgy7FTV88ITVnBdac= 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=ih0EWF7D; 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1716471399; 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=ih0EWF7D+BEpLBwXJQKPHEQjR2mUbGoT+fJzR9Gy6K+X9N43RTVUN87KAhIvgJ4GrC5EkD Cyr66Beq7DG2LHnv0uY5pDYSbhc4GOp0YCGnTnTtt4iPa+KcftkhroGa54MiuQmWhtC+I3 XTcZv3Q88QjBraAwJszbYKVvPRjEjoc= 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-crypto@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