Skip to main content

Secure token generation and verification engine with rate limiting

Project description

๐Ÿ›ก๏ธ SyckSec โ€” Next-Gen Token Security

Unbreakable โ€ข Unpredictable โ€ข Unrecognizable
SyckSec is a context-aware, multi-layer token security system designed to replace brittle, predictable authentication tokens like JWTs.
It blends encryption, obfuscation, visual camouflage, and adaptive intelligence to create tokens that are unreadable, unpredictable, and bound to the environment.


License Python Security Tested


๐Ÿ“œ Table of Contents

  1. Problem
  2. Solution
  3. Core Features
  4. Architecture Overview
  5. Security Advantages
  6. Open Source vs SaaS
  7. Installation
  8. Quick Start
  9. Configuration
  10. API Usage
  11. Security Considerations
  12. Contributing
  13. License
  14. Contact

โ— Problem

Authentication tokens in most applications suffer from:

  • Predictable structures (e.g., JWT = header.payload.signature)
  • Weak context binding (valid anywhere until expiry)
  • Replay vulnerabilities
  • Lack of built-in anti-analysis

Result:
Tokens can be stolen, replayed, or brute-forced offline, leading to costly breaches in finance, healthcare, and government applications.


๐Ÿ’ก Solution

SyckSec creates multi-layer encrypted, context-bound tokens with dynamic obfuscation and visual camouflage.

  • Unreadable: AES-256 encryption + HMAC signature + per-layer random IVs.
  • Unpredictable: Dynamic per-user obfuscation patterns rotate hourly.
  • Unrecognizable: UUID-like visual formatting + checksum validation.
  • Context-Aware: Tokens bound to device, location, and behavior.

๐Ÿ›ก Core Features

Multi-Layer Adaptive Security

  • 1โ€“3 layers of AES-256 encryption
  • HMAC signatures for integrity
  • Constant-time signature verification

Advanced Obfuscation Engine

  • Dynamic pattern generation (hourly)
  • Pattern-based noise injection
  • Base64 encoding with intelligent padding

Visual Camouflage

  • UUID-like formatting
  • SHA-256 checksum
  • Anti-analysis formatting

Context Awareness

  • Device fingerprint binding
  • Location & usage pattern checks
  • Client type identification

Enterprise Features

  • Built-in rate limiting
  • Batch token verification
  • LRU caching for pattern recipes
  • Full audit trail

๐Ÿ— Architecture Overview

Generation


Client Request
โ”‚
โ”œโ”€โ–ถ Token Generator
โ”‚     โ”œโ”€ Context Binding (device/location/behavior)
โ”‚     โ”œโ”€ Payload Signing (HMAC)
โ”‚     โ”œโ”€ Multi-Layer Encryption (AES-256)
โ”‚     โ””โ”€ Visual Camouflage + Checksum
โ”‚
โ””โ”€โ–ถ Secure Delivery (cookie/header)

Verification


Incoming Token
โ”‚
โ”œโ”€โ–ถ Pattern Detection
โ”œโ”€โ–ถ De-camouflage
โ”œโ”€โ–ถ Signature Verification
โ”œโ”€โ–ถ Context Check
โ””โ”€โ–ถ Allow / Reject


๐Ÿ” Security Advantages

Attack Surface JWT (typical) SyckSec (implemented)
Token tampering Signature only Signature + deterministic obfuscation + checksum
Replay exp/nbf only Context binding (device/location/behavior)
Key rotation Manual kid Recipe versioning + per-layer keys
Offline brute force Base64url, 3 dots โ†’ easy to spot UUID-like camouflage + decoys
Stolen token Valid until expiry Self-healing refresh + context check
Mass issuance abuse N/A Built-in rate limiting + audit logs
Side-channel Timing attacks possible Timing variance + constant-time ops

๐Ÿ†“ Open Source vs ๐Ÿ’ผ SaaS

Feature Open Source SaaS / Enterprise
AES Encryption (1โ€“2 layers) โœ… โœ…
AES Encryption (3 layers) โŒ โœ…
HMAC Signature โœ… โœ…
Dynamic Patterns โœ… โœ…
Device Fingerprint Binding โŒ โœ…
GeoIP & Behavioral Analytics โŒ โœ…
Built-in Rate Limiting โŒ โœ…
Dashboard & Forensics Export โŒ โœ…
SLA & Enterprise Support โŒ โœ…

โš™ Installation

# Python SDK
pip install sycksec

๐Ÿš€ Quick Start

from sycksec import SyckSec
import os

# Set secret (in production, use env vars)
os.environ['SYCKSEC_SECRET'] = 'your-secure-secret-32-chars-long!'

# Initialize client
sycksec = SyckSec()

# Custom recipe
custom_recipe = {
    "version": "custom_secure_v1",
    "pattern": [10, "core", 15, "core", 8],
    "charset": "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_=+",
    "randomize_noise": False,
    "noise_variance": 0
}

# Device info (optional)
device_info = {
    "fingerprint": "web_browser_123",
    "location": "US",
    "pattern": "standard",
    "client_type": "web"
}

# Generate token
token = sycksec.generate(
    user_id="test_user_123",
    ttl=3600,  # 1 hour
    device_info=device_info,
    custom_recipe=custom_recipe
)

print("Generated Token:", token)

โœ… Verify a Token

# Verify token with custom recipe
payload = sycksec.verify(
    token=token,
    user_id="test_user_123",
    custom_recipe=custom_recipe
)

print("Verified Payload:", payload)

โ™ป Refresh Token if Needed

# Simulate near-expiry in test mode
os.environ['SYCKSEC_ENV'] = 'test'  # For demo; remove in production

refreshed_token = sycksec.refresh_token_if_needed(
    token=token,
    user_id="test_user_123"
)

if refreshed_token:
    print("Refreshed Token:", refreshed_token)
else:
    print("Token still valid, no refresh needed")

๐Ÿ“ก API Usage

  • generate(user_id, context, custom_recipe) โ€” Create a new token bound to the provided context.
  • verify(token, user_id, custom_recipe) โ€” Verify, decrypt, and check context validity.
  • refresh_token_if_needed(token, user_id) โ€” Refresh before expiry while keeping context.

โš  Security Considerations

  • Always transmit SyckSec tokens over HTTPS.
  • Use HttpOnly + Secure cookies for web delivery.
  • Enable context binding for sensitive applications.
  • Rotate keys regularly in SaaS mode.
  • Review audit logs for anomalies.

๐Ÿค Contributing

We welcome contributions! See CONTRIBUTING.md for details.


๐Ÿ“œ License

  • Core SDKs โ€” MIT License (Open Source)
  • Enterprise SaaS โ€” Proprietary License

๐Ÿ“ฌ Contact

Website: https://sycksec.com Email: contact@sycksec.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sycksec_token-1.0.0.tar.gz (27.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sycksec_token-1.0.0-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

Details for the file sycksec_token-1.0.0.tar.gz.

File metadata

  • Download URL: sycksec_token-1.0.0.tar.gz
  • Upload date:
  • Size: 27.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for sycksec_token-1.0.0.tar.gz
Algorithm Hash digest
SHA256 6e7d9a63b99368bef922050e8e65d6b038fe3a52413cc67f05542375ecc03baa
MD5 bc897ac78046a725100b601b8c948bea
BLAKE2b-256 e132c7e90bf2f513b114a08f80efc6c65ab846ae784388368ef442f765535fec

See more details on using hashes here.

File details

Details for the file sycksec_token-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: sycksec_token-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 23.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for sycksec_token-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 51159b382d58e28925bc404ca729647ec95c6298bdb985452a205f3f097ab523
MD5 cf98b64974956a304ff357038c24b757
BLAKE2b-256 d9ef5d15a4acb71f54f073cfd019c685ab489c75e692d7d9c7835b35d8d3a7e1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page