rspec/rules/S2277/java/rule.adoc

26 lines
723 B
Plaintext
Raw Normal View History

2021-06-04 14:50:38 +02:00
//// This rule is superseded by RSPEC-5542
//// Please consider implementing this latter instead.
Without OAEP in RSA encryption, it takes less work for an attacker to decrypt the data or infer patterns from the ciphertext. This rule logs an issue as soon as a literal value starts with ``++RSA/NONE++``.
2020-06-30 12:48:07 +02:00
== Noncompliant Code Example
----
Cipher rsa = javax.crypto.Cipher.getInstance("RSA/NONE/NoPadding");
----
== Compliant Solution
----
Cipher rsa = javax.crypto.Cipher.getInstance("RSA/ECB/OAEPWITHSHA-256ANDMGF1PADDING");
----
include::../see.adoc[]
ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]