Skip to main content

Timestrike

Python library for timing attacks

Usage

The library provides two functions: get_length to obtain the length of the key, and get_key to obtain its content. They only require the user to define the function that gives the processing time of a given string.

Examples

import socket
import time
from timestrike import get_key

def measure_time(message):
    with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
        s.connect(('localhost', 1337))
        s.sendall(message.encode())
        start_time = time.time()
        s.recv(1024)
        end_time = time.time()
        response_time = end_time - start_time
        s.close()
        return response_time

k = get_key(measure_time, sample=3)
print(k)

Metadata

Release files for timestrike 0.1.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for timestrike 0.1.10
File Size Uploaded
timestrike-0.1.10.tar.gz 39.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for timestrike 0.1.10
File Interpreter ABI Platform
timestrike-0.1.10-py3-none-any.whl Python 3 none any Details

Total release size: 66.4 kB

Release files / timestrike-0.1.10.tar.gz

Download URL timestrike-0.1.10.tar.gz
Size 39.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d842d7b77466c6307cbc2311a3a3e6ea6f349ee32edfa0c1c68da2cc751a576d
BLAKE2b-256 checksum
How to use checksums
07676e8ea97bc82681f123ec0d5c43c4a8f56ec0c846d10bacc53cc1f51db174
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.5

Release files / timestrike-0.1.10-py3-none-any.whl

Download URL timestrike-0.1.10-py3-none-any.whl
Size 27.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ddce7112835b15e3d84fe18adff6ecd2a5dd692d3b6c06dd90da6fee66821cc2
BLAKE2b-256 checksum
How to use checksums
a359b9aa2f74e8101c5caa3b91929a670408e516f3144066f91460fa0839d8af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.5

Release history Release notifications | RSS feed

This release

0.1.10 This release

2 release files

0.1.9

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page