Skip to main content

Quantitative Information Flow library

Project description

libqif

Install

pip install qiftmp
  • Needs python >= 3.8 and a sandybridge or later CPU
  • On linux pip >= 19 is needed (make sure to pip install -U pip)

A sample program

from qiftmp import *

def compute_bayes(C):
	pi = probab.uniform(C.shape[0])

	print("Channel:\n", C)
	print("Prior:\n", pi)

	print("Bayes vulnerability", measure.bayes_vuln.posterior(pi, C))
	print("Bayes mult-capacity", measure.bayes_vuln.mult_capacity(C))

compute_bayes(channel.randu(5))

# same, but using rational arithmetic
set_default_type(rat)

C = numpy.array([
	[rat(1,2), rat(1,4), rat(1,4)],
	[rat(1,6), rat(3,6), rat(2,6)],
	[rat(1,2), rat(1,2), rat(0)],
])
compute_bayes(C)

Documentation

A list of methods provided by qiftmp is available here.

Use libqif with C++

See the installation instructions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

qiftmp-1.2.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file qiftmp-1.2.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for qiftmp-1.2.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5853ee9e06f19ae7b215611c8c1aa5e035af7188e5e2f5aa84136222dde49394
MD5 f8bf17b542d12d3cff62bdc2aa6d2604
BLAKE2b-256 3b5b3c3914a8af348b113af398f94aa2f769a1b7678df46cf7a51f3894fd14f5

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