@@ -33,6 +33,8 @@ Version `1.6.x` contains breaking changes!
33
33
34
34
_ Note:_ For version ` 1.4.5 ` : [ v1.4.5] ( https://github.com/pilinux/gorest/tree/v1.4.5 )
35
35
36
+ For all projects, it is recommended to use version ` 1.6.x ` or higher.
37
+
36
38
## Requirement
37
39
38
40
` Go 1.19+ `
@@ -84,52 +86,55 @@ _Note:_ gorest uses [GORM][21] as its ORM
84
86
85
87
Procedures to generate public-private key pair using openssl:
86
88
87
- #### ECDSA
89
+ ### ECDSA
90
+
91
+ #### ES256
88
92
89
- ES256:
90
93
- prime256v1: X9.62/SECG curve over a 256 bit prime field, also known as P-256 or NIST P-256
91
94
- widely used, recommended for general-purpose cryptographic operations
92
95
93
- ```
96
+ ``` bash
94
97
openssl ecparam -name prime256v1 -genkey -noout -out private-key.pem
95
98
openssl ec -in private-key.pem -pubout -out public-key.pem
96
99
```
97
100
98
- ES384:
101
+ #### ES384
102
+
99
103
- secp384r1: NIST/SECG curve over a 384 bit prime field
100
104
101
- ```
105
+ ``` bash
102
106
openssl ecparam -name secp384r1 -genkey -noout -out private-key.pem
103
107
openssl ec -in private-key.pem -pubout -out public-key.pem
104
108
```
105
109
106
- ES512:
110
+ #### ES512
111
+
107
112
- secp521r1: NIST/SECG curve over a 521 bit prime field
108
113
109
- ```
114
+ ``` bash
110
115
openssl ecparam -name secp521r1 -genkey -noout -out private-key.pem
111
116
openssl ec -in private-key.pem -pubout -out public-key.pem
112
117
```
113
118
114
- #### RSA
119
+ ### RSA
115
120
116
- RS256:
121
+ #### RS256
117
122
118
- ```
123
+ ``` bash
119
124
openssl genpkey -algorithm RSA -out private-key.pem -pkeyopt rsa_keygen_bits:2048
120
125
openssl rsa -in private-key.pem -pubout -out public-key.pem
121
126
```
122
127
123
- RS384:
128
+ #### RS384
124
129
125
- ```
130
+ ``` bash
126
131
openssl genpkey -algorithm RSA -out private-key.pem -pkeyopt rsa_keygen_bits:3072
127
132
openssl rsa -in private-key.pem -pubout -out public-key.pem
128
133
```
129
134
130
- RS512:
135
+ #### RS512
131
136
132
- ```
137
+ ``` bash
133
138
openssl genpkey -algorithm RSA -out private-key.pem -pkeyopt rsa_keygen_bits:4096
134
139
openssl rsa -in private-key.pem -pubout -out public-key.pem
135
140
```
@@ -164,7 +169,7 @@ _Tutorials:_
164
169
165
170
For version `1.6.x`, please check the project in [example](example)
166
171
167
- For version `1.4.x` and `1.5.x`, [Wiki][10]
172
+ For version `1.4.x` and `1.5.x`, [Wiki][10] (obsolete)
168
173
169
174
- convention over configuration
170
175
0 commit comments