File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -245,14 +245,9 @@ Encrypting user data directly with RSA is insecure.
245245
246246PKCS #1 v1.5 padding has been disabled as it is nearly impossible to use this
247247padding method in a secure manner. It is known to be vulnerable to timing
248- based side channel attacks.
248+ based side channel attacks. use_pkcs1_padding() results in a fatal error.
249249L<Marvin Attack|https://github.com/tomato42/marvin-toolkit/blob/master/README.md>
250250
251- use_pkcs1_padding() now sets the padding method to use_pkcs1_pss_padding.
252-
253- B<Note > : RSA-PSS cannot be used for encryption/decryption and results in a
254- fatal error. Call C<use_pkcs1_oaep_padding > for encryption operations.
255-
256251=item use_pkcs1_oaep_padding
257252
258253Use C<EME-OAEP > padding as defined in PKCS #1 v2.0 with SHA-1, MGF1 and
@@ -267,6 +262,8 @@ should be used as a replacement for RSA-PKCS#1 v1.5. The module specifies
267262the message digest being requested and the appropriate mgf1 setting and
268263salt length for the digest.
269264
265+ B<Note > : RSA-PSS cannot be used for encryption/decryption and results in a
266+ fatal error. Call C<use_pkcs1_oaep_padding > for encryption operations.
270267=item use_sslv23_padding
271268
272269Use C<PKCS #1 v1.5 > padding with an SSL-specific modification that
Original file line number Diff line number Diff line change 931931use_pkcs1_padding (p_rsa )
932932 rsaData * p_rsa ;
933933 CODE :
934- p_rsa -> padding = RSA_PKCS1_PSS_PADDING ;
934+ croak (" PKCS #1 1.5 is disabled as it is known to be vulnerable to marvin attacks.") ;
935935
936936void
937937use_pkcs1_oaep_padding (p_rsa )
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ sub _Test_Sign_And_Verify {
3737 my $sig = eval { $rsa -> sign($plaintext ) };
3838 SKIP: {
3939 skip " OpenSSL error: illegal or unsupported padding mode - $hash " , 5 if $@ =~ / illegal or unsupported padding mode/i ;
40+ skip " OpenSSL error: invalid digest - $hash " , 5 if $@ =~ / invalid digest/i ;
4041 ok( $rsa_pub -> verify( $plaintext , $sig ), " rsa_pub verify $hash " );
4142
4243 my $false_sig = unpack " H*" , $sig ;
You can’t perform that action at this time.
0 commit comments