Skip to content

Commit 6c1f58d

Browse files
authored
Merge pull request #68 from timlegge/main
Add blurb about JWTs for padding changes
2 parents 049120a + 4bfec6d commit 6c1f58d

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

README

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@ Padding Methods
164164
Version 0.38 sets the appropriate padding for each operation unless
165165
use_no_padding is called before either operation.
166166

167+
Note: while "pkcs1-pss" is the effective replacement for "pkcs1" your
168+
use case may require some additional steps. JSON Web Tokens (JWT) for
169+
instance require the algorithm to be changed from "RS256" for "pkcs1"
170+
(SHA1256) to "PS256" for "pkcs1-pss" (SHA-256 and MGF1 with SHA-256)
171+
167172
use_no_padding
168173
Use raw RSA encryption. This mode should only be used to implement
169174
cryptographically sound padding modes in the application code.

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,11 @@ While **use\_no\_padding** can be used for encryption or signature operations
190190
Version 0.38 sets the appropriate padding for each operation unless
191191
**use\_no\_padding** is called before either operation.
192192

193+
**Note:** while "pkcs1-pss" is the effective replacement for "pkcs1" your
194+
use case may require some additional steps. JSON Web Tokens (JWT) for
195+
instance require the algorithm to be changed from "RS256" for "pkcs1"
196+
(SHA1256) to "PS256" for "pkcs1-pss" (SHA-256 and MGF1 with SHA-256)
197+
193198
- use\_no\_padding
194199

195200
Use raw RSA encryption. This mode should only be used to implement

RSA.pm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,11 @@ B<use_pkcs1_oaep_padding> is used for encryption operations.
255255
Version 0.38 sets the appropriate padding for each operation unless
256256
B<use_no_padding> is called before either operation.
257257
258+
B<Note:> while C<pkcs1-pss> is the effective replacement for <pkcs1> your
259+
use case may require some additional steps. JSON Web Tokens (JWT) for
260+
instance require the algorithm to be changed from "RS256" for "pkcs1"
261+
(SHA1256) to "PS256" for "pkcs1-pss" (SHA-256 and MGF1 with SHA-256)
262+
258263
=over
259264
260265
=item use_no_padding

0 commit comments

Comments
 (0)