java.lang.Object
net.i2p.router.tasks.CryptoChecker

public class CryptoCheckerextends Object
Cryptographic algorithm availability checker and advisor.

This utility checks the availability of all required cryptographic algorithms on the current platform and provides warnings and recommendations when essential crypto is missing. It helps users identify and resolve cryptographic compatibility issues.

Checks Performed:

  • Signature algorithm availability (EdDSA, ECDSA, DSA)
  • Java version compatibility checks
  • Cryptography policy file detection
  • Platform-specific crypto limitations

Recommendations Provided:

  • Java upgrade suggestions for older versions
  • Instructions for installing unlimited strength crypto
  • Platform-specific guidance for crypto issues
  • Future compatibility warnings

The checker outputs to both router logs and System.out to ensure visibility during startup. It can be run standalone for crypto testing without starting the full router.

  • Field Details

    • JRE6

      private static String JRE6
      Download page offered when the router runs on Java 6
  • Constructor Details

    • CryptoChecker

      public CryptoChecker()
      Constructor. The scan reads the JVM's registered algorithms and writes straight to the logs, so an instance carries no state.
  • Method Details

    • warnUnavailableCrypto

      public static void warnUnavailableCrypto(RouterContext ctx)
      Check and warn about unavailable cryptographic algorithms.

      This method scans all available signature types and logs warnings for any that are not available on the current platform. It also provides recommendations for Java upgrades and cryptography policy files when needed.

      The method outputs warnings to both the router log (if context provided) and System.out for visibility during startup.

      Parameters:
      ctx - router context for logging; if null, logs only to System.out (used when called from main method during startup)
    • main

      public static void main(String[] args)
      Main method for standalone crypto checking.

      This allows the crypto checker to be run independently to test cryptographic algorithm availability without starting the full router.

      Parameters:
      args - command line arguments (ignored)