You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -49,7 +47,7 @@ You sign the CSR with your private key; this proves to the CA that you have cont
49
47
50
48
## Certificate requirements
51
49
52
-
A signing certificate and key (credentials) must conform to the requirements in the [C2PA specification Trust Model section](https://c2pa.org/specifications/specifications/2.1/specs/C2PA_Specification.html#_trust_model). The certificate must:
50
+
A signing certificate and key (credentials) must conform to the requirements in the [C2PA specification X.509 Certificates section](https://c2pa.org/specifications/specifications/2.1/specs/C2PA_Specification.html#x509_certificates); specifically, it must:
53
51
54
52
- Follow the public key infrastructure (PKI) X.509 V3 specification.
55
53
- Have the Key Usage (KU) extension, which must be marked as critical.
@@ -70,6 +68,8 @@ If you want the C2PA [Verify tool](https://verify.contentauthenticity.org/) to d
70
68
71
69
The following table describes the signature algorithms and types that the CAI SDK supports. You must supply credentials (certificates and keys) that correspond to the signing algorithm (`signatureAlgorithm`). Signing/validation will fail if the the supplied credentials don't support the signature type.
72
70
71
+
This table is provided for convenience, and is based on information in the [C2PA specification](https://c2pa.org/specifications/specifications/2.1/specs/C2PA_Specification.html#x509_certificates). The specification is authoritative; refer to it for more details. The C2PA specification also covers two other certificates for timestamp responses and OCSP certificate revocation, which are not covered here.
|`ecdsa-with-SHA256`| ECDSA with SHA-256 | ES256<sup>\*</sup> |[RFC 5758 section 3.2](https://www.rfc-editor.org/rfc/rfc5758.html#section-3.2)|
@@ -85,8 +85,6 @@ The following table describes the signature algorithms and types that the CAI SD
85
85
86
86
<sup>*</sup> ES256, ES384, and ES512 signatures must be in IEEE P1363 format.
87
87
88
-
---
89
88
90
-
The information in this table is based on the [C2PA specification Trust Model section](https://c2pa.org/specifications/specifications/2.1/specs/C2PA_Specification.html#_trust_model). The C2PA specification also covers two other certificates for timestamp responses and OCSP certificate revocation, which are not covered here.
Copy file name to clipboardExpand all lines: docs/signing/index.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,9 @@ Be sure to read [Getting started](getting-started.mdx#signing-and-certificates)
9
9
10
10
As you're developing an application that uses the CAI SDK, there are three ways to sign manifest claims, depending on where you are in your development process:
11
11
1.**Initial prototyping and development**: Use the test certificates and keys included with the SDK libraries to sign claims. These certs and keys are provided for convenience, but aren't valid for actual signing. For more information, see [Using test certificates](test-certs.md).
12
-
1.**Local/internal testing**: Once your code is working with the test certs and keys:
13
-
-[Purchase your own certificate](get-cert.md) from a certificate authority (CA).
14
-
- Then your application can[use the certificate and key *locally*](local-signing.md) (directly from the file system) to sign manifest claims; however, this is NOT safe in production.
12
+
1.**Local/internal testing**: Once your code is working with the test certs and keys, you can move on to:
13
+
-[Purchase your own certificate](get-cert.md) from a certificate authority (CA).
14
+
- Change your application to[use the certificate and key *locally*](local-signing.md) (directly from the file system) to sign manifest claims; however, this is NOT safe in production.
15
15
1.**Production testing/deployment**: To secure your private key for use in a publicly-accessible production application, store it in a hardware security module (HSM) or key management service (KMS) where your application can access it securely .
Copy file name to clipboardExpand all lines: docs/signing/local-signing.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,9 +13,7 @@ Trust lists connect the end-entity certificate that signed a manifest back to th
13
13
14
14
The simplest way to add a C2PA manifest to an asset file and sign it is by using C2PA Tool (`c2patool`). You can run C2PA Tool manually from the command line (for example, during development) and more generally from any executable program that can call out to the shell, such as a Node.js application as shown in the [c2patool Node.js service example](../c2pa-node-example).
15
15
16
-
Similarly, using the Rust SDK, you can [add a manifest to an asset file](https://docs.rs/c2pa/latest/c2pa/#example-adding-a-manifest-to-a-file), referencing the certificate and private key file. For a simple example of creating and signing a manifest from a C program, see the [c2c2pa repository](https://github.com/contentauth/c2c2pa).
17
-
18
-
The prerelease libraries for [Node.js](../c2pa-node), [Python](../c2pa-python), and [C++/C](../c2pa-c) can also add and sign a manifest.
16
+
Similarly, using the Rust SDK, you can [add a manifest to an asset file](https://docs.rs/c2pa/latest/c2pa/#example-adding-a-manifest-to-a-file), referencing the certificate and private key file. The prerelease libraries for [Node.js](../c2pa-node), [Python](../c2pa-python), and [C++/C](../c2pa-c) can also add and sign a manifest.
19
17
20
18
:::warning Warning
21
19
Accessing a private key and certificate directly from the file system is fine during development, but doing so in production is not secure. Instead use a Key Management Service (KMS) or a hardware security module (HSM) to access the certificate and key; For more information, see [Using a certificate in production](prod-cert.mdx).
Copy file name to clipboardExpand all lines: docs/signing/prod-cert.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ Some useful references for handling keys and certificates include:
22
22
23
23
## Pre-production steps
24
24
25
-
Because using a KMS can be complex, you may want to start by using a local "mock" service such as LocalStack (for Amazon KMS). Doing this enables you to test your code before you set up a production KMS.
25
+
Because using a KMS can be complex, you may want to start by using a local "mock" service (such as LocalStack for Amazon KMS) as illustrated in the [c2pa-python-example](c2pa-python-example/readme.md#using-localstack). Doing this enables you to test your code before you set up a production KMS.
26
26
27
27
You can also create a self-signed certificate for development purposes. The resulting manifests signed with this certificate won't be trusted, but you can use it to run the application to see how it works before purchasing a real certificate from a CA.
Copy file name to clipboardExpand all lines: docs/signing/test-certs.md
+9-8Lines changed: 9 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,17 +3,18 @@ id: test-certs
3
3
title: Using test certificates
4
4
---
5
5
6
-
For development and testing, C2PA Tool, the Rust library, and the CAI prerelease libraries include one or more [test certificates](signing-certs.md#test-certificates) and private keys for use during development. While these test certificates and keys are useful during development and testing, for production deployment you must use your own private key and certificate.
7
-
8
-
The [Rust library `sdk/tests/fixtures/certs/` folder](https://github.com/contentauth/c2pa-rs/tree/main/sdk/tests/fixtures/certs) contains certificates and signing keys for many of the supported signature types [described below](prod-cert.mdx#signature-types).
9
-
10
-
The CAI prerelease libraries also provide a subset of test certificates in each repository's `tests/fixtures` folder. The Node.js library even provides a [`CreateTestSigner()`](https://github.com/contentauth/c2pa-node/blob/main/docs/README.md#createtestsigner) convenience function to create a local signer instance using the test certificate.
11
-
12
6
The CAI SDK does not allow you to use a self-signed certificate to sign a manifest.
13
7
8
+
For initial development and testing, the SDK provides example *test certificates* and private keys:
9
+
- The [Rust library `sdk/tests/fixtures/certs/` folder](https://github.com/contentauth/c2pa-rs/tree/main/sdk/tests/fixtures/certs) contains certificates and signing keys for many of the supported [signature types](get-cert.md#signature-types).
10
+
- The prerelease libraries (Node.js, Python, and C++) provide a subset of test certificates in each repository's `tests/fixtures` folder. The Node.js library even provides a [`CreateTestSigner()`](https://github.com/contentauth/c2pa-node/blob/main/docs/README.md#createtestsigner) convenience function to create a local signer instance using the test certificate.
11
+
14
12
:::warning Warning
15
-
The test certificates are for use during development and testing only. Do not use them in production!
13
+
While these test credentials are useful during development, you must [get your own certificate](get-cert.md) and use your own private key for production deployment.
16
14
:::
17
15
18
-
Although not recommended due to complexity and difficulty, you can create your own certificates for development and testing. Follow the requirements in the C2PA Technical Specification [Credential Types](https://c2pa.org/specifications/specifications/1.4/specs/C2PA_Specification.html#_credential_types) and [Digital Signatures](https://c2pa.org/specifications/specifications/1.4/specs/C2PA_Specification.html#_digital_signatures) sections.
16
+
Although not recommended due to complexity and difficulty, you can create your own certificates for development and testing. Follow the requirements in the C2PA Technical Specification [X.509 Certificates](https://c2pa.org/specifications/specifications/2.1/specs/C2PA_Specification.html#x509_certificates) and [Digital Signatures](https://c2pa.org/specifications/specifications/2.1/specs/C2PA_Specification.html#_digital_signatures) sections.
17
+
18
+
For manifest claims signed with one of the test certificates, the C2PA Verify tool will display the message "The Content Credential issuer couldn't be recognized." See [Using the Verify tool](../verify.mdx#signing-information) for more information.
Copy file name to clipboardExpand all lines: docs/verify.mdx
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -166,9 +166,9 @@ For example, suppose you downloaded a file from Adobe Stock and renamed it `my_s
166
166
}
167
167
```
168
168
169
-
**Signing information**
169
+
#### Signing information
170
170
171
-
If the Content Credential was signed by a certificate that is NOT on the [known certificate list](verify-known-cert-list), such as the CAI test certificate in the SDK, then Verify displays "Unrecognized" at the top of this section with this notice:
171
+
If the Content Credential was signed by a certificate that is NOT on the [known certificate list](verify-known-cert-list), such as one of the SDK's [test certificates](signing/test-certs.md), then Verify displays "Unrecognized" at the top of this section with this notice:
However, if the Content Credential was signed by a certificate on the [known certificate list](verify-known-cert-list), then this section displays the name of the issuer of the claim signature from the `signature_info.issuer` property in the active manifest, as shown in the example snippet below. It shows the organization name only if the signing certificate includes the "O" or [Organization Name attribute](https://www.alvestrand.no/objectid/2.5.4.10.html) (OID value 2.5.4.10) in the certificate's distinguished name information.
180
+
However, if the Content Credential was signed by a certificate on the [known certificate list](verify-known-cert-list), then this section displays the name of the issuer of the claim signature from the `signature_info.issuer` property in the active manifest, as shown in the example snippet below.
181
+
182
+
:::note
183
+
This section shows the organization name only if the signing certificate includes the "O" or [Organization Name attribute](https://www.alvestrand.no/objectid/2.5.4.10.html) (OID value 2.5.4.10) in the certificate's distinguished name information.
184
+
:::
181
185
182
186
For signers on the known certificate list, this section also displays the time of the claim signature from the `signature_info.time` property in the active manifest, as shown in the example snippet below. The date is converted from UTC to the local time zone.
0 commit comments