Skip to main content

Timing attacks

Project description

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)

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

timestrike-0.1.10.tar.gz (39.0 kB view details)

Uploaded Source

Built Distribution

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

timestrike-0.1.10-py3-none-any.whl (27.4 kB view details)

Uploaded Python 3

File details

Details for the file timestrike-0.1.10.tar.gz.

File metadata

  • Download URL: timestrike-0.1.10.tar.gz
  • Upload date:
  • Size: 39.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.5

File hashes

Hashes for timestrike-0.1.10.tar.gz
Algorithm Hash digest
SHA256 d842d7b77466c6307cbc2311a3a3e6ea6f349ee32edfa0c1c68da2cc751a576d
MD5 691cd552eaf3dac67d9f592ff95bcc2d
BLAKE2b-256 07676e8ea97bc82681f123ec0d5c43c4a8f56ec0c846d10bacc53cc1f51db174

See more details on using hashes here.

File details

Details for the file timestrike-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: timestrike-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 27.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.5

File hashes

Hashes for timestrike-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 ddce7112835b15e3d84fe18adff6ecd2a5dd692d3b6c06dd90da6fee66821cc2
MD5 b06b2f3f2b24d78b2360512c3d0e0ee9
BLAKE2b-256 a359b9aa2f74e8101c5caa3b91929a670408e516f3144066f91460fa0839d8af

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