Commit 616847b7 authored by Aditya Shyam Shankar Damodaran's avatar Aditya Shyam Shankar Damodaran
Browse files

First commit

parents
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="description" content="Log in to Jira, Confluence, and all other Atlassian Cloud products here. Not an Atlassian user? Sign up for free."><meta name="google-site-verification" content="HNNnCkeVQ-w56fqPpX2TTEMRmta5QJ-bDunwoaUep-o"><meta name="" content=""><meta name="" content=""><link rel="shortcut icon" href="https://cpfs-cdn.atlassian.com/assets/shared/id-summit/id-summit-aa-favicon.ico"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link rel="preconnect" href="https://t.castle.io"><link rel="preconnect" href="https://api.segment.io" crossorigin><link rel="preconnect" href="https://accounts.google.com"><link rel="preconnect" href="https://sentry.io" crossorigin><title>Log in with Atlassian account</title><style>.grecaptcha-badge{visibility:hidden}.scriptLoadError{display:flex;align-content:center;background-color:#0747a6;position:absolute;top:0;left:0;width:100%;height:100%;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857142857143;letter-spacing:-.005em;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}.scriptLoadError .container{color:#fff;margin:0 auto;align-items:center;display:flex;flex-direction:column}.scriptLoadError .content{background:#fff;border-radius:3px;box-shadow:0 10px 10px rgba(0,0,0,.1);box-sizing:border-box;color:#172b4d;padding:48px;width:400px}.scriptLoadError .content{margin-top:48px}.scriptLoadError .content p:first-child{margin-top:0}.scriptLoadError .content a{text-decoration:none;color:#0052cc}.scriptLoadError .logo{margin-top:48px;margin-bottom:0;font-size:40px;line-height:48px}.scriptLoadError .heading{color:#deebff;font-size:24px;font-weight:500;line-height:28px;margin-top:48px}</style><link href="https://aid-frontend.prod.atl-paas.net/atlassian-id/front-end/5.0.215/static/css/40.508e9338.chunk.css" rel="stylesheet"></head><body data-app-state="{&quot;appConfig&quot;:{&quot;contextPath&quot;:&quot;&quot;,&quot;recaptchaEnterpriseInvisibleKeySite&quot;:&quot;6LcTpeAZAAAAACEXJuZmTp5YVTOUVXnN3TYR_fLM&quot;,&quot;auth0Config&quot;:{&quot;clientId&quot;:&quot;tDP5by46cc3gEck7d2vbHZsqsfrDK6t9&quot;,&quot;tenant&quot;:&quot;atlassian-account-prod&quot;,&quot;domain&quot;:&quot;auth.atlassian.com&quot;,&quot;tokenIssuer&quot;:&quot;https://atlassian-account-prod.pus2.auth0.com&quot;,&quot;callbackUrl&quot;:&quot;https://id.atlassian.com/login/callback&quot;},&quot;recaptchaEnterpriseCheckboxKeySite&quot;:&quot;6LfnteAZAAAAAH3vsGy_TA6P6wBH6jtbMqAeVI8k&quot;,&quot;recaptchaKeySite&quot;:&quot;6LewHQcTAAAAAJgaYVKlQOahz4gnQME8wqUA0z0J&quot;,&quot;segmentIoKey&quot;:&quot;cb2egpwag7&quot;,&quot;recaptchaInvisibleKeySite&quot;:&quot;6LcqAHAUAAAAAKcO583Ymvnq-uRBDPq4njcoW-jK&quot;,&quot;castleAppId&quot;:&quot;337683121243755&quot;,&quot;bitbucketSignupUrlOverrideEnabled&quot;:false,&quot;sentryUrl&quot;:&quot;https://71e54c28be0d49f0bcd732ab30f35faa@sentry.io/275199&quot;,&quot;recaptchaEnable&quot;:true,&quot;bitbucketSignupUrl&quot;:&quot;https://bitbucket.org/account/signup&quot;,&quot;marketingConsentApiUrl&quot;:&quot;https://preferences.atlassian.com/rest&quot;,&quot;googleAuthClientId&quot;:&quot;596149463257-9oquqfivs9on8t8erq23c8qso6vk3cp1.apps.googleusercontent.com&quot;},&quot;featureFlags&quot;:{&quot;aid_signup.microsoft.auth.enabled&quot;:true,&quot;aid_signup.authenticate.via.id.authentication&quot;:false,&quot;aid_signup.disallow.bitbucket.username.login&quot;:true,&quot;aid_signup.apple.auth.enabled&quot;:true,&quot;aid_signup.email_reverification.social_login.enabled&quot;:false,&quot;aid_signup.domain.claim.data.signup.analytics&quot;:true,&quot;aid_signup.make.debug.dcs.call.for.google.auth&quot;:true,&quot;aid_signup.block.csrf.mismatches.login.authorize&quot;:true,&quot;sign-in-with-slack.enabled&quot;:false,&quot;aid_signup.experiment.user_segmentation&quot;:&quot;variation&quot;,&quot;aid_signup.email_reverification.existing_flows.enabled&quot;:false,&quot;aid_signup.passwordless.signup&quot;:false,&quot;aid_signup.logout.adg3&quot;:true,&quot;aid_signup.disallow.passwordless.login.for.google.users&quot;:true,&quot;aid_signup.apple.show.hidden.email.warning.enabled&quot;:true,&quot;aid_signup.google.auth.call.get.user.info&quot;:true,&quot;aid_signup.google.require.otp.verification&quot;:false,&quot;aid_signup.sev.enabled&quot;:true,&quot;aid_signup.default.continue.skip.profile.action&quot;:true,&quot;aid_signup.domain.claim.data.login.analytics&quot;:true,&quot;aid_signup.forced.redirect.session.distribution.enabled&quot;:false,&quot;aid_signup.recaptcha.threshold&quot;:true,&quot;aid_signup.bans.validate.authentication&quot;:true},&quot;hashedCsrfToken&quot;:&quot;2fe2c58429daf3efecfab3e840f8413e326233eff0ff7f45365c2f7aeba2b162&quot;,&quot;csrfToken&quot;:&quot;5494e2fecfa570ad015118b6a90e131b5da6458b&quot;,&quot;microbranding&quot;:{&quot;application&quot;:&quot;bitbucket&quot;,&quot;applicationNameShort&quot;:&quot;Bitbucket&quot;,&quot;applicationLogoClass&quot;:&quot;bitbucket&quot;,&quot;isEmbedded&quot;:&quot;false&quot;,&quot;applicationName&quot;:&quot;Bitbucket&quot;,&quot;applicationBaseURI&quot;:&quot;https://bitbucket.org&quot;}}"><div id="root"><noscript><div class="scriptLoadError"><div class="container"><h1 class="logo">Atlassian</h1><div class="heading">JavaScript is disabled</div><div class="content"><p>You should enable JavaScript to work with this page.</p></div></div></div></noscript><div id="javaScriptLoadError" style="display:none"><div class="scriptLoadError"><div class="container"><h1 class="logo">Atlassian</h1><div class="heading">JavaScript load error</div><div class="content"><p>We tried to load scripts but something went wrong.</p><p>Please make sure that your network settings allow you to download scripts from the following domain:</p><p><b>https://aid-frontend.prod.atl-paas.net/atlassian-id/front-end/5.0.215</b></p></div></div></div></div></div><script>var mfaServerUrl="",ticket="",requestToken="",postActionURL="",userData={userId:"",email:"",friendlyUserId:"",tenant:"",tenantFriendlyName:""},globalTrackingId="";window.onload=function(){document.getElementById("javaScriptLoadError")&&(document.getElementById("javaScriptLoadError").style.display="block")}</script><script>!function(e){function t(t){for(var n,c,f=t[0],i=t[1],u=t[2],l=0,s=[];l<f.length;l++)c=f[l],Object.prototype.hasOwnProperty.call(o,c)&&o[c]&&s.push(o[c][0]),o[c]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(d&&d(t);s.length;)s.shift()();return a.push.apply(a,u||[]),r()}function r(){for(var e,t=0;t<a.length;t++){for(var r=a[t],n=!0,f=1;f<r.length;f++){var i=r[f];0!==o[i]&&(n=!1)}n&&(a.splice(t--,1),e=c(c.s=r[0]))}return e}var n={},o={39:0},a=[];function c(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,c),r.l=!0,r.exports}c.e=function(e){var t=[],r=o[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=o[e]=[t,n]}));t.push(r[2]=n);var a,f=document.createElement("script");f.charset="utf-8",f.timeout=120,c.nc&&f.setAttribute("nonce",c.nc),f.src=function(e){return c.p+"static/js/"+({28:"cancel.account.delete",29:"delete.request.confirmation",30:"expired.password",31:"inactive.account",32:"login",34:"mfa",35:"mfa.apps",36:"mfa.enrollment",37:"multi.factor",38:"pending.deletion"}[e]||e)+"."+{0:"4affbdd5",1:"cb864870",2:"788a6906",3:"febc1b4b",4:"48053a44",5:"5a5ea63e",6:"afeb2962",7:"fd42c014",8:"9d3ec86b",9:"f56384ef",10:"a148f99b",11:"8f1f20a2",12:"13ac8176",13:"69b25e12",14:"1c06953d",15:"6c15c60f",16:"0aee1bda",17:"ee34aeab",18:"8c1595c6",19:"15feb98d",20:"6ba29f7b",21:"052ace4e",22:"7789c2ed",23:"3b8336b0",24:"15cd28b7",25:"b6ee60e7",26:"dd3bdeec",27:"bab41009",28:"7857862a",29:"6cc8dbde",30:"f9b1acf9",31:"87c595db",32:"b0a702c7",34:"e0fded5e",35:"f01b5fc4",36:"34e828f2",37:"20018db2",38:"b3d6016c",41:"0cc26102",42:"bbc93f54",43:"bf78a770",44:"a5b76f1d"}[e]+".chunk.js"}(e);var i=new Error;a=function(t){f.onerror=f.onload=null,clearTimeout(u);var r=o[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+n+": "+a+")",i.name="ChunkLoadError",i.type=n,i.request=a,r[1](i)}o[e]=void 0}};var u=setTimeout((function(){a({type:"timeout",target:f})}),12e4);f.onerror=f.onload=a,document.head.appendChild(f)}return Promise.all(t)},c.m=e,c.c=n,c.d=function(e,t,r){c.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,t){if(1&t&&(e=c(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(c.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)c.d(r,n,function(t){return e[t]}.bind(null,n));return r},c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,"a",t),t},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.p="https://aid-frontend.prod.atl-paas.net/atlassian-id/front-end/5.0.215/",c.oe=function(e){throw console.error(e),e};var f=this["webpackJsonpaid-frontend"]=this["webpackJsonpaid-frontend"]||[],i=f.push.bind(f);f.push=t,f=f.slice();for(var u=0;u<f.length;u++)t(f[u]);var d=i;r()}([])</script><script src="https://aid-frontend.prod.atl-paas.net/atlassian-id/front-end/5.0.215/static/js/40.b457d8d5.chunk.js"></script><script src="https://aid-frontend.prod.atl-paas.net/atlassian-id/front-end/5.0.215/static/js/main.4412f9ee.chunk.js"></script></body></html>
\ No newline at end of file
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
# Unlinkable Updatable Hiding Databases and Privacy-Preserving Loyalty Programs
This repository contains the source code for an implementation of the UUHD (Unlinkable Updatable Hiding Database) primitive described in our paper titled "Unlinkable Updatable Hiding Databases and Privacy-Prserving Loyalty Programs". It also includes an implementation of the Privacy-Preserving Loyalty Program protocol put forward in this paper which uses the aforementioned primitive. These implementations were used to measure the storage and computation costs of the cryptographic operations in our primitive and the protocol, for the _Efficiency Analysis_ sections of our paper.
# Installation
## Virtual Machine (Vagrant)
You can the Vagrantfile in this repository to spin up a virtual machine with a pre-configured execution environment using Vagrant: ([https://www.vagrantup.com/]).
The code will then be accessible from the `/vagrant` directory, in the virtual machine.
## Manual Installation
Our code requires the Charm-Crypto library (v0.50) built with the Relic toolkit (0.5.0) , as described on these pages:
1. Relic toolkit : [https://jhuisi.github.io/charm/relic.html#charm-with-relic]
2. Charm-Crypto [https://jhuisi.github.io/charm/install_source.html#platform-install-manual]
Charm-Crypto additionally requires PBC (v0.5.14) and GMP (v6.2.1).
# Usage
```bash
python3 ./protocol.py 100
```
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://vagrantcloud.com/search.
config.vm.box = "hashicorp/bionic64"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# NOTE: This will enable public access to the opened port
# config.vm.network "forwarded_port", guest: 80, host: 8080
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine and only allow access
# via 127.0.0.1 to disable public access
# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
config.vm.network "public_network"
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
config.vm.provider "virtualbox" do |vb|
# # Display the VirtualBox GUI when booting the machine
vb.gui = true
#
# # Customize the amount of memory on the VM:
vb.memory = "1024"
end
#
# View the documentation for the provider you are using for more
# information on available options.
# Enable provisioning with a shell script. Additional provisioners such as
# Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get install -y openssl gcc python3 python3-pip flex bison byacc git cmake
sudo su
mkdir requirements && cd requirements
wget https://gmplib.org/download/gmp/gmp-6.2.1.tar.xz
wget https://crypto.stanford.edu/pbc/files/pbc-0.5.14.tar.gz
git clone "https://github.com/JHUISI/charm.git"
tar -xvf gmp-6.2.1.tar.xz
tar -xvf pbc-0.5.14.tar.gz
cd gmp-6.2.1
./configure
make
make install
cd ..
cd pbc-0.5.14
./configure
make
make install
cd ..
cd charm/charm/core/math/pairing/relic
wget https://github.com/relic-toolkit/relic/archive/relic-toolkit-0.5.0.tar.gz
tar -xvf relic-toolkit-0.5.0.tar.gz
mkdir relic-target && cd relic-target
../buildRELIC.sh ../relic-relic-toolkit-0.5.0/
cd /home/vagrant/requirements/charm
./configure.sh --enable-pairing-relic
make
make install
ldconfig -v
cd /vagrant
pip install -r requirements.txt
SHELL
end
This diff is collapsed.
import time
import subprocess
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(20)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(20)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(20)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(20)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(20)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
subprocess.call(["python2.7", "vectorcommitment.py"])
time.sleep(10)
This diff is collapsed.
def dict_from_class(cls):
excluded_keys = ["__dict__", "__doc__", "__module__", "__weakref__"]
return dict(
(key, value)
for (key, value) in cls.__dict__.items()
if key not in excluded_keys
)
class ZKInstance:
def __init__(self):
self.bsig = {"Rd": 0, "Sd": 0, "Td": 0}
self.par = {"g": 0, "h": 0, "par_g": [], "par_h": []}
self.vcomd = 0
self.sid = 0
self.pk = {"Z": 0, "U": [], "W": [], "V": 0}
self.par_c = {"h": 0, "g": 0}
self.ins_i = []
self.bh = 0
self.bht = 0
self.comd = 0
def set_bsig(self, R, S, T):
self.bsig["Rd"], self.bsig["Sd"], self.bsig["Td"] = R, S, T
def set_bh(self, bh):
self.bh = bh
def set_par(self, par):
self.par["g"], self.par["h"], self.par["par_g"], self.par["par_h"] = (
par["g"],
par["h"],
par["par_g"],
par["par_h"],
)
def set_vcomd(self, vcomd):
self.vcomd = vcomd
def set_sid(self, sid):
self.sid = sid
def set_pk(self, pk):
self.pk["Z"], self.pk["U"], self.pk["W"], self.pk["V"] = (
pk["Z"],
pk["U"],
pk["W"],
pk["V"],
)
def set_par_c(self, par_c):
self.par_c["h"], self.par_c["g"] = par_c["h"], par_c["g"]
def append_subinstances(self, ins):
self.ins_i.append(dict_from_class(ins))
def set_bht(self, bht):
self.bht = bht
def set_comd(self, comd):
self.comd = comd
class SubInstanceRecord:
def __init__(
self, index=0, ccom_i=0, ccom_ri=0, sig=None, phd_i=0, witd_i=0
):
self.sig = {"R_id": 0, "S_id": 0, "T_id": 0}
self.index, self.ccom_i, self.ccom_ri, self.phd_i, self.witd_i = (
0,
0,
0,
0,
0,
)
self.set_ccom(index, ccom_i, ccom_ri)
self.set_sig(sig)
self.set_phd_i(phd_i)
self.set_witd_i(witd_i)
def set_ccom(self, index, ccom_i, ccom_ri):
self.index = index
self.ccom_i = ccom_i
self.ccom_ri = ccom_ri
def set_sig(self, sig):
self.sig["R_id"], self.sig["S_id"], self.sig["T_id"] = (
sig["R_id"],
sig["S_id"],
sig["T_id"],
)
def set_phd_i(self, phd_i):
self.phd_i = phd_i
def set_witd_i(self, witd_i):
self.witd_i = witd_i
class ZKWitness:
def __init__(self):
self.d1 = 0
self.d2 = 0
self.d3 = 0
self.d4 = 0
self.d5 = 0
self.wit_i = []
def set_d(self, d1, d2, d3, d4, d5):
self.d1, self.d2, self.d3, self.d4, self.d5 = d1, d2, d3, d4, d5
def append_subwitnesses(self, subwitnesses):
self.wit_i.append(dict_from_class(subwitnesses))
class SubWitnessRecord:
# def __init__(self):
# self.index=0
# self.i=0
# self.vr=0
# self.copen_i=0
# self.copen_ri=0
# self.di_1 = 0
# self.di_2 = 0
# self.di_3 = 0
# self.di_4 = 0
# self.di_5 = 0
def __init__(
self,
index=0,
i=0,
vr=0,
copen_i=0,
copen_ri=0,
d1=0,
d2=0,
d3=0,
d4=0,
d5=0,
):
self.set_ivr(index, i, vr)
self.set_copen(copen_i, copen_ri)
self.set_d(d1, d2, d3, d4, d5)
def set_ivr(self, index, i, vr):
self.index, self.i, self.vr = index, i, vr
def set_copen(self, copen_i, copen_ri):
self.copen_i, self.copen_ri = copen_i, copen_ri
def set_d(self, d1, d2, d3, d4, d5):
self.di_1, self.di_2, self.di_3, self.di_4, self.di_5 = (
d1,
d2,
d3,
d4,
d5,
)
import sys
def get_real_size(obj, seen=None):
size = sys.getsizeof(obj)
if seen is None:
seen = set()
obj_id = id(obj)
if obj_id in seen:
return 0
seen.add(obj_id)
if isinstance(obj, dict):
size += sum([get_real_size(v, seen) for v in obj.values()])
size += sum([get_real_size(k, seen) for k in obj.keys()])
elif hasattr(obj, "__dict__"):
size += get_real_size(obj.__dict__, seen)
elif hasattr(obj, "__iter__") and not isinstance(
obj, (str, bytes, bytearray)
):
size += sum([get_real_size(i, seen) for i in obj])
return size
from __future__ import print_function
import hashlib
import multiprocessing
import time