Skip to content

Commit 0a07365

Browse files
committed
Update README.md
1 parent c8184d7 commit 0a07365

File tree

1 file changed

+20
-15
lines changed

1 file changed

+20
-15
lines changed

README.md

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ Version `1.6.x` contains breaking changes!
3333

3434
_Note:_ For version `1.4.5`: [v1.4.5](https://github.com/pilinux/gorest/tree/v1.4.5)
3535

36+
For all projects, it is recommended to use version `1.6.x` or higher.
37+
3638
## Requirement
3739

3840
`Go 1.19+`
@@ -84,52 +86,55 @@ _Note:_ gorest uses [GORM][21] as its ORM
8486

8587
Procedures to generate public-private key pair using openssl:
8688

87-
#### ECDSA
89+
### ECDSA
90+
91+
#### ES256
8892

89-
ES256:
9093
- prime256v1: X9.62/SECG curve over a 256 bit prime field, also known as P-256 or NIST P-256
9194
- widely used, recommended for general-purpose cryptographic operations
9295

93-
```
96+
```bash
9497
openssl ecparam -name prime256v1 -genkey -noout -out private-key.pem
9598
openssl ec -in private-key.pem -pubout -out public-key.pem
9699
```
97100

98-
ES384:
101+
#### ES384
102+
99103
- secp384r1: NIST/SECG curve over a 384 bit prime field
100104

101-
```
105+
```bash
102106
openssl ecparam -name secp384r1 -genkey -noout -out private-key.pem
103107
openssl ec -in private-key.pem -pubout -out public-key.pem
104108
```
105109

106-
ES512:
110+
#### ES512
111+
107112
- secp521r1: NIST/SECG curve over a 521 bit prime field
108113

109-
```
114+
```bash
110115
openssl ecparam -name secp521r1 -genkey -noout -out private-key.pem
111116
openssl ec -in private-key.pem -pubout -out public-key.pem
112117
```
113118

114-
#### RSA
119+
### RSA
115120

116-
RS256:
121+
#### RS256
117122

118-
```
123+
```bash
119124
openssl genpkey -algorithm RSA -out private-key.pem -pkeyopt rsa_keygen_bits:2048
120125
openssl rsa -in private-key.pem -pubout -out public-key.pem
121126
```
122127

123-
RS384:
128+
#### RS384
124129

125-
```
130+
```bash
126131
openssl genpkey -algorithm RSA -out private-key.pem -pkeyopt rsa_keygen_bits:3072
127132
openssl rsa -in private-key.pem -pubout -out public-key.pem
128133
```
129134

130-
RS512:
135+
#### RS512
131136

132-
```
137+
```bash
133138
openssl genpkey -algorithm RSA -out private-key.pem -pkeyopt rsa_keygen_bits:4096
134139
openssl rsa -in private-key.pem -pubout -out public-key.pem
135140
```
@@ -164,7 +169,7 @@ _Tutorials:_
164169

165170
For version `1.6.x`, please check the project in [example](example)
166171

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)
168173

169174
- convention over configuration
170175

0 commit comments

Comments
 (0)