Uploaded image for project: 'SonarJava'
  1. SonarJava
  2. SONARJAVA-3211

Rule S4426: Cryptographic keys should be robust

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.1
    • Component/s: Rules
    • Labels:

      Description

      Improvments:

      • more algorithms supported
      • more parameters (ex: curves)

      Message for the user should mention the chosen algorithm and the correct key size for it:

      KeyPairGenerator keyPairGen1 = KeyPairGenerator.getInstance("RSA");
      keyPairGen1.initialize(1024); // Noncompliant
      

      >>> Use a key length of at least 2048 bits for RSA cipher algorithm.

      New code examples:

      https://github.com/SonarSource/security-expected-issues/tree/master/java/wip/vulnerabilities/AppVulnerabilites/src/main/java/com/RSPEC_4426

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                quentin.jaquier Quentin Jaquier
                Reporter:
                eric.therond Eric Therond
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: