[lamps] Proposal for PBMAC1 in PKCS#12

Hubert Kario <hkario@redhat.com> Wed, 22 June 2022 10:35 UTC

Return-Path: <hkario@redhat.com>
X-Original-To: spasm@ietfa.amsl.com
Delivered-To: spasm@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id EC2EAC14F72A for <spasm@ietfa.amsl.com>; Wed, 22 Jun 2022 03:35:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.85
X-Spam-Level:
X-Spam-Status: No, score=-2.85 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.745, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SUoVkWIllSCW for <spasm@ietfa.amsl.com>; Wed, 22 Jun 2022 03:35:29 -0700 (PDT)
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 ietfa.amsl.com (Postfix) with ESMTPS id 3383BC14F726 for <spasm@ietf.org>; Wed, 22 Jun 2022 03:35:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655894127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5MYBKQe5geQowS2U+yfJ+mqK5eJu4gc/WTBrLhelO4w=; b=JK3IA7FuuYzlkYpawQGovz0KKsOLHyMjfut4zF3nPQzEcY2BRJlj8zCdv/uqKZAQH0tyMG PVF8M0KFbaeqv5ir67yZDHh90PvylpKyWKYH9VXzYObhLZHxdHFX5qTZB2qx4+6nBC1WDq cdYzDoYZJjjbERKNKj6G11fxlz2cwhU=
Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-149-PKkrKqqKPPejWB8S3A25JA-1; Wed, 22 Jun 2022 06:35:26 -0400
X-MC-Unique: PKkrKqqKPPejWB8S3A25JA-1
Received: by mail-ed1-f69.google.com with SMTP id y18-20020a056402441200b0043564cdf765so10665952eda.11 for <spasm@ietf.org>; Wed, 22 Jun 2022 03:35:26 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:mime-version:message-id :organization:user-agent:content-transfer-encoding; bh=5MYBKQe5geQowS2U+yfJ+mqK5eJu4gc/WTBrLhelO4w=; b=fDCVLgsPJwOHmeQGKVuYGKLx0ZSBK50Al9BIzF6O20ag2yOBabOlxBhePZP/AJP9il vPC5AktK+qiOhvq3txM8yV9Xaw/o5M5m/wZ4LRjmkd4MgRirOKmyEf1Ftf7VMrTHMVN5 gq8Z81S2yKoiXoW8PNyMCqavhukjxvuzIcTg6R1Kj72sp789cXaWiKhHHgacf0DBudxL U21d0/RN70cRXd9j8oEPKocpuxNctcw0nsb4h6uIBOb4pnxof+C6lr0LyRW/kmmI+Ay0 gdYBt2tgGJYSiz+X6mh0v3v8Sjc8D7N5jmxGwxXfO3pt16/MICbYngOSp5YfCMDez0YF Ij/Q==
X-Gm-Message-State: AJIora+CqANwvV0nF8GMoBvCKQ3e5TTqikMpjCnOYDrUuXBaKNLf5yxJ 0TsIMu1lD9MD+Eq3QTJlGCYMU+PZXjEtUf514dMZxqlRGnidY42j+X4ujyy8HZC8eqJRUnAkhwx XasuqlNDG8hiVg25SEjfH0fGnVSouRz0Bl69qdc/hPfEb13Idlv4qHI4=
X-Received: by 2002:a17:906:5047:b0:710:456a:695e with SMTP id e7-20020a170906504700b00710456a695emr2408521ejk.433.1655894125432; Wed, 22 Jun 2022 03:35:25 -0700 (PDT)
X-Google-Smtp-Source: AGRyM1suY/aA120M2pZUSsLq9FEYWFbh1Waj7V2og0+wr1XZEqWlxDzfHNIDVWxSYaWBJI4Hx9cI/A==
X-Received: by 2002:a17:906:5047:b0:710:456a:695e with SMTP id e7-20020a170906504700b00710456a695emr2408502ejk.433.1655894125113; Wed, 22 Jun 2022 03:35:25 -0700 (PDT)
Received: from localhost (ip-94-112-13-200.net.upcbroadband.cz. [94.112.13.200]) by smtp.gmail.com with ESMTPSA id n23-20020a170906089700b006f3ef214e13sm8672322eje.121.2022.06.22.03.35.24 for <spasm@ietf.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jun 2022 03:35:24 -0700 (PDT)
From: Hubert Kario <hkario@redhat.com>
To: spasm@ietf.org
Date: Wed, 22 Jun 2022 12:35:23 +0200
MIME-Version: 1.0
Message-ID: <c282cba9-f6ae-4412-8e93-0810cffb16f2@redhat.com>
Organization: Red Hat
User-Agent: Trojita/0.7-git; Qt/5.15.2; xcb; Linux; Fedora release 34 (Thirty Four)
Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=hkario@redhat.com
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/spasm/bAYhkH3_v1k6vOpxL0ktERvg84I>
Subject: [lamps] Proposal for PBMAC1 in PKCS#12
X-BeenThere: spasm@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "This is a venue for discussion of doing Some Pkix And SMime \(spasm\) work." <spasm.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/spasm>, <mailto:spasm-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/spasm/>
List-Post: <mailto:spasm@ietf.org>
List-Help: <mailto:spasm-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/spasm>, <mailto:spasm-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Jun 2022 10:35:30 -0000

Hello everybody,

The work on the new NIST FIPS 140-3 implementations made us aware that the
current PKCS #12 specification uses a legacy PBKDF for the calculation
of the whole-file MAC value: PBKDF1. The PKCS #12 standard also doesn't
provide a way to specify any alternative KDF. Since PBKDF1 isn't an 
approved mechanism in FIPS, the whole file becomes FIPS non-compliant.

While deciding how to modify the PFX structure we considered two options:
change the structure completely, so that the whole macData is extensible
and allows for use of PBMAC1, or by placing the PBMAC1 as as "hash"
in the existing structure. The first option is much cleaner, but it has
the unintended consequence of making the file completely unreadable by
any of the popular software able to process PKCS#12 files that exists now.
The second option does on the other hand create files that even
old versions of OpenSSL (like 1.0.1) can read when the user specifies the
-nomacver option. Allowing for a relatively easy workaround for 
interoperability with old systems.

With those two things in mind I'd like to propose the following I-D
to specify use of PBMAC1 in PKCS#12:
https://datatracker.ietf.org/doc/draft-kario-pkcs12-pbmac1/
-- 
Regards,
Hubert Kario
Principal Quality Engineer, RHEL Crypto team
Web: www.cz.redhat.com
Red Hat Czech s.r.o., Purkyňova 99/71, 612 45, Brno, Czech Republic