https://github.com/openconext/openconext-crypt-java
A JAVA library for implementing shared functions for encrypting and decryption
https://github.com/openconext/openconext-crypt-java
Last synced: 8 months ago
JSON representation
A JAVA library for implementing shared functions for encrypting and decryption
- Host: GitHub
- URL: https://github.com/openconext/openconext-crypt-java
- Owner: OpenConext
- License: apache-2.0
- Created: 2023-11-29T09:08:15.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-05-19T13:35:20.000Z (11 months ago)
- Last Synced: 2025-05-19T13:58:12.873Z (11 months ago)
- Language: Java
- Size: 78.1 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Notice: NOTICE
Awesome Lists containing this project
README
## openconext-crypt-java


### [System Requirements](#system-requirements)
- Java 21
- Maven 3
First install Java 21 with a package manager
and then export the correct the `JAVA_HOME`. For example on macOS:
```bash
export JAVA_HOME=/Library/Java/JavaVirtualMachines/openjdk-21.jdk/Contents/Home/
```
### Usage
Create private / public keypair (always use 2048 bit modulus)
```
openssl genrsa -traditional -out private_key.pem 2048
openssl rsa -pubout -in private_key.pem -out public_key.pem
```
Convert private key to pkcs8 format in order to import it from Java
```
openssl pkcs8 -topk8 -in private_key.pem -inform pem -out private_key_pkcs8.pem -outform pem -nocrypt
```