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,13 +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.
249- L<Marvin Attack|https://github.com/tomato42/marvin-toolkit/blob/master/README.md>
250-
251- use_pkcs1_padding() now sets the padding method to use_pkcs1_pss_padding.
248+ based side channel attacks. use_pkcs1_padding() results in a fatal error.
252249
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.
250+ L<Marvin Attack|https://github.com/tomato42/marvin-toolkit/blob/master/README.md>
255251
256252=item use_pkcs1_oaep_padding
257253
@@ -267,6 +263,9 @@ should be used as a replacement for RSA-PKCS#1 v1.5. The module specifies
267263the message digest being requested and the appropriate mgf1 setting and
268264salt length for the digest.
269265
266+ B<Note > : RSA-PSS cannot be used for encryption/decryption and results in a
267+ fatal error. Call C<use_pkcs1_oaep_padding > for encryption operations.
268+
270269=item use_sslv23_padding
271270
272271Use 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 ;
@@ -121,7 +122,7 @@ _check_for_croak(
121122
122123$plaintext .= $plaintext x 5 ;
123124
124- my @paddings = qw/ pkcs1 pkcs1_oaep pkcs1_pss/ ;
125+ my @paddings = qw/ pkcs1_oaep pkcs1_pss/ ;
125126foreach my $padding (@paddings ) {
126127 my $p = " use_$padding \_ padding" ;
127128
You can’t perform that action at this time.
0 commit comments