Skip to main content

ZTEB is Tony's Electronic Birthday-Card

Project description

ZTEB -- ZTEB is Tony's Electronic Birthday-Card

Getting Started

$ pip install zteb
$ zteb unwrap

Background Story

Nedelcho Petrov and me, being the great friends that we are, were brainstorming ideas for Tony's (Anton Karakochev) birthday present at the very last moment. Inbetween of trying to find a rather unique and satisfying present and entertaining ourselves, as, did I say, great friends, we considered everything from a set of fresh winter tyres to mount a car onto to some bitcoins (or infinitesimal fractions thereof) to be locked for good as a nice (?) investment for the next twenty years. I thought about this for a while on my own, but concluded that even though such an investment could probably be sufficient to buy a new car, it would be a shame if there are no tyres to mount it on. I took the idea a bit further (or behind) and decided to lock a simple birthday card in an electronic time capsule of some sort, so it could only be read after three days. This would make for some present and prevent Tony from realising what kind of friends he has, or at least in our presence.

About the Project

ZTEB provides a simple command line interface to create a sort of electronic time capsules, the content of which can only be retrieved after a specified amount of time. The functionality is based on the paper Time-lock puzzles and timed-release Crypto by Rivest, Shamir and Wagner and relies on encrypting the contents of the capsule and only exposing information on how to retrieve the encryption key with significant computational effort. In case our current beliefs on complexity classes (P/NP) and prime number factorization techniques are correct, a fixed amount of iterations is required to solve the puzzle. The time it takes to perform a single iteration, however, can vary greatly between various machines and algorithm implementations, the average naturally decreasing as more powerful CPUs are produced. This implementation can create a capsule which takes approximately the specified amount of time to open on the current machine, running the same operating system, running the current code, on the same Python interpreter, using the same...

CLI

Creating a time capsule

Usage: zteb wrap [OPTIONS] CARD OUTPUT

  Wrap an electronic birthday-card.

Options:
  -w, --wrapper-text PATH  Optional path to file containing wrapper text. This
                           is shown while unwrapping the card.
  -d, --duration DELTA     Desired amount of time for the unwrapping to take
                           in the format of pandas.Timedelta.
  --help                   Show this message and exit.

Example

$ zteb wrap amazing-capsule-contents.txt capsule.zteb -d 13:37:00

Opening a time capsule

Usage: zteb unwrap [OPTIONS]

  Unwrap an electronic birthday-card.

Options:
  -c, --card PATH         Path to a wrapped birthday-card. If not specified,
                          the built-incard for Tony's birthday is being
                          unwrapped.
  -o, --output-file PATH  Path to file to store card message to.
  -s, --silent            Suppress all stdout output.
  --help                  Show this message and exit.

Example

$ zteb unwrap -c capsule.zteb

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

zteb-0.1.1.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

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

zteb-0.1.1-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file zteb-0.1.1.tar.gz.

File metadata

  • Download URL: zteb-0.1.1.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.7

File hashes

Hashes for zteb-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5e38d5708e1284ca3fadd4ddd6ac71e604a86d5f8896fb0b284e412f5c5021c1
MD5 efcfb71604f1b90af3adc46a8874e22d
BLAKE2b-256 b20e895ccbcfe6fc49de065fd7a7d1fbbca65017e18009d4e762e557818b5a99

See more details on using hashes here.

File details

Details for the file zteb-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: zteb-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.7

File hashes

Hashes for zteb-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 82d7699e0da91f28ab69de5476095f0025f3c03983a992cf59aa6b543f934d62
MD5 240b3438cf452436038ec8e734a935b4
BLAKE2b-256 6f126cfe7d885bafcfa446af190ce4a5a1f3f7e7a807aa988fbfd4ed2831a52a

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