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.129.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 DAFBC35FF72 for ; Fri, 30 Jan 2026 11:20:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769772030; cv=none; b=lzCdIg71GrSe/zo1U41iSdtcG6MJFhbRa+DxsYnx4RxBa5PD7ikwimwSrHZweTy07KZU7B6AJAIAb8aQkcepbvaSGjxZIcOSlU+ZMyDomcKD0eMXiItmBmChcyrFTr5tlomdervuBJHqkjniLVxlwEI2ZtNGW6FDc1E9RAToBB0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769772030; c=relaxed/simple; bh=zdaxgBWHfOjQ1zh3GrG3YLN/+zyFU3lbY6MfKIPUukw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kLDkNI0VY7hvG5UyZ+oga2c3q3619Mh5JQ9iOWD30LqB9CbR/sXeHpDAXW/nO37jBkX1O7POGy8Dmxng00AA3pDJwywXQsNOsjE3ZvCRU6y+9wllcgseBhUb4IUHvgeNPJiW07Xn1O2Qexo7wRjEBODIcZMmPZS4cp0xLu+aUM8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine 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=VRvQ2HJK; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=TOlX2r+l; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine 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="VRvQ2HJK"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="TOlX2r+l" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769772028; 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=Qi7R1t4hPvfEKk8VW4gjKJE0vso+HGJ4y2WhvsIHDuc=; b=VRvQ2HJK1IbT7QLP28euYCxozgQ/TwfyAGI3KvyhsHguf8jCGEU5OPnWTCLUJVRfCIm1Pc FGXqiRJtZwdToE9iULIZtMBjTVTKbUGPPKpqlSMG8IDmVivavTeprTjhx+mmAf8rPagv5D SudMFBSsIr+a5SuhrDbooj7trHC2z4M= Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-467-5abO7HO7OYGe3FuIRppLhg-1; Fri, 30 Jan 2026 06:20:26 -0500 X-MC-Unique: 5abO7HO7OYGe3FuIRppLhg-1 X-Mimecast-MFC-AGG-ID: 5abO7HO7OYGe3FuIRppLhg_1769772026 Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-2a13be531b2so20304495ad.2 for ; Fri, 30 Jan 2026 03:20:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1769772026; x=1770376826; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Qi7R1t4hPvfEKk8VW4gjKJE0vso+HGJ4y2WhvsIHDuc=; b=TOlX2r+l305YUCPNU5nTuFbsbGNAzRCRbdczHGrnIRQzV9y8iMAg8KONhHzFWcE8Zq 98R2GNKoCLJh6GGlaGC+Az62ptbFqkNhmEZWyKvuuWxl8ko/MJglOVlvtC/uymMR7mB6 WCSdRZL1iKyEPZPDD05dtKbIFNpDXTx14x3BT1PSKQ5cki9xMropIDIU5ntq1ZamJvxe Bk26peZnfPiUeWQq5mm3nKIGByadfO0YVbXp9EOGfu/tpVKsgODKXbVsovoEjXNgWy1t pdXBD6PBDUoVnrp0rQb3BBnUrLajJvufZaCqGFZTevEee8UBEscoYllpyflT710lv/fe T9dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769772026; x=1770376826; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Qi7R1t4hPvfEKk8VW4gjKJE0vso+HGJ4y2WhvsIHDuc=; b=tWjBBngNnqlyrLsmlL/j94Jlf12NvWvxUiXvZyR6Q7qlSHQVNz57v85QO6QP7JBg8w RoPgUNwlEj3fcQjnK6yojLP7tOCX9Ji4d+s3lddC0wXarw6UYhTwlDRCRvQ7+Efif5/A WAPjjQ5sC2ysw3Ge+RmWXkS7NN4QYC5Df62h4Up7l7tPVWwwi6ylpPgtprtqOBXSqaYF tixVOhe2Msy4YlDD8IerPiCCaiWCTHA0w9jtxbk5VkH70jetrfR+0N5HetrQZ+BGhgSG 1InoK2g13SMBCIP8PXrNf521oJrWkHvXT6aDMF/OAUUzMp4HLhmv2HRcShijv1jNj4ae j+9A== X-Forwarded-Encrypted: i=1; AJvYcCU7NE4mqSuupUqsT5KSbICDo4DOYl6MvpHgOjcqX+8cR0tdpdoc1NoKiErVnDqWSrt9juERlQEMGd9OQrw=@vger.kernel.org X-Gm-Message-State: AOJu0YzXVXkOhgq22keKH43UPkSWaomQoqaISowrRBsxHBM38840e+EP nW2Kv8ac0V5SbaW3HYlaCfUGq4QZK/EkJ3vEVS+6j6mktMzOMhWob+kvrUvQGYb4PblRqhPJ9M1 13ZjLM9oGFw6qWazbh4OXftLPQaiD5yCYBH1ImhYl9WxZCYT9DbgHXuOSZA11ZJHYJw== X-Gm-Gg: AZuq6aLmtoQ27IAKHvolFYuALiXWt8ytFsPxvkEq5sFMTdVwXbGWju+c3oMVwYl7I2I NNglUb1TUpq5luPFaX+XRjSJ1ORrIpgY951ONH2zAeHVAfPSubDtuQXsmvKAkqbuEzBvUPn1ZJQ jXCOHlIuNJQThzw9DWa3hX1X9ESQYLNyTqNeaWvKku3vO/B/+UCMutw68X9zxowEePbKI5EcaPs EfrYdSwRxsyztpYx63NLgICIWGcDyXXJxS/1n3y1wxMJoPxqTQ/VG/RHqUb6ollV6GXNshy/FT8 5B/eMEwRZcQGLaMSE1E9TBD3WZM2t3DhftiVpXlFNnTsB+LVYNADGg3dJrh+gjEmJp9LpjmYjoG 7 X-Received: by 2002:a17:903:b0b:b0:2a0:d46d:f990 with SMTP id d9443c01a7336-2a8d992f0c2mr25748535ad.31.1769772025495; Fri, 30 Jan 2026 03:20:25 -0800 (PST) X-Received: by 2002:a17:903:b0b:b0:2a0:d46d:f990 with SMTP id d9443c01a7336-2a8d992f0c2mr25748205ad.31.1769772024877; Fri, 30 Jan 2026 03:20:24 -0800 (PST) Received: from localhost ([209.132.188.88]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a88b3eedd0sm72565075ad.3.2026.01.30.03.20.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jan 2026 03:20:24 -0800 (PST) Date: Fri, 30 Jan 2026 19:17:16 +0800 From: Coiby Xu To: David Howells Cc: Mimi Zohar , Simo Sorce , Roberto Sassu , Dmitry Kasatkin , Eric Snowberg , Eric Biggers , linux-integrity@vger.kernel.org, linux-crypto@vger.kernel.org, keyrings@vger.kernel.org, linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: IMA and PQC Message-ID: References: <1783975.1769190197@warthog.procyon.org.uk> 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; format=flowed Content-Disposition: inline In-Reply-To: <1783975.1769190197@warthog.procyon.org.uk> Hi David, Thanks for starting the discussion on potential issues or challenges for IMA PQC support! On Fri, Jan 23, 2026 at 05:43:17PM +0000, David Howells wrote: >Hi Mimi, > >I've posted patches which I hope will accepted to implement ML-DSA module >signing: > > https://lore.kernel.org/linux-crypto/1753972.1769166821@warthog.procyon.org.uk/T/#t > >but for the moment, it will give an error to pkcs7_get_digest() if there's no >digest available (which there won't be with ML-DSA). This means that there >isn't a hash for IMA to get at for TPM measurement. > >Now, I probably have to make a SHA256 hash anyway for UEFI blacklisting >purposes, so that could be used. Alternatively, we can require the use of >authenticatedAttributes/signedAttrs and give you the hash of that - but then >you're a bit at the mercy of whatever hashes were used. IMA also uses pkcs7_get_digest mainly for the purpose of checking if the digest has been blacklisted:) So you making a SHA256 hash for UEFI blacklisting will automatically resolve this issue. > >Further, we need to think how we're going to do PQC support in IMA - >particularly as the signatures are so much bigger and verification slower. According to my experiments done so far, for verification speed, ML-DSA-65 is consistently faster than ECDSA P-384 which is used by current CentOS/RHEL to sign files in a package. The size of a single ML-DSA-65 signature indeed increases dramatically compared with ECDSA P-384 (3309 bytes vs ~100 bytes). But I'm not sure it can be a big problem when considering the storage capacity. Take latest fresh CentOS Stream 10 x86_64 KVM guest as example, without any file system optimization, extra ~189MB disk space is needed if all files in /usr signed using by ML-DSA-65 where the disk size is 50G. But I don't have enough experience to tell how users will perceive it and I'll try to collect more feedback. For the details of my experiments, you can check https://gist.github.com/coiby/41cf3a4d59cd64fb19d35b9ac42e4cd7 And here's the tldr; version, - Verification Speed: ML-DSA-65 is consistently ~10-12% faster at verification than ECDSA P-384 when verifying all files in /usr; ML-DSA-65 is 2.5x or 3x faster by "openssl speed" - Signing Speed: ML-DSA-65 appears ~25-30% slower when signing all files in /usr; ML-DSA-65 is 4x or 4.8x slower by "openssl speed" - Storage overhead: For ML-DSA-65, /usr will increase by 189MB and 430MB when there are 27346 and 58341 files respectively. But total size of pure IMA signatures are estimated (files x (3309+20) bytes) to be ~87MB and ~185MB respectively. >Would ML-DSA-44 be acceptable? Should we grab some internal state out of >ML-DSA to use in lieu of a hash? According to https://www.ietf.org/archive/id/draft-salter-lamps-cms-ml-dsa-00.html ML-DSA-44 is intended to meet NIST's level 2 security category. Will NIST level 2 meet users' security requirements? > >David > > -- Best regards, Coiby