This is a reference of cryptography and security examples from the Java security API to help understand the implementation. The algorithm names can be found in the Standard Names docs.
-
Key, Keypair Generation and KeyStore
-
Warning: The JKS keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format.
-
-
KeyTool:
-
Certificate thumbprint using Java
- Using openssl on command line:
$ cat file.crt.pem | openssl x509 -sha1 -fingerprint
-
-
-
https://stackoverflow.com/questions/62823792/how-to-get-crt-and-key-from-cert-pem-and-key-pem
-
The following command will create the keystore needed for Certificate pinning:
$ keytool -keystore keystore -importcert -file stackoverflow.crt -alias stackoverflow -storepass changeit -noprompt
Delete the certificate with:
$ keytool -keystore keystore -delete -alias stackoverflow -storepass changeit -noprompt
-
-
-
- Finding keys, IV's and other sensitive data in bytecode.
- javap, IntelliJ FernFlower
-
- Password generation
- Password validation
- Password hashing
-
- Affine
- Atbash
- Diffie Hellman
- Rotational
-
Deconstruct Random Number Generation
- java.util.Random
- Generate two random numbers and then guess the third.
Additional resources:
RSA keys
Diagnosing TLS, SSL, and HTTPS
Keylength implements mathematical formulas and summarizes reports from well-known organizations allowing you to quickly evaluate the minimum security requirements for your system.
SSL Labs. SSL Server Test