Skip to content

Commit

Permalink
rsa: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
olegbespalov committed Oct 24, 2024
1 parent db50b3e commit af8f773
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,29 @@ The current state of the project is that it is an experimental module of the Web

| API | AES-CBC | AES-GCM | AES-CTR | RSA-OAEP |
| :------------------------ | :------ | :------ | :------ | :------- |
| `crypto.subtle.encrypt()` |||| |
| `crypto.subtle.decrypt()` |||| |
| `crypto.subtle.encrypt()` |||| |
| `crypto.subtle.decrypt()` |||| |

##### Signature

| API | HMAC | ECDSA | RSASSA-PKCS1-v1_5 | RSA-PSS |
| :----------------------- | :--- | :---- | :---------------- | :------ |
| `crypto.subtle.sign()` |||||
| `crypto.subtle.verify()` |||||
| `crypto.subtle.sign()` |||||
| `crypto.subtle.verify()` |||||

> [!WARNING]
> Since we use Golang SDK under the hood, the RSA-PSS [doesn't support deterministic signatures](https://github.com/golang/go/blob/master/src/crypto/rsa/pss.go#L293-L297). In other words, even if `saltLength` is set to 0, the signature will be different each time.
##### Key generation, import and export

| API | AES-CBC | AES-GCM | AES-CTR | AES-KW | HMAC | ECDSA | ECDH | RSASSA-PKCS1-v1_5 | RSA-PSS | RSA-OAEP |
| :---------------------------- | :------ | :------ | :------ | :----- | :--- | :---- | :--- | :---------------- | :------ | :------- |
| `crypto.subtle.generateKey()` |||||||| | | |
| `crypto.subtle.importKey()` |||||||| | | |
| `crypto.subtle.exportKey()` |||||||| | | |
| `crypto.subtle.generateKey()` |||||||| | | |
| `crypto.subtle.importKey()` |||||||| | | |
| `crypto.subtle.exportKey()` |||||||| | | |

> [!WARNING]
> Currently, only the `raw` and `jwk` (JSON Web Key) formats are supported for import/export operations for the `AES-*` and `HMAC` algorithms. `ECDH` and `ECDSA` have support for `pkcs8`, `spki`, `raw` and `jwk` formats.
> Currently, only the `raw` and `jwk` (JSON Web Key) formats are supported for import/export operations for the `AES-*` and `HMAC` algorithms. `ECDH` and `ECDSA` have support for `pkcs8`, `spki`, `raw` and `jwk` formats. RSA algorithms have support for `pkcs8`, `spki` and `jwk` formats.
##### Key derivation

Expand Down

0 comments on commit af8f773

Please sign in to comment.