13

RSA on the JVM

 3 years ago
source link: https://www.mkammerer.de/blog/rsa-on-the-jvm/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
This post shows how to work with RSA on the JVM with the Java language. We’re gonna: Generate two keypairs (one for alice, one for bob) Save these keypairs to a file and load them again Send a message from alice to bob using a hybrid encryption scheme with confidentiality and authenticity First, let’s generate the key pairs:private KeyPair generateKeyPair() { KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA"); keyPairGenerator.initialize(2048); // bits return keyPairGenerator.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK