RobertDurfee / timing-analysis

Python3 library for sophisticated timing attacks using Gaussian Mixture Model.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

timing-analysis

An API to make sophistacted timing analysis using Gaussian Mixture Models, among others.

Example usage script:

import password_timing_analysis
import time

PW = "SuPerDupeRStrongPassw0rd"

# Dummy string compare function
def str_compare(str1, str2):
    return str1 == str2

# This query function must be implemented by the user and provided to Timea constructor.
def example_queryf(candidate):
    t1 = time.process_time()
    str_compare(candidate, PW)
    t2 = time.process_time()
    return (t2 - t1) * 10**9

# Create Timea object - provice timing query function and length of password (when to stop).
timea = password_timing_analysis.Timea(example_queryf, len(PW), decision_metric="gmm", decision_rule="max", queries=500)

timea.run()
  • Metrics that can be used: "gmm", "mean", "median", "variance" or "percentile"
  • Decision rules based on metric: "max", "min"

For more options, just look in the code - it's not much :P

About

Python3 library for sophisticated timing attacks using Gaussian Mixture Model.


Languages

Language:Python 100.0%