Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Encryption, flow, repository + code cleanup #10

Merged
merged 25 commits into from
Sep 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2eac0b4
proper repo structure
kendricktan Sep 3, 2019
fa9f6ac
project restructure
kendricktan Sep 4, 2019
89cce5d
fixed number conversions
kendricktan Sep 5, 2019
d844edd
purged proving_key.json
kendricktan Sep 5, 2019
02e081d
purged some files
kendricktan Sep 5, 2019
450ea43
.
kendricktan Sep 5, 2019
6ff7942
eslint + flow config
kendricktan Sep 9, 2019
6dd8354
add user, retrieve coordinator pub key
kendricktan Sep 9, 2019
ce7fd88
skeleton
kendricktan Sep 9, 2019
48cf2c2
cryptoz stuff
kendricktan Sep 9, 2019
8e277cc
encrypting message example
kendricktan Sep 11, 2019
27c2a7b
edh not working...
kendricktan Sep 11, 2019
6c2e6d7
shared key, sign, encrypt, decrypt cooridinator logic
kendricktan Sep 12, 2019
35d47c2
optimized message sending, removed untracked files
kendricktan Sep 13, 2019
e4d2f9e
circuit update
kendricktan Sep 13, 2019
9277946
clean up circuit verification
kendricktan Sep 13, 2019
09d7fd0
signature checking breaking....
kendricktan Sep 13, 2019
8bab093
fixed signal not initialized, new error: Constraint doesn't match: 1 …
kendricktan Sep 13, 2019
603759a
disabled verifier.enabled, circuits passes
kendricktan Sep 14, 2019
0db621a
fixed circomlib ver, decrypt and sig check passes
kendricktan Sep 14, 2019
f45385c
generate_circuit_input testings
kendricktan Sep 14, 2019
1601013
yum yum, circom gogo
kendricktan Sep 14, 2019
ab1d47b
merged encryption with tree
kendricktan Sep 14, 2019
d75568f
removed old script
kendricktan Sep 14, 2019
1488162
docker instructions
kendricktan Sep 14, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .babelrc
@@ -0,0 +1,3 @@
{
"presets": ["flow", "@babel/preset-flow"]
}
101 changes: 101 additions & 0 deletions .dockerignore
@@ -0,0 +1,101 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# Stuff we can auto-generate
proving_key.json
verification_key.json
witness.json
public.json
proof.json
circuit.json
input.json

app/circuits/

.vscode/
73 changes: 73 additions & 0 deletions .eslintrc
@@ -0,0 +1,73 @@
{
"parser": "babel-eslint",
"plugins": [
"flowtype"
],
"extends": [
"plugin:flowtype/recommended",
"standard",
"standard-flow"
],
"globals": {
"BigInt": "readonly"
},
"rules": {
"flowtype/boolean-style": [
2,
"boolean"
],
"flowtype/define-flow-type": 1,
"flowtype/delimiter-dangle": [
2,
"never"
],
"flowtype/generic-spacing": [
2,
"never"
],
"flowtype/no-mixed": 2,
"flowtype/no-types-missing-file-annotation": 2,
"flowtype/no-weak-types": 2,
"flowtype/object-type-delimiter": [
2,
"comma"
],
"flowtype/require-parameter-type": 2,
"flowtype/require-readonly-react-props": 0,
"flowtype/require-return-type": [
2,
"always",
{
"annotateUndefined": "never"
}
],
"flowtype/require-valid-file-annotation": 2,
"flowtype/semi": [
2,
"always"
],
"flowtype/space-after-type-colon": [
2,
"always"
],
"flowtype/space-before-generic-bracket": [
2,
"never"
],
"flowtype/space-before-type-colon": [
2,
"never"
],
"flowtype/union-intersection-spacing": [
2,
"always"
],
"flowtype/use-flow-type": 1,
"flowtype/valid-syntax": 1
},
"settings": {
"flowtype": {
"onlyFilesWithFlowAnnotation": false
}
}
}
14 changes: 14 additions & 0 deletions .flowconfig
@@ -0,0 +1,14 @@
[ignore]
.*/node_modules/.*

[include]

[libs]
flow-typed

[lints]

[options]
all=true

[strict]
101 changes: 101 additions & 0 deletions .gitignore
@@ -0,0 +1,101 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# Stuff we can auto-generate
proving_key.json
verification_key.json
witness.json
public.json
proof.json
circuit.json
input.json

app/circuits/

.vscode/
13 changes: 13 additions & 0 deletions Dockerfile
@@ -0,0 +1,13 @@
FROM node:10.16.3-jessie

COPY . /maci

WORKDIR /maci

RUN yarn install

# RUN yarn circuit:compile
# RUN yarn circuit:setup
# RUN yarn circuit:generatewitness

ENTRYPOINT [ "/bin/bash", "-c", "sleep 10000" ]
1 change: 1 addition & 0 deletions LICENSE
@@ -1,6 +1,7 @@
MIT License

Copyright (c) 2019 barryWhiteHat
Copyright (c) 2019 Kendrick Tan

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
38 changes: 32 additions & 6 deletions README.md
@@ -1,12 +1,38 @@
# maci
Minimal anti collusion infrastructure

# Intro
# MACI
Minimal Anti-Collusion Infrastructure

This project is based upon https://ethresear.ch/t/minimal-anti-collusion-infrastructure

# Contribution
# Developing on MACI

MACI is tested with `node v10.16.3`

```bash
yarn install

yarn circuit:compile
yarn circuit:setup
yarn circuit:generateverifier

# Runs app/utils/crypto.js .... for now ....
# Will make it prettier dw
yarn circuit:test
```

## With Docker

```bash
docker build -t maci .
docker exec -it $(docker run -t -d maci) /bin/bash

yarn circuit:compile
yarn circuit:setup
yarn circuit:generateverifier

yarn circuit:test # app/utils/crypto.js
```

# Contribution
We are actively seeking help on implementing this project please join https://t.me/joinchat/LUgOpE7J2gstRcZqdERyvw and ask about contributions

And check the help wanted issues.
And check the help wanted issues.