Cryptography Tutorials - Herong's Tutorial Examples - Version 5.36, by Dr. Herong Yang
64-bit RSA Key Validated by RsaKeyValidator.java
This section provides a tutorial example on how a 64-bit RSA key is validated by RsaKeyValidator.java with 3 rounds of encryption and decryption tests.
To try my RsaKeyValidator.java program, I am going to use the 64-bit RSA key generated from the previous tutorial using RsaKeyGenerator.java:
C:\herong>java RsaKeyGenerator 64 > rsa_64.key C:\herong>type rsa_64.key p: 3372213049 q: 3372213067 m: 11371820901801285168 Modulus: 11371820908545711283 Key size: 64 Public key: 8383132602661586723 Private key: 2377205257342368779 C:\herong>java RsaKeyValidator rsa_64.key --- Reading public key and private key --- Modulus: 11371820908545711283 Key size: 64 Public key: 8383132602661586723 Private key: 2377205257342368779 --- RSA encryption test --- Is test passed: true Original text: 2314539574532842 Cipher text: 6717539904595114684 Decrypted text: 2314539574532842 --- RSA encryption test --- Is test passed: true Original text: 474153 Cipher text: 372517405590993925 Decrypted text: 474153 --- RSA encryption test --- Is test passed: true Original text: 490393355042176 Cipher text: 9836060768354999626 Decrypted text: 490393355042176
I think my 64-bit RSA key is good. It passed 3 all tests. What do you think?
Last update: 2013.
Table of Contents
Introduction to AES (Advanced Encryption Standard)
DES Algorithm - Illustrated with Java Programs
DES Algorithm Java Implementation
DES Algorithm - Java Implementation in JDK JCE
DES Encryption Operation Modes
PHP Implementation of DES - mcrypt
Blowfish - 8-Byte Block Cipher
Secret Key Generation and Management
Cipher - Secret Key Encryption and Decryption
►RSA Implementation using java.math.BigInteger Class
Generating Prime Number with BigInteger Class
Performance of Prime Number Generation
RSA Encryption Implementation using BigInteger Class
RsaKeyGenerator.java for RSA Key Generation
RSA Keys Generated by RsaKeyGenerator.java
RsaKeyValidator.java for RSA Key Validation
►64-bit RSA Key Validated by RsaKeyValidator.java
Converting Byte Sequences to Positive Integers
Cleartext Block Size for RSA Encryption
Cleartext Message Padding and Revised Block Size
Ciphertext Block Size for RSA Encryption
RsaKeyEncryption.java for RSA Encryption Operation
RsaKeyDecryption.java for RSA Decryption Operation
Testing RsaKeyEncryption.java with a 16-bit Key
Testing RsaKeyEncryption.java with a 64-bit Key
Testing RsaKeyEncryption.java with a 3072-bit Key
Introduction of DSA (Digital Signature Algorithm)
Java Default Implementation of DSA
Private key and Public Key Pair Generation
PKCS#8/X.509 Private/Public Encoding Standards
Cipher - Public Key Encryption and Decryption
OpenSSL Introduction and Installation
OpenSSL Generating and Managing RSA Keys
OpenSSL Generating and Signing CSR
OpenSSL Validating Certificate Path
"keytool" and "keystore" from JDK
"OpenSSL" Signing CSR Generated by "keytool"
Migrating Keys from "keystore" to "OpenSSL" Key Files
Certificate X.509 Standard and DER/PEM Formats
Migrating Keys from "OpenSSL" Key Files to "keystore"
Using Certificates in IE (Internet Explorer)