From mboxrd@z Thu Jan 1 00:00:00 1970 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 B06EE14A4D9 for ; Thu, 23 May 2024 13:36:41 +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=1716471403; cv=none; b=DP3e3f9VT53+VAWLjS0wjWB1/BpxRVcItTl4KEhXNlRTFkCkCeZQdkn/vV++e/Me4MIY2ovtXLw5oyXJbLS8t3pJnBoI8YKriNl7+tCwtPLsXlUB3AW11dlPq08pq1MCI4x1m0loyBQrnYalKnPNFWSNC80HCeb4XIyjh7GBGGA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716471403; c=relaxed/simple; bh=CM8wHWsQhb6nBkI5sT6VghNmVLSsK1SRVpym/X9/WnE=; h=From:In-Reply-To:References:To:Cc:Subject:MIME-Version: Content-Type:Date:Message-ID; b=jgKJAbVZpFL0S1824foEzcD3XNDqVWIdpouQaaWrW/+xcqoCQJyBLuT6/902uTjCjPRvk5UVvNrrLsb5Ue0BZ0mQM2AlBcj/4CIlzt5gEe/oKmSgRlGsKaiHL/baOq8enqAhhK/6OkQ1RO8W24/4wNCWjflovYQvudXGsg17uZU= 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=gDIedIMu; 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="gDIedIMu" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1716471400; 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=gDIedIMunF38FLqoEGUzYXnsm3KiOib71KwBhg2KTP9S7i8kFmuYfLhSBAfuWk4ej6koam W6JWpqglYUOcQpp9QWwFuSZ/bZydkpelD5JUT6iqu4psNiGAHH95wd0zY2q2hIRqu140yx B11QIh6KhtBB0VXVLhYNjvbcmv9hJes= 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-kernel@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