@@ -34,12 +34,14 @@ and ensure at least the following parameters are set:
3434
3535Note: SQLite, PostgreSQL, and MySQL are supported.
3636
37- ## 4. Create RSA key pairs
37+ ## 4. Create key pairs
3838
3939ID and Access tokens are signed JWTs. Create a public/private RSA key
4040pair for OIDC protocol operations. If you plan to use OpenID Federation,
4141create a separate key pair for federation operations.
4242
43+ ### RSA key pair generation
44+
4345Generate private keys without a passphrase:
4446
4547``` bash
@@ -73,6 +75,43 @@ openssl rsa -in cert/oidc_module_federation.key -passin pass:myPassPhrase -pubou
7375If you use different file names or a passphrase, update
7476` config/module_oidc.php ` accordingly.
7577
78+ ### EC key pair generation
79+
80+ If you prefer to use Elliptic Curve Cryptography (ECC) instead of RSA.
81+
82+ Generate private keys without a passphrase:
83+
84+ ``` bash
85+ openssl ecparam -name prime256v1 -genkey -noout -out cert/oidc_module.key
86+ openssl ecparam -name prime256v1 -genkey -noout -out cert/oidc_module_federation.key
87+ ```
88+
89+ Generate private keys with a passphrase:
90+
91+ ``` bash
92+ openssl ecparam -genkey -name secp384r1 -noout -out cert/oidc_module.key -passout pass:myPassPhrase
93+ openssl ecparam -genkey -name secp384r1 -noout -out cert/oidc_module_federation.key -passout pass:myPassPhrase
94+ ```
95+
96+ Extract public keys:
97+
98+ Without passphrase:
99+
100+ ``` bash
101+ openssl ec -in cert/oidc_module.key -pubout -out cert/oidc_module.crt
102+ openssl ec -in cert/oidc_module_federation.key -pubout -out cert/oidc_module_federation.crt
103+ ```
104+
105+ With a passphrase:
106+
107+ ``` bash
108+ openssl ec -in cert/oidc_module.key -passin pass:myPassPhrase -pubout -out cert/oidc_module.crt
109+ openssl ec -in cert/oidc_module.key -passin pass:myPassPhrase -pubout -out cert/oidc_module.crt
110+ ```
111+
112+ If you use different file names or a passphrase, update
113+ ` config/module_oidc.php ` accordingly.
114+
76115## 5. Enable the module
77116
78117Edit ` config/config.php ` and enable ` oidc ` :
0 commit comments