Skip to main content

Find RSA key generation parameters

io.moderne.cryptography.FindRSAKeyGenParameters

Finds RSAKeyGenParameterSpec instantiations and extracts their parameter values into a data table.

Recipe source

GitHub, Issue Tracker, Maven Central

This recipe is available under the Apache License Version 2.0.

Usage

This recipe has no required configuration options. It can be activated by adding a dependency on io.moderne.recipe:rewrite-cryptography in your build file or by running a shell command (in which case no build changes are needed):

  1. Add the following to your build.gradle file:
build.gradle
plugins {
id("org.openrewrite.rewrite") version("latest.release")
}

rewrite {
activeRecipe("io.moderne.cryptography.FindRSAKeyGenParameters")
setExportDatatables(true)
}

repositories {
mavenCentral()
}

dependencies {
rewrite("io.moderne.recipe:rewrite-cryptography:0.8.1")
}
  1. Run gradle rewriteRun to run the recipe.

See how this recipe works across multiple open-source repositories

Run this recipe on OSS repos at scale with the Moderne SaaS.

The community edition of the Moderne platform enables you to easily run recipes across thousands of open-source repositories.

Please contact Moderne for more information about safely running the recipes on your own codebase in a private SaaS.

Data Tables

RSA key generation parameters

io.moderne.cryptography.table.RSAKeyGenParametersTable

RSAKeyGenParameterSpec instantiations and their configured parameters including key size, public exponent, and optional parameters.

Column NameDescription
Source fileThe source file containing the RSAKeyGenParameterSpec instantiation
Line numberThe line number where the RSAKeyGenParameterSpec is instantiated
Object typeThe type of key generation parameter object (e.g., RSAKeyGenParameterSpec)
Key sizeThe RSA key size in bits
Public exponentThe public exponent value (e.g., F4, 65537)
Key parametersAdditional key generation parameters if specified