@@ -372,6 +372,15 @@ psa_status_t psa_get_key_information(psa_key_handle_t handle,
372
372
/**
373
373
*
374
374
* Format for the domain parameters varies by the key type.
375
+ * - For DSA public keys (#PSA_KEY_TYPE_DSA_PUBLIC_KEY),
376
+ * the `Dss-Parms` format as defined by RFC 3279 §2.3.2.
377
+ * ```
378
+ * Dss-Parms ::= SEQUENCE {
379
+ * p INTEGER,
380
+ * q INTEGER,
381
+ * g INTEGER
382
+ * }
383
+ * ```
375
384
* Must call before import key. If you want, you can call before generate key
376
385
* or use extra to pass the domain parameters.
377
386
*
@@ -424,19 +433,8 @@ psa_status_t psa_get_key_domain_parameters(uint8_t *data,
424
433
* coefficient INTEGER, -- (inverse of q) mod p
425
434
* }
426
435
* ```
427
- * - For DSA private keys (#PSA_KEY_TYPE_DSA_KEYPAIR), the format
428
- * is the non-encrypted DER encoding of the representation used by
429
- * OpenSSL and OpenSSH, whose structure is described in ASN.1 as follows:
430
- * ```
431
- * DSAPrivateKey ::= SEQUENCE {
432
- * version INTEGER, -- must be 0
433
- * prime INTEGER, -- p
434
- * subprime INTEGER, -- q
435
- * generator INTEGER, -- g
436
- * public INTEGER, -- y
437
- * private INTEGER, -- x
438
- * }
439
- * ```
436
+ * - For DSA private keys (#PSA_KEY_TYPE_DSA_KEYPAIR), the format is a
437
+ * representation of the private key `x` as a big-endian byte string.
440
438
* - For elliptic curve key pairs (key types for which
441
439
* #PSA_KEY_TYPE_IS_ECC_KEYPAIR is true), the format is
442
440
* a representation of the private value as a `ceiling(m/8)`-byte string
@@ -506,21 +504,8 @@ psa_status_t psa_export_key(psa_key_handle_t handle,
506
504
* modulus INTEGER, -- n
507
505
* publicExponent INTEGER } -- e
508
506
* ```
509
- * - For DSA public keys (#PSA_KEY_TYPE_DSA_PUBLIC_KEY),
510
- * the `subjectPublicKey` format is defined by RFC 3279 §2.3.2 as
511
- * `DSAPublicKey`,
512
- * with the OID `id-dsa`,
513
- * and with the parameters `DSS-Parms`.
514
- * ```
515
- * id-dsa OBJECT IDENTIFIER ::= {
516
- * iso(1) member-body(2) us(840) x9-57(10040) x9cm(4) 1 }
517
- *
518
- * Dss-Parms ::= SEQUENCE {
519
- * p INTEGER,
520
- * q INTEGER,
521
- * g INTEGER }
522
- * DSAPublicKey ::= INTEGER -- public key, Y
523
- * ```
507
+ * - For DSA public keys (#PSA_KEY_TYPE_DSA_PUBLIC_KEY), the format is a
508
+ * representation of the public key `Y` as a big-endian byte string.
524
509
* - For elliptic curve public keys (key types for which
525
510
* #PSA_KEY_TYPE_IS_ECC_PUBLIC_KEY is true),
526
511
* the format is defined by RFC 3279 §2.3.5 as
@@ -2265,6 +2250,12 @@ typedef struct {
2265
2250
* specifying the public exponent. The
2266
2251
* default public exponent used when \p extra
2267
2252
* is \c NULL is 65537.
2253
+ * - For an DSA key (\p type is
2254
+ * #PSA_KEY_TYPE_DSA_KEYPAIR), \p extra is an
2255
+ * optional structure specifying the key domain
2256
+ * parameters. The key domain parameters can also be
2257
+ * provided by psa_set_key_domain_parameters(),
2258
+ * which documents the format of the structure.
2268
2259
* \param extra_size Size of the buffer that \p extra
2269
2260
* points to, in bytes. Note that if \p extra is
2270
2261
* \c NULL then \p extra_size must be zero.
0 commit comments