This library/CLI can encrypt and decrypt strings while providing confidentiality and integrity of the plaintext. It shall be secure under a chosen plaintext attack.
This is achived by using 128bit AES encryption in the GCM blockmode while only relying on the Java Crypto API (JCE).
The core of the entire implementation is in ch.n1b.tcrypt.cryptor.AesGcmCryptor
.
- get
maven
- run
mvn package
You may use the packed binary from target/tcrypt-*.tar.gz
or target/tcrypt-*.zip
.
- build the binary (see build instructions)
- run
java -jar tcrypt*.jar
to print usage (or./tcrypt.sh
)
java -jar tcrypt*.jar enc <property key> <plaintext filename>
The ciphertext will be printed to stdout.
java -jar tcrypt*.jar dec <property key> <ciphertext filename>
The plaintext will be printed to stdout.