Cipher Kitsune is a production-ready, modular Encryption-as-a-Service (EaaS) platform and utility.
Cipher Kitsune provides a comprehensive REST API for encryption, hashing, and encoding.
Try the API here: KIT$UNE
X Support Bot: @CipherKitsune
- Modular Strategy Pattern: Easily add or rotate encryption algorithms.
- Configuration-Driven: Toggle algorithms via feature flags without code changes.
- Secure by Default: No logging of sensitive data (plaintext, keys, hashes).
- Rate Limited: Built-in abuse protection for public endpoints.
- Swagger Documentation: Interactive API docs with Dark Mode and Kitsune theme.
- Symmetric: AES-GCM, ChaCha20-Poly1305
- Asymmetric: RSA (OAEP), EC (ECIES)
- Hashing: SHA-256, SHA-512, Argon2, BCrypt
- Encoding: Base64, Hex
POST /api/v1/encrypt- Encrypt plaintextPOST /api/v1/decrypt- Decrypt ciphertextPOST /api/v1/hash- Generate secure hashesPOST /api/v1/encode- Encode dataPOST /api/v1/decode- Decode dataGET /api/v1/generate/key/{algorithm}- Generate a symmetric key (AES, ChaCha20, Twofish, JWT)GET /api/v1/generate/keypair/{algorithm}- Generate an asymmetric key pair (RSA, EC)GET /api/v1/generate/iv- Generate a random IV
curl -X POST http://localhost:9905/api/v1/encode \
-H "Content-Type: application/json" \
-d '{"data": "Hello Kitsune", "algorithm": "Base64"}'curl -X POST http://localhost:9905/api/v1/encrypt \
-H "Content-Type: application/json" \
-d '{
"data": "Secret Message",
"algorithm": "AES-GCM",
"key": "MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWY=",
"iv": "MTIzNDU2Nzg5MDEy"
}'curl -X POST http://localhost:9905/api/v1/encrypt \
-H "Content-Type: application/json" \
-d '{
"data": "Secret Message",
"algorithm": "RSA-OAEP",
"key": "-----BEGIN PUBLIC KEY-----\n..."
}'curl -X POST http://localhost:9905/api/v1/hash \
-H "Content-Type: application/json" \
-d '{"data": "Kitsune", "algorithm": "SHA-256"}'The following key rotation services are available:
AES_TO_AES- Rotates data from an old AES key to a new AES key.DES_TO_AES- Rotates data from an old DES key to a new AES key.AES_CTR- Rotates data from an old AES-CTR key to a new AES-CTR key.CHACHA20- Rotates data from an old ChaCha20 key to a new ChaCha20 key.TWOFISH- Rotates data from an old Twofish key to a new Twofish key.DES_EDE_TO_AES- Rotates data from an old 3DES (DESede) key to a new AES key.
Kitsune provides utility endpoints to generate cryptographically strong keys and vectors.
- When to use: Used for signing and verifying JSON Web Tokens.
- Recommended size: 256-bit (32 bytes) or higher.
- Curl Example:
curl -X GET http://localhost:9905/api/v1/generate/key/jwt
- Example Response:
{ "success": true, "algorithm": "JWT", "result": "bXktc2VjdXJlLWp3dC1zZWNyZXQta2V5LTMyLWJ5dGVzLWxvbmc=", "timestamp": "2023-10-27T10:00:00" }
- When to use: Symmetric encryption (AES-GCM, AES-CBC).
- Recommended size: 256-bit (32 bytes).
- Curl Example:
curl -X GET http://localhost:9905/api/v1/generate/key/aes
- When to use: Asymmetric encryption, digital signatures.
- Recommended size: 2048-bit or 4096-bit.
- Curl Example:
curl -X GET http://localhost:9905/api/v1/generate/keypair/rsa
- Example Response: Returns a JSON object with
publicKeyandprivateKeyin PEM format.
- When to use: Required for symmetric encryption modes like GCM or CBC to ensure uniqueness.
- Recommended size: 12 bytes for AES-GCM.
- Curl Example:
curl -X GET "http://localhost:9905/api/v1/generate/iv?length=12"
| Variable | Description | Default |
|---|---|---|
N1NETAILS_DATABASE_ENABLED |
Enables or disables the database connection | false |
POSTGRES_URL |
Postgres database url | jdbc:postgresql://localhost/n1netails |
POSTGRES_USERNAME |
Postgres user | n1netails |
POSTGRES_PASSWORD |
Postgres user password | n1netails |
N1NETAILS_ENCRYPTION_OLD_KEY |
The old encryption key to be used for decryption | MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWY= |
N1NETAILS_ENCRYPTION_NEW_KEY |
The new encryption key to be used for encryption | MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWY= |
N1NETAILS_KEY_ROTATION_TYPE |
The type of key rotation to be used | AES_TO_AES |
N1NETAILS_ENCRYPTION_AES_GCM_ENABLED |
Enable/Disable AES-GCM strategy | true |
N1NETAILS_ENCRYPTION_CHACHA20_ENABLED |
Enable/Disable ChaCha20 strategy | true |
N1NETAILS_HASHING_ARGON2_ENABLED |
Enable/Disable Argon2 hashing | true |
N1NETAILS_RATELIMIT_CAPACITY |
API Rate limit bucket capacity | 100 |
N1NETAILS_RATELIMIT_TPS |
API Rate limit tokens per second | 10 |
-
Clone the repository (if you havenβt already):
git clone https://github.com/n1netails/n1netails-cipher-kitsune.git cd n1netails-cipher-kitsune
Requires java 17 to be installed on your server
java -jar target/n1netails-cipher-kitsune.jarmvn clean installmvn spring-boot:runFor help or to discuss:
- Open a GitHub issue
- Join our Discord community
We welcome contributions! Please follow our CONTRIBUTING.md guidelines.
