Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: RSA removed, according to #164 #174

Merged
merged 14 commits into from
Feb 29, 2024
92 changes: 62 additions & 30 deletions docs/en/algorithms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,91 +8,123 @@ Cryptographic algorithms
The following algorithms MUST be supported:

.. list-table::
:widths: 20 20 20
:widths: 20 20 20 20
:header-rows: 1

* - **Algorithm**
* - **Algorithm `alg` parameter value**
- **Description**
- **Operations**
- **References**
* - **RS256**
* - **ES256**
- Elliptic Curve Digital Signature Algorithm (ECDSA) using one of the Agreed curves and SHA256.
fmarino-ipzs marked this conversation as resolved.
Show resolved Hide resolved
- Signature
- :rfc:`7518`.
* - **RS512**
- :rfc:`7518`, `[SOG-IS] <https://www.sogis.eu/documents/cc/crypto/SOGIS-Agreed-Cryptographic-Mechanisms-1.3.pdf>`_, `[ETSI] <https://www.etsi.org/deliver/etsi_ts/119300_119399/119312/01.04.03_60/ts_119312v010403p.pdf>`_ .
* - **ES384**
- Elliptic Curve Digital Signature Algorithm (ECDSA) using one of the Agreed curves and SHA384.
fmarino-ipzs marked this conversation as resolved.
Show resolved Hide resolved
- Signature
- :rfc:`7518`.
* - **RSA-OAEP**
- Key Encryption
- :rfc:`7518`.
- :rfc:`7518`, `[SOG-IS] <https://www.sogis.eu/documents/cc/crypto/SOGIS-Agreed-Cryptographic-Mechanisms-1.3.pdf>`_, `[ETSI] <https://www.etsi.org/deliver/etsi_ts/119300_119399/119312/01.04.03_60/ts_119312v010403p.pdf>`_ .
* - **ES512**
- Elliptic Curve Digital Signature Algorithm (ECDSA) using one of the Agreed curves and SHA521.
fmarino-ipzs marked this conversation as resolved.
Show resolved Hide resolved
- Signature
- :rfc:`7518`, `[SOG-IS] <https://www.sogis.eu/documents/cc/crypto/SOGIS-Agreed-Cryptographic-Mechanisms-1.3.pdf>`_, `[ETSI] <https://www.etsi.org/deliver/etsi_ts/119300_119399/119312/01.04.03_60/ts_119312v010403p.pdf>`_ .
* - **RSA-OAEP-256**
- RSA Encryption Scheme with Optimal Asymmetric Encryption Padding (OAEP) using SHA256 hash function and the MGF1 with SHA-256 mask generation function.
- Key Encryption
- :rfc:`7516`.
- :rfc:`7516`, :rfc:`7518`.
* - **A128CBC-HS256**
- AES encryption in Cipher Block Chaining mode with 128-bit Initial Vector value, plus HMAC authentication using SHA-256 and truncating HMAC to 128 bits.
- Content Encryption
- :rfc:`7516`.
- :rfc:`7516`, :rfc:`7518`.
* - **A256CBC-HS512**
- AES encryption in Cipher Block Chaining mode with 256-bit Initial Vector value, plus HMAC authentication using SHA-512 and truncating HMAC to 256 bits.
- Content Encryption
- :rfc:`7516`.
- :rfc:`7516`, :rfc:`7518`.

The following Elliptic Curves MUST be supported for the Elliptic Curve Digital Signature Algorithm:

.. list-table::
:widths: 20 20 20
:header-rows: 1

* - **Curve Family**
- **Short Curve Name**
- **References**
* - **Brainpool**
- brainpoolP256r1, brainpoolP384r1, brainpoolP512r1.
- :rfc:`5639`, `[ETSI] <https://www.etsi.org/deliver/etsi_ts/119300_119399/119312/01.04.03_60/ts_119312v010403p.pdf>`_ .
* - **NIST**
- P-256, P-384, P-521
- `[ETSI] <https://www.etsi.org/deliver/etsi_ts/119300_119399/119312/01.04.03_60/ts_119312v010403p.pdf>`_, `[FIPS-186-4] <https://www.nist.gov/publications/digital-signature-standard-dss-2>`_, `[ISO/IEC 14888-3] <https://www.iso.org/standard/76382.html>`_.

The following algorithms are RECOMMENDED to be supported:

.. list-table::
:widths: 20 20 20
:widths: 20 20 20 20
:header-rows: 1

* - **Algorithm**
* - **Algorithm `alg` parameter value**
- **Description**
- **Operations**
- **References**
* - **ES256**
- Signature
- :rfc:`7518`.
* - **ES512**
- Signature
- :rfc:`7518`.
* - **PS256**
- RSASSA (RSA with Signature Scheme Appendix) with PSS ( Probabilistic Signature Scheme) padding using SHA256 hash function and MGF1 mask generation function with SHA-256.
- Signature
- :rfc:`7518`.
- :rfc:`7518`, `[SOG-IS] <https://www.sogis.eu/documents/cc/crypto/SOGIS-Agreed-Cryptographic-Mechanisms-1.3.pdf>`_.
* - **PS384**
- RSASSA (RSA with Signature Scheme Appendix) with PSS ( Probabilistic Signature Scheme) padding using SHA384 hash function and MGF1 mask generation function with SHA-384.
- Signature
- :rfc:`7518`, `[SOG-IS] <https://www.sogis.eu/documents/cc/crypto/SOGIS-Agreed-Cryptographic-Mechanisms-1.3.pdf>`_.
* - **PS512**
- RSASSA (RSA with Signature Scheme Appendix) with PSS ( Probabilistic Signature Scheme) padding using SHA512 hash function and MGF1 mask generation function with SHA-512.
- Signature
- :rfc:`7518`.
- :rfc:`7518`, `[SOG-IS] <https://www.sogis.eu/documents/cc/crypto/SOGIS-Agreed-Cryptographic-Mechanisms-1.3.pdf>`_.
* - **ECDH-ES**
- Elliptic Curve Diffie-Hellman (ECDH) Ephemeral Static key agreement using Concat Key Derivation Function (KDF).
- Key Encryption
- :rfc:`7518`.
* - **ECDH-ES+A128KW**
- ECDH-ES using Concat KDF and content encryption key (CEK) wrapped using AES with a key length of 128 (A128KW).
- Key Encryption
- :rfc:`7518`.
* - **ECDH-ES+A256KW**
- ECDH-ES using Concat KDF and content encryption key (CEK) wrapped using AES with a key length of 256 (A256KW).
- Key Encryption
- :rfc:`7518`.

The following algorithms MUST NOT be supported:

.. list-table::
:widths: 20 20 20
:widths: 20 20 20 20
:header-rows: 1

* - **Algorithm**
* - **Algorithm `alg` parameter value**
- **Description**
- **Operations**
- **References**
* - **none**
- -
- Signature
- :rfc:`7518`.
* - **RSA_1_5**
- RSAES with PKCS1-v1_5 padding scheme. Use of this algorithm is generally not recommended.
- Key Encryption
- :rfc:`7516`, `[Security Vulnerability] <https://en.wikipedia.org/wiki/Adaptive_chosen-ciphertext_attack>`_, `[SOG-IS] <https://www.sogis.eu/documents/cc/crypto/SOGIS-Agreed-Cryptographic-Mechanisms-1.3.pdf>`_.
* - **RSA-OAEP**
- RSA Encryption Scheme with Optimal Asymmetric Encryption Padding (OAEP) using default parameters.
- Key Encryption
- :rfc:`7516`.
- :rfc:`7518`, `[SOG-IS] <https://www.sogis.eu/documents/cc/crypto/SOGIS-Agreed-Cryptographic-Mechanisms-1.3.pdf>`_.
* - **HS256**
- HMAC using SHA256.
- Signature
- :rfc:`7518`.
* - **HS384**
- HMAC using SHA384.
- Signature
- :rfc:`7518`.
* - **HS512**
- HMAC using SHA512
- Signature
- :rfc:`7518`.

.. warning::

The length of the RSA keys MUST be equal to or greater than 2048 bits.
A length of 4096 bits is RECOMMENDED.



24 changes: 22 additions & 2 deletions docs/en/pid-eaa-data-model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ The corresponding SD-JWT verson for PID is given by

{
"typ":"vc+sd-jwt",
"alg":"RS512",
"alg":"ES256",
"kid":"dB67gL7ck3TFiIAf7N6_7SHvqk0MDYMEQcoGGlkUAAw",
"trust_chain" : [
"NEhRdERpYnlHY3M5WldWTWZ2aUhm ...",
Expand All @@ -269,6 +269,16 @@ The corresponding SD-JWT verson for PID is given by
"sub": "NzbLsXh8uDCcd7noWXFZAfHkxZsRGC9Xs",
"jti": "urn:uuid:6c5c0a49-b589-431d-bae7-219122a9ec2c",
"status": "https://pidprovider.example.org/status",
"cnf": {
"jwk": {
"crv": "P-256",
"kty": "EC",
"x": "qrJrj3Af_B57sbOIRrcBM7br7wOc8ynj7lHFPTeffUk",
"y": "1H0cWDyGgvU8w-kPKU_xycOCUNT2o0bwslIQtnPU6iM",
"kid": "5t5YYpBhN-EgIEEI5iUzr6r0MR02LnVQ0OmekmNKcjY"
}
},
"type": "PersonIdentificationData",
fmarino-ipzs marked this conversation as resolved.
Show resolved Hide resolved
"vct": "PersonIdentificationData",
"verified_claims": {
"verification": {
Expand Down Expand Up @@ -471,7 +481,7 @@ The corresponding SD-JWT for the previous data is represented as follow, as deco

{
"typ":"vc+sd-jwt",
"alg":"RS512",
"alg":"ES256",
"kid":"d126a6a856f7724560484fa9dc59d195",
"trust_chain" : [
"NEhRdERpYnlHY3M5WldWTWZ2aUhm ...",
Expand All @@ -491,6 +501,16 @@ The corresponding SD-JWT for the previous data is represented as follow, as deco
"sub": "NzbLsXh8uDCcd7noWXFZAfHkxZsRGC9Xs",
"jti": "urn:uuid:6c5c0a49-b589-431d-bae7-219122a9ec2c",
"status": "https://issuer.example.org/status",
"cnf": {
"jwk": {
"crv": "P-256",
"kty": "EC",
"x": "qrJrj3Af_B57sbOIRrcBM7br7wOc8ynj7lHFPTeffUk",
"y": "1H0cWDyGgvU8w-kPKU_xycOCUNT2o0bwslIQtnPU6iM",
"kid": "5t5YYpBhN-EgIEEI5iUzr6r0MR02LnVQ0OmekmNKcjY"
}
},
"type": "HealthInsuranceData",
"vct": "DisabilityCard",
fmarino-ipzs marked this conversation as resolved.
Show resolved Hide resolved
"verified_claims": {
"verification": {
Expand Down
19 changes: 16 additions & 3 deletions docs/en/pid-eaa-issuance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Below a non-normative example of the PAR.
&client_id=$thumprint-of-the-jwk-in-the-cnf-wallet-attestation$
&code_challenge=E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM
&code_challenge_method=S256
&request=eyJhbGciOiJSUzI1NiIsImtpZCI6ImsyYmRjIn0.ew0KIC Jpc3MiOiAiczZCaGRSa3F0MyIsDQogImF1ZCI6ICJodHRwczovL3NlcnZlci5leGFtcGxlLmNvbSIsDQo gInJlc3BvbnNlX3R5cGUiOiAiY29kZSBpZF90b2tlbiIsDQogImNsaWVudF9pZCI6ICJzNkJoZFJrcXQz IiwNCiAicmVkaXJlY3RfdXJpIjogImh0dHBzOi8vY2xpZW50LmV4YW1...
&request=$SIGNED-JWT
&client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-client-attestation
&client_assertion=$WIA~WIA-PoP

Expand Down Expand Up @@ -923,7 +923,7 @@ Below is a non-normative example of an Entity Configuration containing an `openi

{

"alg": "RS256",
"alg": "ES256",
"kid": "FANFS3YnC9tjiCaivhWLVUJ3AxwGGz_98uRFaqMEEs",
"typ": "entity-statement+jwt"

Expand All @@ -935,6 +935,15 @@ Below is a non-normative example of an Entity Configuration containing an `openi
"iss": "https://pid-provider.example.org",
"sub": "https://pid-provider.example.org",
"jwks": {
"keys": [
{
"crv": "P-256",
"kty": "EC",
"x": "qrJrj3Af_B57sbOIRrcBM7br7wOc8ynj7lHFPTeffUk",
"y": "1H0cWDyGgvU8w-kPKU_xycOCUNT2o0bwslIQtnPU6iM",
"kid": "5t5YYpBhN-EgIEEI5iUzr6r0MR02LnVQ0OmekmNKcjY"
}
]
"keys": [{
"kty": "RSA",
"use": "sig",
Expand All @@ -951,7 +960,7 @@ Below is a non-normative example of an Entity Configuration containing an `openi
"authorization_endpoint": "https://pid-provider.example.org/connect/authorize",
"token_endpoint": "https://pid-provider.example.org/connect/token",
"pushed_authorization_request_endpoint": "https://pid-provider.example.org/connect/par",
"dpop_signing_alg_values_supported": ["RS256", "RS512", "ES256", "ES512"],
"dpop_signing_alg_values_supported": ["ES256", "ES512"],
"credential_endpoint": "https://pid-provider.example.org/credential",
"display": [
{
Expand Down Expand Up @@ -982,6 +991,9 @@ Below is a non-normative example of an Entity Configuration containing an `openi
{
"format": "vc+sd-jwt",
"cryptographic_binding_methods_supported": ["jwk"],

"cryptographic_suites_supported": ["ES256", "ES512"],

fmarino-ipzs marked this conversation as resolved.
Show resolved Hide resolved
"credential_signing_alg_values_supported": ["ES256", "ES384", "ES512"],
"proof_types_supported": {
"jwt": {
Expand All @@ -990,6 +1002,7 @@ Below is a non-normative example of an Entity Configuration containing an `openi
]
}
},

fmarino-ipzs marked this conversation as resolved.
Show resolved Hide resolved
"display": [{
"name": "PID Italiano di esempio",
"locale": "it-IT",
Expand Down
Loading
Loading