Skip to content

Petoron Time Burn Cipher (PTBC) - irreversible encryption with time self-destruction and non-recoverability

License

Notifications You must be signed in to change notification settings

01alekseev/PTBC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Petoron Time Burn Cipher (PTBC)

by Ivan Alekseev 2025

Petoron Time-Burn Cipher (PTBC) is a cryptographic system based on time-limited encryption, complete trace elimination, and the impossibility of key recovery or brute-force attacks.

It is designed for secure, temporary data protection where confidentiality and irreversibility are critical. Once the defined time-to-live (TTL) expires, decryption becomes permanently impossible. No keys are stored, no metadata is written, and all sensitive data is erased from memory after execution.


Overview

PTBC can be used for:

  • Secure storage of wallets, seed phrases, and passwords
  • Temporary confidential messages or notes
  • Any time-sensitive or private information

The system operates fully locally, leaving no traces or recoverable keys.


Installation

chmod +x setup_ptbc.sh
./setup_ptbc.sh

Requires Python 3. Argon2id and cryptographic dependencies are installed automatically.


Command-Line Usage

Encrypt

python3 CLI/ptbc_cli.py encrypt <input>.txt <output>.ptbc [options]

Decrypt

python3 CLI/ptbc_cli.py decrypt <input>.ptbc <output>.txt [options]

Options

Flag Description
--ttl <seconds> Sets a time-to-live for the encrypted data. After expiration, decryption is impossible.
--autowipe Automatically deletes the source file after successful encryption.
--onetime Generates a one-time session key that is never stored or reused.
--silent Suppresses console output and runs in quiet mode.

TTL Examples

Duration Example
10 minutes --ttl 600
1 hour --ttl 3600
1 day --ttl 86400
10 years --ttl 315360000

If the specified time expires (for example, 601 seconds for a 600-second TTL), access to the data is lost permanently.


Password Policy

  1. The password is chosen by the user at the time of encryption.
  2. Losing the password means the loss of all data.
  3. The password should never be stored in the same location as the encrypted file.

Cryptographic Design

Key Derivation:
PTBC uses Argon2id via hash_secret_raw() for key generation. Keys are never stored or cached.

memory_cost = 2^18  (256 MB RAM)
parallelism  = 4
time_cost    = 3

A password of 12 characters or more provides protection even against GPU, ASIC, or quantum brute-force attacks.

Cipher:
AES-CFB with a unique IV per encryption. Each file is encrypted differently, even with the same password.

Integrity:
HMAC-SHA512 ensures authenticity and prevents modification. If HMAC verification fails, decryption is denied.

TTL Implementation:
TTL is embedded directly into the ciphertext and verified before HMAC. Even with the correct password, once TTL expires, the file cannot be decrypted.

Memory Hygiene:
Passwords and keys exist only in RAM during operation and are securely destroyed using .destroy() after execution. No temporary files, cookies, metadata, or backups remain.


Examples

Encrypt a file with TTL and auto-wipe:

python3 CLI/ptbc_cli.py encrypt secret.txt secret.ptbc --ttl 3600 --autowipe

Decrypt silently:

python3 CLI/ptbc_cli.py decrypt secret.ptbc secret.txt --silent

Encrypt using a one-time session key:

python3 CLI/ptbc_cli.py encrypt note.txt note.ptbc --onetime

FAQ

Can a .ptbc file be read without the password?
No. Argon2id key derivation makes brute-force or password recovery mathematically impractical.

What happens if the TTL expires?
The ciphertext becomes permanently unrecoverable, even with the correct password.

Where is the key stored?
Nowhere. The key exists only in volatile memory during encryption or decryption and is erased immediately after use.


License

Licensed under the PTBC Fair Use License
© Ivan Alekseev | Petoron


About Petoron Ecosystem

PTBC is part of the broader Petoron cryptographic ecosystem that includes:

  • PCA (Crypto Archiver) — secure data archiving with quantum-resistant methods
  • PSC (Seal Contracts) — tamper-proof digital agreements
  • PLD (Local Destroyer) — local secure file destruction and privacy control
  • PQS (Quantum Standard) — autonomous post-quantum encryption algorithms

Together they form a unified, transparent and independent framework for practical cryptography under the Petoron brand.


No traces. No recovery. No compromise. Only time.

petoron.org