Skip to content

Commit 647a74b

Browse files
committed
Add Prior Art section to Introduction
1 parent 47215f1 commit 647a74b

File tree

1 file changed

+111
-14
lines changed

1 file changed

+111
-14
lines changed

draft-lundberg-cose-two-party-signing-algs.md

Lines changed: 111 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,25 @@ informative:
8383
- fullname: Zhenfei Zhang
8484
date: 2017
8585
FIPS-201:
86+
target: https://csrc.nist.gov/pubs/fips/201-3/final
87+
title: 'Personal Identity Verification (PIV) of Federal Employees and Contractors'
88+
author:
89+
- org: National Institute of Standards and Technology
90+
date: 2022
91+
FIPS-204:
92+
target: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.204.pdf
93+
title: Module-Lattice-Based Digital Signature Standard
94+
author:
95+
- org: National Institute of Standards and Technology
96+
date: August 2024
97+
FIPS-186-5:
98+
target: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf
99+
title: Digital Signature Standard (DSS)
100+
author:
101+
- org: National Institute of Standards and Technology
102+
date: February 2023
103+
I-D.COSE-Hash-Envelope: I-D.draft-ietf-cose-hash-envelope
104+
NIST-SP-800-73-5:
86105
target: https://doi.org/10.6028/NIST.SP.800-73pt2-5
87106
title: 'Interfaces for Personal Identity Verification: Part 2 – PIV Card Application Card Command Interface'
88107
author:
@@ -98,19 +117,6 @@ informative:
98117
org: National Institute of Standards and Technology, Gaithersburg, MD
99118
date: 2024
100119
refcontent: NIST Special Publication (SP) NIST SP 800-73pt2-5
101-
FIPS-204:
102-
target: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.204.pdf
103-
title: Module-Lattice-Based Digital Signature Standard
104-
author:
105-
- org: National Institute of Standards and Technology
106-
date: August 2024
107-
FIPS-186-5:
108-
target: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf
109-
title: Digital Signature Standard (DSS)
110-
author:
111-
- org: National Institute of Standards and Technology
112-
date: February 2023
113-
I-D.COSE-Hash-Envelope: I-D.draft-ietf-cose-hash-envelope
114120
PKCS11-Spec-v3.1:
115121
target: https://docs.oasis-open.org/pkcs11/pkcs11-spec/v3.1/os/pkcs11-spec-v3.1-os.html
116122
title: 'PKCS #11 Specification Version 3.1.'
@@ -183,7 +189,7 @@ Instead, since most signature algorithms begin with digesting the message
183189
into a fixed-length intermediate input, this initial digest can be computed by the software application
184190
while the HSM performs the rest of the signature algorithm on the digest.
185191
This is a common technique used in standards such as OpenPGP [OPENPGPCARD],
186-
PKCS #11 [PKCS11-Spec-v3.1], and PIV [FIPS-201].
192+
PKCS #11 [PKCS11-Spec-v3.1], and PIV [NIST-SP-800-73-5].
187193

188194
Since different signature algorithms digest the message in different ways
189195
and at different stages of the algorithm,
@@ -219,6 +225,96 @@ but Ed25519ph and Ed25519ph-split use the same verification algorithm.
219225

220226
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
221227

228+
229+
## Prior Art
230+
231+
Split signing is a common technique used in existing smart card standards.
232+
The following subsections expand on how the technique is applied in OpenPGP [OPENPGPCARD],
233+
PKCS #11 [PKCS11-Spec-v3.1], and PIV [NIST-SP-800-73-5].
234+
235+
236+
### OpenPGP
237+
238+
The OpenPGP smart card protocol [OPENPGPCARD]
239+
defines the format of signing commands in section "7.2.10 PSO: COMPUTE DIGITAL SIGNATURE":
240+
241+
>**7.2.10 PSO: COMPUTE DIGITAL SIGNATURE**
242+
>
243+
>The command for digital signature computation is shown in the table below.
244+
>The hash value (ECDSA) or the DigestInfo is delivered in the data field of the command. \[...\]
245+
246+
The "Data field" parameter is subsequently defined as "Data to be integrated in the DSI: hash value (ELC) or DigestInfo (RSA)".
247+
Thus both ECDSA and RSA signatures are computed jointly by the host computing the digest of the signed data
248+
and the smart card finalizing the signature on the digest;
249+
the host acts as _digester_ and the smart card acts as _signer_.
250+
251+
Some OpenPGP smart card implementations also support Ed25519 signatures;
252+
however no public specification of this protocol is known.
253+
254+
255+
### PKCS #11
256+
257+
PKCS #11 [PKCS11-Spec-v3.1]
258+
defines signing commands in sections "5.13 Signing and MACing functions" and "5.14 Message-based signing and MACing functions".
259+
These sections define `C_SignInit` and `C_MessageSignInit` functions that both take a `pMechanism` parameter indicating the signature mechanism.
260+
Mechanisms are defined in section "6 Mechanisms", which notably includes the subsections
261+
"6.3.12 ECDSA without hashing" and "6.3.13 ECDSA with hashing":
262+
263+
>**6.3.12 ECDSA without hashing**
264+
>
265+
>\[...\]
266+
>
267+
>The ECDSA without hashing mechanism, denoted **CKM_ECDSA**, is a mechanism for single-part signatures and verification for ECDSA.
268+
>(This mechanism corresponds only to the part of ECDSA that processes the hash value, which should not be longer than 1024 bits;
269+
>it does not compute the hash value.)
270+
>
271+
>\[...\]
272+
273+
>**6.3.13 ECDSA with hashing**
274+
>
275+
>\[...\]
276+
>
277+
>The ECDSA with SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, SHA3-224, SHA3-256, SHA3-384, SHA3-512 mechanism,
278+
>denoted **CKM_ECDSA_\[SHA1|SHA224|SHA256|SHA384|SHA512|SHA3_224|SHA3_256|SHA3_384|SHA3_512\]** respectively,
279+
>is a mechanism for single- and multiple-part signatures and verification for ECDSA.
280+
>This mechanism computes the entire ECDSA specification, including the hashing with
281+
>SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, SHA3-224, SHA3-256, SHA3-384, SHA3-512 respectively.
282+
>
283+
>\[...\]
284+
285+
Thus PKCS #11 supports both split signing using the **CKM_ECDSA** mechanism
286+
and "non-split" signing using the **CKM_ECDSA_SHA\*** mechanisms;
287+
when using **CKM_ECDSA**,
288+
the PKCS #11 caller acts as _host_ and the Cryptoki implementation acts as _signer_.
289+
290+
291+
### PIV: FIPS-201, NIST SP 800
292+
293+
NIST Special Publication 800 [NIST-SP-800-73-5]
294+
contains technical specifications for the Personal Identity Verification (PIV) standard [FIPS-201],
295+
and defines the format of signing commands in section "3.2.4. GENERAL AUTHENTICATE Card Command":
296+
297+
>**3.2.4. GENERAL AUTHENTICATE Card Command**
298+
>\[...\]
299+
>
300+
>The GENERAL AUTHENTICATE command SHALL be used with the digital signature key ('9C') to
301+
>realize the signing functionality on the PIV client application programming interface. Data to be
302+
>signed is expected to be hashed off-card. Appendix A.4 illustrates the use of the GENERAL
303+
>AUTHENTICATE command for signature generation.
304+
>
305+
>\[...\]
306+
307+
Appendix A.4 gives examples of RSA and ECDSA signature generation commands.
308+
For RSA the command needs to be sent in two parts,
309+
giving the "Data Field" argument first as "'7C' – L1 { '82' '00' '81' L2 {first part of the PKCS #1 v1.5 or PSS padded message hash value }}"
310+
and then "{second and last part of the PKCS #1 v1.5 or PSS padded message hash value}";
311+
for ECDSA the "Data Field" argument is given as "'7C' – L1 { '82' '00' '81' L2 {hash value of message}}".
312+
313+
Thus both ECDSA and RSA signatures are computed jointly by the host computing the digest of the signed data
314+
and the smart card finalizing the signature on the digest;
315+
the host acts as _digester_ and the smart card acts as _signer_.
316+
317+
222318
# Split Signing Algorithms {#split-algs}
223319

224320
This section defines divisions of signing algorithm steps between a _digester_ and a _signer_
@@ -646,6 +742,7 @@ for their reviews of and contributions to this specification.
646742
* Clarified in section "Protocol-Level Trusted Roles" why digester is necessarily trusted.
647743
* Clarified in section "Component-Level Trusted Roles" that redundant forgeries are acceptable,
648744
and added example of key compromise concern for naively hashed FALCON.
745+
* Added "Prior Art" section to Introduction.
649746

650747
-04
651748

0 commit comments

Comments
 (0)