npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mdkva/encryptionkit

v0.1.0

Published

MDKVA EncryptionKit provides clean, reliable, and easily accessible encryption options ideal for apps, AI systems, and automation projects.

Readme

🛠️ MDKVA EncryptionKit

A lightweight, high-performance, dependency-free cryptographic toolkit for Node.js. Built completely with modern ES Modules (ESM) and leveraging Node's native crypto engine, EncryptionKit bridges the gap between historical ciphers and modern industry-standard protocols.

Whether you need to securely encrypt user payloads with AES-256-GCM, manage asymmetric handshakes via RSA, or experiment with classical mathematical ciphers like the Hill or Playfair networks, EncryptionKit provides a clean, unified, and highly scannable API architecture.


🚀 Features

  • Zero External Dependencies: Built entirely on Node.js native primitives for maximum security and performance.
  • Modern ESM Native: Fully supports tree-shaking out of the box (import/export).
  • Modular Architecture: Every algorithm lives in its own dedicated sub-module file, ensuring clean extension and maintainability.
  • Comprehensive Suite: Spans everything from 1st-century Caesar shifts to modern authenticated block and stream ciphers.

📂 Project Structure

encryptionkit/
├── package.json          # Configured with "type": "module"
├── index.js              # Primary API aggregator (Unified Export)
├── encryptionkit.js      # Internal bridge and configuration orchestrator
└── ciphers/              # Isolated algorithm modules
    ├── aes.js            # Symmetric AES-256-GCM
    ├── rsa.js            # Asymmetric Keypair & PKCS1
    ├── hash.js           # SHA-256 & Keyed HMAC
    ├── monoalphabetic.js # Caesar, Shift, & Custom Substitution
    ├── playfair.js       # 5x5 Matrix Digram Cipher
    ├── hill.js           # Matrix Linear Algebra (2x2 Modular Inverse)
    ├── polyalphabetic.js # Vigenère Cipher
    └── streamblock.js    # RC4 Stream Engine & Feistel Block Network

💻 Installation & Setup

  1. Clone or copy the directory structure into your project.
  2. Ensure your project's package.json contains "type": "module" to support ES imports:
{
  "name": "MDKVA",
  "type": "module",
  "scripts": {
    "dev": "vite dev"
  },
  "dependencies": {
  }
}

📖 API Documentation & Usage

1. Modern Production-Grade Cryptography

Symmetric Encryption (AES-256-GCM)

Uses authenticated encryption to guarantee both confidentiality and payload integrity. Returns a safe, colon-separated string string layout (iv:authTag:ciphertext).

import { encryptAES, decryptAES } from './encryptionkit/index.js';

const secretKey = "32_character_long_secret_key_!!!"; // Must be 32 bytes
const secretMessage = "Simplifying Life with Human-Centered Tech";

// Encryption
const encrypted = encryptAES(secretMessage, secretKey);
console.log('AES Output:', encrypted); 

// Decryption
const decrypted = decryptAES(encrypted, secretKey);
console.log('Decrypted:', decrypted);

Asymmetric Encryption (RSA)

Perfect for key exchanges and small, highly secure data payloads.

import { generateRSAKeyPair, encryptRSA, decryptRSA } from './encryptionkit/index.js';

// Generate 2048-bit PKCS1 Keypair
const { publicKey, privateKey } = generateRSAKeyPair();

const encrypted = encryptRSA("Secure Handshake Payload", publicKey);
const decrypted = decryptRSA(encrypted, privateKey);

Hashing & HMAC

One-way transformations for integrity verification and API signatures.

import { hashSHA256, generateHMAC } from './encryptionkit/index.js';

const fileHash = hashSHA256("Target Data String");
const apiSignature = generateHMAC("PayloadData", "WebhookSecretKey");

2. Classical & Algorithmic Ciphers

Caesar / Arbitrary Shift Ciphers

import { encryptShift, decryptShift } from './encryptionkit/index.js';

const cipherText = encryptShift("Hello Space", 7); // Shifts alphabet by 7
const plainText = decryptShift(cipherText, 7);

Monoalphabetic Substitution

Requires a unique, pre-scrambled 26-character alphabet string mapping key.

const customAlphabet = "ZEBRASCDFGHIJKLMNOPQTUVWXY"; 
const encrypted = encryptMonoAlphabetic("Secret Message", customAlphabet);
const decrypted = decryptMonoAlphabetic(encrypted, customAlphabet);

Playfair Cipher

Encrypts digrams (pairs of characters) using a structural $5 \times 5$ matrix keyword. Automatically normalizes text by replacing 'J' with 'I' and injecting padding tokens ('X') where needed.

import { encryptPlayfair, decryptPlayfair } from './encryptionkit/index.js';

const key = "MONARCHY";
const encrypted = encryptPlayfair("GOLDMEDAL", key);
const decrypted = decryptPlayfair(encrypted, key);

Hill Cipher

An advanced algebraic cipher utilizing matrix multiplication modulo 26. The key parameter requires a mathematically invertible $2 \times 2$ matrix.

import { encryptHill, decryptHill } from './encryptionkit/index.js';

const invertibleMatrix = [
  [5, 8],
  [17, 3]
];

const encrypted = encryptHill("CODE", invertibleMatrix);
const decrypted = decryptHill(encrypted, invertibleMatrix);

Polyalphabetic (Vigenère) Cipher

Dynamically shifts characters across a rolling landscape using a repetitive keyword index.

import { encryptVigenere, decryptVigenere } from './encryptionkit/index.js';

const encrypted = encryptVigenere("Human Centered Tech", "FOCUS");
const decrypted = decryptVigenere(encrypted, "FOCUS");

3. Dedicated Architectural Components

Stream Cipher (RC4 Engine)

A fast, byte-oriented symmetric stream cipher leveraging a key-scheduling algorithm state machine wrapper.

import { encryptRC4, decryptRC4 } from './encryptionkit/index.js';

const hexEncrypted = encryptRC4("Streaming Data Payload", "SystemStreamKey");
const plainText = decryptRC4(hexEncrypted, "SystemStreamKey");

Block Cipher (Feistel Network)

A conceptual, multi-round pedagogical block transformation machine. Performs deterministic chunk slicing, padding via custom PKCS7 constraints, and multi-stage block scrambling based on a numeric integer key.

import { encryptBlockFeistel, decryptBlockFeistel } from './encryptionkit/index.js';

const numericKey = 43981; // 16-bit integer key
const encryptedHex = encryptBlockFeistel("Block Payload Structure", numericKey);
const decryptedText = decryptBlockFeistel(encryptedHex, numericKey);

🛠️ Performance & Security Notice

[!WARNING] While aes, rsa, and hash modules leverage production-grade primitives backed natively by OpenSSL via Node's internal engine, the classical and architectural modules (playfair, hill, monoalphabetic, rc4, feistel) are built for educational prototyping, algorithmic demonstrations, and simulation environments. Do not use classical ciphers to protect production financial or health metadata.


📜 License

MIT License. Designed with intentionality and built to empower everyday ambition. Feel free to expand, break down, and integrate these systems into your microservices.