/rsa-sig-sb

Primary LanguageJavaOtherNOASSERTION

RSA silver-box signature scheme using secure silver module

License: MIT

TL;DR: run START.bat and follow the on-screen instruction

Project structure

  Root project 'rsa-sig-sb'
   ├── Subroject ':security-providers'
   ├── Subroject ':benchmark'
   ├── Subroject ':ssm-link'
   ├── Subroject ':secure-silver-module'
   └── Subroject ':central-processing-unit'

  • you need to have installed JDK-11 installed, for example: AdoptOpenJDK 11 (LTS)

  • you don't need to have Gradle installed, running gradlew script for the first time will download appropriate Gradle version (6.3)

  • SSM needs to be running in one console window, then you can run benchmark in another console window

  • building rsa-sig-sb for the first time will download all necessary dependencies

  • use gradlew.bat commands on Windows and ./gradlew on Linux

How to build program:

> gradlew.bat build
$ ./gradlew build

How to delete build:

> gradlew.bat clean
$ ./gradlew clean

How to see available security providers:

> gradlew.bat :security-providers:run
$ ./gradlew :security-providers:run

How to start SSM:

> gradlew.bat :secure-silver-module:run
$ ./gradlew :secure-silver-module:run

How to start benchmark:

> gradlew.bat :benchmark:run
$ ./gradlew :benchmark:run

How to display project tree:

> gradlew.bat projects
$ ./gradlew projects

How to display all available tasks:

> gradlew.bat tasks --all
$ ./gradlew tasks --all

How to display dependency tree for CPU subproject:

> gradlew.bat :central-processing-unit:dependencies
$ ./gradlew :central-processing-unit:dependencies

How to display dependency tree for SSM subproject:

> gradlew.bat :secure-silver-module:dependencies
$ ./gradlew :secure-silver-module:dependencies

How to change console output:

  • edit org.gradle.console in gradle.properties file and change verbose to: auto, plain or rich

How to change key size, hash function output length, maximum number of allowed queries and security provider:

  • edit args = [RSA_BITS, HASH_BITS, MAX_QUERIES, KEY_PAIR_GENERATOR_PROVIDER] in secure-silver-module/build.gradle
  • run :security-providers subprojects for information on supported providers and key sizes

How to change benchmark length and security providers:

  • edit args = [BENCHMARK_LENGTH, KEY_PAIR_GENERATOR_PROVIDER, SIGNATURE_PROVIDER] in benchmark/build.gradle
  • run :security-providers subprojects for information on supported providers and key sizes
NOTE:

Even if SunMSCAPI is listed as supported on your system, using it will result in getting InvalidAlgorithmParameterException: Exponent parameter is not supported, because we are using constant public exponent 65537 and SunMSCAPI doesn't allow choosing public exponent. See: /mscapi/RSAKeyPairGenerator.java#L82-L85

Class diagram

Class diagram

License

RSA silver-box signature scheme using secure silver module is available under MIT License. See LICENSE.txt for more information.

SPDX-License-Identifier: MIT