PaperScorer Decrypter
AES encryption/decryption utility for PaperScorer, available as both a CLI tool and a Maven dependency.
- Package version: 1.0.0
- Group ID:
com.paperscorer - Artifact ID:
decrypter
Java 8 and later
mvn clean packagejava -jar target/decrypter-1.0.0.jar [DECRYPT_KEY] [ENCRYPTED_TEXT]Add to your pom.xml:
<dependency>
<groupId>com.paperscorer</groupId>
<artifactId>decrypter</artifactId>
<version>1.0.0</version>
</dependency>Then use in your code:
import com.paperscorer.decrypter.Decrypter;
// Decrypt a payload
String plaintext = Decrypter.decryptText(password, encryptedPayload);
// Produce a payload this library can read back
String payload = Decrypter.encryptText(password, plaintext);-
Cipher:
AES/CBC/PKCS5Padding -
Key derivation:
SHA-256(password + salt), truncated to 16 bytes (AES-128) -
Payload format: fixed-width Base64 fields, concatenated with no separators:
Field Raw bytes Base64 chars Position IV 16 24 0–23 Salt 21 28 24–51 Ciphertext variable variable 52–end The offsets depend on these exact byte lengths (a 16-byte IV always encodes to 24 Base64 chars; a 21-byte salt to 28). A fresh random IV and salt are generated on every encryption, so the same plaintext yields a different payload each time.
Security note: Key derivation is a single SHA-256 pass with no iteration count (not PBKDF2/scrypt/argon2). This is a deliberate constraint to stay compatible with the existing PaperScorer payload format — it is not suitable as a general-purpose password-based encryption scheme.
mvn testWe are always looking for updates to the package that will help the community. If you have an idea for an update, please create a pull request with your changes.
Released under the MIT License.