Skip to content

nowtwo-llc/paperscorer-decrypter-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

paper-scorer/decrypter-java

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

Requirements

Java 8 and later

Build

mvn clean package

Usage

CLI

java -jar target/decrypter-1.0.0.jar [DECRYPT_KEY] [ENCRYPTED_TEXT]

As a Maven dependency

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);

Encryption scheme

  • 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.

Testing

mvn test

Contributing

We 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.

License

Released under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages