@@ -78,14 +78,15 @@ the following parameters configured:
7878> [ !NOTE]
7979> The module has been tested with and supports SQLite, PostgreSQL, and MySQL databases.
8080
81- ### Create Protocol / Federation RSA key pairs
81+ ### Create Protocol / Federation pairs
8282
8383During the authentication flow, the generated ID Token and Access Token will be in the form of signed JSON Web Tokens (JWS).
8484For signing these tokens, you need to create a public/private RSA key pair, referred to as "OIDC protocol" keys.
8585
8686If you plan to use OpenID Federation capabilities, you should create a separate key pair dedicated to OpenID Federation
8787operations, such as signing Entity Statement JWS.
8888
89+ #### RSA key pair generation
8990Below are sample commands to create key pairs with default file names for both "protocol" and "federation" purposes:
9091
9192To generate the private keys without a passphrase:
@@ -112,6 +113,37 @@ With passphrase:
112113
113114If you use different file names or a passphrase, be sure to update these settings in the ` module_oidc.php ` configuration file.
114115
116+ #### EC key pair generation
117+
118+ If you prefer to use Elliptic Curve Cryptography (ECC) instead of RSA, you can generate the key pair using the
119+ following commands:
120+
121+ To generate the private keys without a passphrase:
122+
123+ openssl ecparam -name prime256v1 -genkey -noout -out cert/oidc_module.key
124+ openssl ecparam -name prime256v1 -genkey -noout -out cert/oidc_module_federation.key
125+
126+ To generate the private keys with a passphrase:
127+
128+ openssl ecparam -genkey -name secp384r1 -noout -out cert/oidc_module.key -passout pass:myPassPhrase
129+ openssl ecparam -genkey -name secp384r1 -noout -out cert/oidc_module_federation.key -passout pass:myPassPhrase
130+
131+ Next, extract the public key from each private key:
132+
133+ Without passphrase:
134+
135+ openssl ec -in cert/oidc_module.key -pubout -out cert/oidc_module.crt
136+ openssl ec -in cert/oidc_module_federation.key -pubout -out cert/oidc_module_federation.crt
137+
138+ With passphrase:
139+
140+ openssl ec -in cert/oidc_module.key -passin pass:myPassPhrase -pubout -out cert/oidc_module.crt
141+ openssl ec -in cert/oidc_module.key -passin pass:myPassPhrase -pubout -out cert/oidc_module.crt
142+
143+ If you use different file names or a passphrase, be sure to update these settings in the ` module_oidc.php `
144+ configuration file.
145+
146+
115147### Enabling the module
116148
117149To enable the module, add ` 'oidc' => true ` to the list of enabled modules in the main SimpleSAMLphp
0 commit comments