PIYUSH-MISHRA-00/Kaalka-Encryption-Algorithm

Kaalka Encryption is designed to work seamlessly across multiple platforms and provides a versatile encryption mechanism that incorporates the progressive value of time. By using dynamic time-based encryption, you can achieve secure communication that is inherently bound to a specific moment in time.

JavaScript

4

61 commits

updated Mar 19, 2026

See the code

See what people are saying

SourceMessageScoreDate

You don't need much apps (r/LocalLLaMA)

I built an app because I got tired of making apps.For the past several months I've been working on an idea I had at the beginning of the year: what if, instead of downloading a different app for every small thing, you could just describe what you need?So I built Anything. You can type something…

0

Oct 3, 2026

README

DOI

"Buy Me A Coffee"

Kaalka Encryption Algorithm

🌐 Live Website

Time is the Key 🔑

🌟 Overview

Kaalka is a robust, time-driven encryption protocol for cross-platform security. It leverages clock angles, trigonometric functions, and time-based transformations—making every encryption unique to its timestamp. Kaalka supports envelope, seal, replay protection, chunked file encryption, and a CLI tool, all implemented natively in Python, JavaScript, Java, Kotlin, and Dart.


🚀 Features

  • Time-First Protocol: Envelope, seal, replay protection, time window
  • Envelope & Seal: Canonical structure, time-based integrity MIC
  • Replay Protection: In-memory ledger, auto-expiry
  • Chunked File Encryption: Large file support, lossless roundtrip
  • CLI Tool: Encrypt, decrypt, envelope, file operations
  • Cross-Platform: Identical logic in Python, JS, Java, Kotlin, Dart
  • Flexible API: System or user-defined timestamp
  • Production-Ready: Fully tested, documented, and versioned (v5.0.0)

📦 Supported Languages

Python · Node.js · Java · Kotlin · Dart

💻 Quick Start

Python

from kaalka import Kaalka
kaalka = Kaalka()
encrypted = kaalka.encrypt("Hello")
decrypted = kaalka.decrypt(encrypted)
# Explicit timestamp
encrypted_exp = kaalka.encrypt("Hello", time_key="12:34:56")
decrypted_exp = kaalka.decrypt(encrypted_exp, time_key="12:34:56")

Java

Kaalka kaalka = new Kaalka();
String encrypted = kaalka.encrypt("Hello");
String decrypted = kaalka.decrypt(encrypted);
// Explicit timestamp
String encryptedExp = kaalka.encrypt("Hello", "12:34:56");
String decryptedExp = kaalka.decrypt(encryptedExp, "12:34:56");

Kotlin

val kaalka = Kaalka()
val encrypted = kaalka.encrypt("Hello")
val decrypted = kaalka.decrypt(encrypted)
// Explicit timestamp
val encryptedExp = kaalka.encrypt("Hello", "12:34:56")
val decryptedExp = kaalka.decrypt(encryptedExp, "12:34:56")

Dart

final kaalka = Kaalka();
final encrypted = kaalka.encrypt('Hello');
final decrypted = kaalka.decrypt(encrypted);
// Explicit timestamp
final encryptedExp = kaalka.encrypt('Hello', timeKey: '12:34:56');
final decryptedExp = kaalka.decrypt(encryptedExp, timeKey: '12:34:56');

JavaScript

const Kaalka = require('kaalka');
const kaalka = new Kaalka();
const encrypted = kaalka.encrypt("Hello");
const decrypted = kaalka.decrypt(encrypted);
// Explicit timestamp
const encryptedExp = kaalka.encrypt("Hello", "12:34:56");
const decryptedExp = kaalka.decrypt(encryptedExp, "12:34:56");

🛡️ Protocol & CLI Highlights

  • Envelope: senderId, receiverId, timestamp, window, seq, ciphertext, seal
  • Seal: Time-based integrity MIC, auto-expiry, replay protection
  • Chunked File: Large file support, chunk index + timestamp
  • Explicit Timestamp Support:
    • All APIs and CLI commands allow you to pass a custom timestamp for encryption and decryption.
    • This enables time-variant security and cross-platform compatibility.
  • CLI Tool:
    • encrypt --in <inputFile> --out <outputFile> --sender <id> --receiver <id> --timestamp <time>
    • decrypt --in <inputFile> --out <outputFile> --receiver <id> --timestamp <time>
    • envelope --text "message" --sender <id> --receiver <id> --timestamp <time>

🧪 Testing & Reliability

  • Unit Tests: Protocol, envelope, seal, replay, chunking, CLI
  • Cross-Platform: Identical results across all supported languages
  • Production-Ready: All tests pass, robust error handling

📚 Documentation & API

  • API Reference:
    • encryptEnvelope(plaintext, senderId, receiverId, timestamp?)
    • decryptEnvelope(envelope, receiverId, timestamp?)
    • encryptFileChunks(fileBytes, senderId, receiverId, timestamp?)
    • decryptFileChunks(chunks, receiverId, timestamp?)
  • CLI Usage: See above
  • Changelog: See CHANGELOG.md

🔄 Cross-Platform Compatibility


🤝 Contributing

Contributions, bug reports, and feature requests are welcome.
Submit issues or pull requests via GitHub.


💡 Author & Credits

Developed and maintained by Piyush Mishra.
Thanks to contributors across all supported language implementations.

Time is the Key.

PIYUSH-MISHRA-00/Kaalka-Encryption-Algorithm

Kaalka Encryption is designed to work seamlessly across multiple platforms and provides a versatile encryption mechanism that incorporates the progressive value of time. By using dynamic time-based encryption, you can achieve secure communication that is inherently bound to a specific moment in time.

JavaScript

4

61 commits

updated Mar 19, 2026

See the code

See what people are saying

SourceMessageScoreDate

You don't need much apps (r/LocalLLaMA)

I built an app because I got tired of making apps.For the past several months I've been working on an idea I had at the beginning of the year: what if, instead of downloading a different app for every small thing, you could just describe what you need?So I built Anything. You can type something…

0

Oct 3, 2026

README

DOI

"Buy Me A Coffee"

Kaalka Encryption Algorithm

🌐 Live Website

Time is the Key 🔑

🌟 Overview

Kaalka is a robust, time-driven encryption protocol for cross-platform security. It leverages clock angles, trigonometric functions, and time-based transformations—making every encryption unique to its timestamp. Kaalka supports envelope, seal, replay protection, chunked file encryption, and a CLI tool, all implemented natively in Python, JavaScript, Java, Kotlin, and Dart.


🚀 Features

  • Time-First Protocol: Envelope, seal, replay protection, time window
  • Envelope & Seal: Canonical structure, time-based integrity MIC
  • Replay Protection: In-memory ledger, auto-expiry
  • Chunked File Encryption: Large file support, lossless roundtrip
  • CLI Tool: Encrypt, decrypt, envelope, file operations
  • Cross-Platform: Identical logic in Python, JS, Java, Kotlin, Dart
  • Flexible API: System or user-defined timestamp
  • Production-Ready: Fully tested, documented, and versioned (v5.0.0)

📦 Supported Languages

Python · Node.js · Java · Kotlin · Dart

💻 Quick Start

Python

from kaalka import Kaalka
kaalka = Kaalka()
encrypted = kaalka.encrypt("Hello")
decrypted = kaalka.decrypt(encrypted)
# Explicit timestamp
encrypted_exp = kaalka.encrypt("Hello", time_key="12:34:56")
decrypted_exp = kaalka.decrypt(encrypted_exp, time_key="12:34:56")

Java

Kaalka kaalka = new Kaalka();
String encrypted = kaalka.encrypt("Hello");
String decrypted = kaalka.decrypt(encrypted);
// Explicit timestamp
String encryptedExp = kaalka.encrypt("Hello", "12:34:56");
String decryptedExp = kaalka.decrypt(encryptedExp, "12:34:56");

Kotlin

val kaalka = Kaalka()
val encrypted = kaalka.encrypt("Hello")
val decrypted = kaalka.decrypt(encrypted)
// Explicit timestamp
val encryptedExp = kaalka.encrypt("Hello", "12:34:56")
val decryptedExp = kaalka.decrypt(encryptedExp, "12:34:56")

Dart

final kaalka = Kaalka();
final encrypted = kaalka.encrypt('Hello');
final decrypted = kaalka.decrypt(encrypted);
// Explicit timestamp
final encryptedExp = kaalka.encrypt('Hello', timeKey: '12:34:56');
final decryptedExp = kaalka.decrypt(encryptedExp, timeKey: '12:34:56');

JavaScript

const Kaalka = require('kaalka');
const kaalka = new Kaalka();
const encrypted = kaalka.encrypt("Hello");
const decrypted = kaalka.decrypt(encrypted);
// Explicit timestamp
const encryptedExp = kaalka.encrypt("Hello", "12:34:56");
const decryptedExp = kaalka.decrypt(encryptedExp, "12:34:56");

🛡️ Protocol & CLI Highlights

  • Envelope: senderId, receiverId, timestamp, window, seq, ciphertext, seal
  • Seal: Time-based integrity MIC, auto-expiry, replay protection
  • Chunked File: Large file support, chunk index + timestamp
  • Explicit Timestamp Support:
    • All APIs and CLI commands allow you to pass a custom timestamp for encryption and decryption.
    • This enables time-variant security and cross-platform compatibility.
  • CLI Tool:
    • encrypt --in <inputFile> --out <outputFile> --sender <id> --receiver <id> --timestamp <time>
    • decrypt --in <inputFile> --out <outputFile> --receiver <id> --timestamp <time>
    • envelope --text "message" --sender <id> --receiver <id> --timestamp <time>

🧪 Testing & Reliability

  • Unit Tests: Protocol, envelope, seal, replay, chunking, CLI
  • Cross-Platform: Identical results across all supported languages
  • Production-Ready: All tests pass, robust error handling

📚 Documentation & API

  • API Reference:
    • encryptEnvelope(plaintext, senderId, receiverId, timestamp?)
    • decryptEnvelope(envelope, receiverId, timestamp?)
    • encryptFileChunks(fileBytes, senderId, receiverId, timestamp?)
    • decryptFileChunks(chunks, receiverId, timestamp?)
  • CLI Usage: See above
  • Changelog: See CHANGELOG.md

🔄 Cross-Platform Compatibility


🤝 Contributing

Contributions, bug reports, and feature requests are welcome.
Submit issues or pull requests via GitHub.


💡 Author & Credits

Developed and maintained by Piyush Mishra.
Thanks to contributors across all supported language implementations.

Time is the Key.

Languages

JavaScript

53.9%

HTML

23.3%

CSS

22.8%