/circuits_janus

Collection of Janus secure computation circuits

Primary LanguageGo

Janus Paper Repository and Code Disclosure

Running the zero knowledge opening of related approaches

Jump into the folder gnark_zkp and run go mod init gnark_zkp, then run go mod tidy and then run a sample exection of the opening algorithm as go run main.go -debug -tls13-zkopen -byte-size 256 -iterations 1

Running the 2PC circuits

The circuits are in the location 2pc_circuit/tls_mpc/apps/garbled/examples. Inside the 2pc circuit files, you find the commands of the garbler and evaluator and TLS 1.3 sample values that are used for the verification of the circuit. An example execution of a the semi-honest ZKP system (256B request and 2kB response) is as follows. Jump with each terminal into the folder 2pc_circuit/tls_mpc/apps/garbled and first execute go build .. Then, take one terminal and run the command MPCLDIR=./../../ ./garbled -e -v -i 0x677f7ff26ac202469e1a2d39dc001c5e7fcfb1f967a3cb4affa51185facc57ac,0x002012746c7331332073206873207472616666696320825e4f79bbcb0e8adb287cac19c378145b7d6c465734422da6882463eadc905701,0x00200d746c733133206465726976656420e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b85501,0x002012746c7331332073206170207472616666696320803fe80818374bc995571054979e54a316f266b4908ed43f5df4752bdef093b801,0x002012746c7331332063206170207472616666696320803fe80818374bc995571054979e54a316f266b4908ed43f5df4752bdef093b801,0x000c08746c7331332069760001,0x001009746c733133206b65790001,0x6b5a4bc34ffc0ec4b421d963eee0bc58cc4625e785b3750d022f2e723487cd75ca2fcb5a8e4f93670b8828317c31e1849f6be9a5a72af1a0090da1c38517192182a4077132811ecf5cf27065717ae12213da489f4099fb1ad6ee30b0758cbd6e6fb3f11312dcf828ae41db7d3ff4e05541aabbddcd82dd0f9f217390db6c115a4de66089d5e5b59f7936ba5f627d671792e734db93bc7732ee074fbd2aed856091ef9529ebf01492a8b327fe42656cef9137fdebcdcf2a39be9d8c8a2acb3f0018740222919e7c2d753bcfacceb0f57d9a90a0022aed4f7c69f8b5cb0474b7579f368aed9e84f033332f0790bc262f1fe0935a10ac3a79ee4634890128031b51,0xc1277aac165282cd00923481d919c6449b9f770b76bf15f63a02c087e144f0715853f1729d92200a766040d3ec296e298cf82d263dc1499e7f1fe82115c8a3af0d03b162ee94e5267e4bb93f5c768cae72028ef51b0a6600a5efce6e4497d4e78356bd3aaff702d3297272182b2407dcd2c0c97cec3c34773cee99c8e284c908d36145eca39268b4df4d5ee99d858a5c45629cab2ee8d781188f2bc69341a7fb1cf9427fe5fb2471ae3de52a24cd707e2a19da3baf9096ab21c1c1a1a38f9f95445b598504a2481280b1a77e73c8c2fa41d6bbd37c688f1159b915f28d937dbea1dbc137c68d64e629d011037daead13dc0d68db3633f38b4ed412d7ecda8db41880944ef7fb333752b82e841cf9a4e6c279a8cb2cd5f60aa1d759404790fd834803ce6094fd4680f65c244d847412ebaf2b6371283dab666830e436056dfa05659c97af6d479b8362c7f69f86b25407b84d5784db699214eec1ee86dcf5fe6630a711f6c631564f6e123e9070727f6d8e1f0baec18c8b850165c7719f16960ac54da0d92971dc2b060c42690155466e7fa38246a3ce70da8913d203e953ce517345eaf04723a7dd4697914f71d62a0e568834202048dbe1a7d5065bee958e3b862d61d929f4dd9f9799131bbcae787375ddb79ac6dae0b782b3edb4fedaec8bff49eb2f23f235436743e32bb0e48591d22de85d24c5191a4548ab9aae82471c133a8021408dffabc37ad734b2c4b73983846d8798b4891184f62a5ca8eaba20076087c945b5b361b6ea656b3a101745375b5166e697c5d22e482425facb650986e0fa0c93f3aed927726721e80f03732b2f57fa8e7d40cfb3e2c9213998e9590a7cea3b3845f9ef3e18606b73347f8dd25dc149b74490c386e913b740ae10c90dd5373205e34528be701d2f2181e20d98ba7c1d0a6a97b497540436b15aea62666651ee1d4db741125e27bb0b5f830cee04203b222b7364c18535ea067f3f022e24268b2b69d77c3c32c1a86849dc4754f5aacbd655c4d3321199ee28c9a39d6b641cb0f23c6702941c8dbc50be8add290fc93875a9061d0874c1a341ee5e75b3943ff2d0019e5a2521c924d0b890bdfd6b41f72e970bcff6af45b5dc9151e7fc64a6f122e6ff7101cf127cafd27f8835dd2d64047dde2b79c1c731559f3e50f6dea1258f96c78f86d9b02e11e06437fb16bccf87642948c7499a59fb91466be89f0895e0636a6c434a07c135d2679d19261baa05279c6ad7d057379d1a418cb4d9db953a58ad151b56cda988290d1d1b1bddd2dc91fbd3d6dd08aba8715f262453690412d19c1530a3a5eadc478d6d8efdb6c7f42b00373bc994eb01fdc1b3cca62afec87c9466c61dee603784c99b69b1a33f33c8349279879b68d691c80a0f49052f69b95f4e795e912587661ff435fc64d15ee5bf69b23c9acba15c2dc84c552e44bfef889467e703bd1e84af9132f765e055ce47d43597775d0c6c423ec05b1e6d29f3345e6c275693c38e9872825ebb3f5c5a6f5b6d94d6c6dfe9d120934f2ecdfccb7ea642b4059a1c9c5e7d610007ed966dd8674a1947543902bb9a52306493dbf8d816d58b6113b8915c6b4dfe341b6807ab3f1551ecbd890504dc5f49895d974ed7e6eb2a8233249f0e859fea0a92b898079573c9294514af0cbd8a6236e2b44c2fd7853fd1b20d2c06fe2d43ae059f3416609cea41f0b4aa8aa55079e0eb9ad0ac8f739d00f29ffe86a0d2d499578af15b786b5d022a38433d08f81cc4c530c2956e16444e8eb089ac74e44627e876bac46502aec701640d199462a807cefe8868b4b504424d3dbee566f8ba3ab46bd969908244f898c01a46d17544e38332dd2dc9b0a9c30cec514bc41398a9082deda9c1939975dd50ae94a80a82ff747ec36458b63ca8846ad3aeca884f8b07441626b6c4cc046ff65eeb4c5e199a6633b86358c58405e8191772801d695494815d2865bb962da90c8e29c52401e2aef677674c129cadb3c00c4bbecb48da088e1816d5d01e9206bbffe2be19383f0937abcd00fbc39da4fcdbae230445072c7f0ac9584b464c5b6ff485aae535a6e646a8a8896df8d7300c576a3303f8bb9ec3f9cae6c888de1201fd9587731aa365c298fef819f1e9e6062337dad599332fc29342d5107cb62614ebb9b42894976fbacd776a35f0513a1ed0460523784b9ed3c22516abc488d2d514cd74aa92c81357da35b3f96521c30c9815480449ba74b77fec778ea456e0075dc4e3374816aedd75dde828091d3d1862f7f4ce1f7f1dc1482fd08a32813b15b2f703a2b22f32adfcc85dee365f38fb3835947c2782683fbadb9878f4c7383c16edbe24961f3ffcbae1332d9d99be299cb66e87cf508d99230446686b40a3ce3ae85d329b512a89071dccf278a773432338eddef3cfa34c13809a19c5cc75b141aebb3cc56e95dae178ec0393eff6f0caa9c21c88061c873569e7a5a9b4447cb45f4bd594d43028fb400733bb5632d57e4b10ce18ebcaf556443e09b864ba9748ec535c7e1ae8b9db9b66022f357f6963d92771b03bb3bdcb278cc9f97b05180009c076184a644cc836280206008251e0d85dbbc747b23fe70b8c5c87e4b6f456cd40f5501853f93ee5f109ecdf5aa8902d7b49086b497c276862d2f15d123bbff236e5ca156360ed08593e4847b49a4788b5eb12749969bb9a219f3e87dc972eca0657b48eace64c3b056e0fc136671c61c486768fabe070ca89e397844172bdd6e0754f667b8a211ee789047b27b8a0982acb5d5d93bb7ac60d38cc6fc71eecc4e79826e80a8b3e44263643579125cd5a2fee57db4693d7b5ed64380a3cf8ef9a9a6492982f93f301b73dc2717357a4892c52a99bc0b7b664a19555c1b27da5ec75 examples/janusV2_private2kB256B.mpcl, then take another terminal and run the command MPCLDIR=./../../ ./garbled -v -i 0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff,0xfbe470a4a1e11bbaa2ebb9da082924f99a20681e5feed0000e2d2b5e613d22df,0x6f2615a108c702c5678f54fc9dbab69716c076189c48250cebeac3576c3611ba,0x7691bca4c1a92ffc70efe68a178d928540f47254512c290693fbc2a8c28ab59c,0x9b89f7120fe41972a4e81f2e63453807,0x895b8c63da8da17e9d6d30c62f09d6f5,0xf8895999038a3cb1169a882ebba33ca5,0xf0cecf8cdd4452c1f77a297cff13a605,0x01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101,0x0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101 examples/janusV2_private2kB256B.mpcl. All files which start with tls13 or janusV2 have been generated and used to evaluate the paper under submission. The collection of evaluation benchmarks is provided in the file janusV2_evaluation.md.

ECTF

The EC2F code is provided in another folder called ectf. We used the cipher suite TLS_AES_128_GCM_SHA256 of the Golang crypto/tls library to generate the inputs.