35 Commits

Author SHA1 Message Date
Dima
d091146dd2 Aes crypto js (#72)
* WIP

* facade for encrypt-decrypt and TestApp for testing

* test

* understanding of return types in crypto-js

* refactor jvm aes, keyJVM === keyJS, encryptedJVM === encryptedJS

* great refactoring of cryptography

* small improvements

* refactoring and documentation

* delete main classes

* rename AesCryptJS to AesCrypt

* fix tests

* License headers
2018-03-05 15:53:14 +01:00
Dmitry Kurinskiy
26b41e7b4d Cli demo (#66)
* CLI reorganization WIP

* clean up reference.conf, add application.conf to gitignore

* linearizing ClientComposer;
some free operations

* keyPath config path corrected

* compilation error fixed

* AuthorizedClient removed

* test compilation error fixed

* fix keystore tests

* Merge branch 'master' into cli-demo

# Conflicts:
#	client/src/main/scala/fluence/client/ClientApp.scala
#	client/src/main/scala/fluence/client/ConfigParsers.scala
#	client/src/main/scala/fluence/client/FluenceClient.scala
#	client/src/main/scala/fluence/client/KademliaConfigParser.scala
#	client/src/main/scala/fluence/client/cli/CliOps.scala
#	client/src/main/scala/fluence/client/config/KademliaConfigParser.scala

* cats effect 0.9

* replicationN in ClientApp

* add logs to FileKeyStorage

* add logs to node dataset storage

* fix typos

* add logs to server contract allocator

* ClientApp recursive calls

* launches and joins with docker

* with volumes

* update port parameters

* update port parameters

* fix test

* update port parameters

* add check before put

* change assertion

* no fluence_grpc_port

* run client in docker

* some TODOs for Cli

* fix assertion

* add some logs

* add implicit
2018-03-01 15:36:56 +03:00
Dima
4a966657a6 Sbt js modules refactoring (#70)
* replace codec/core and rename jvm-js modules

* add files to git

* add info into test
2018-02-27 14:46:09 +03:00
Constantine Solovev
1fa711960f Some fixes (#68)
* btree assertions

* fix fail in local tests

* revert test changes

* fix fail in local tests

* revert test changes

* revert some changes

* unmute assertion invocation
2018-02-27 13:39:00 +04:00
Dima
d368ec87bf Aes encryption with password (#65)
* naive implementation of aes encryption with password

* refactr AesCrypt to F

* made the `codec` cross-platform
2018-02-26 08:47:30 +03:00
Constantine Solovev
554e1db8b1 Btree errors serialize (#62)
* keyStore spec

* Client and Server possibility to receive errors from the network from each other

* Client and Server possibility to send errors through the network to each other

* Docs fixes

* client sends 'clients error' to server and returns it as result type

* debug fail test

* debug fail test

* debug fail test

* disable log in test

* review
2018-02-22 21:32:18 +04:00
Dmitry Kurinskiy
d88a5299e7 Config refactoring (#61)
* Config refactoring

* node running bug fixed

* upnp config

* test compilation bug fixed

* ContractNodeIntegrationSpec fixed

* rocksdb reference conf
2018-02-22 15:15:50 +03:00
Dima
65fe1184a8 Client cli (#59)
* add scopts and args for start cli, parse command line with fastparse, put and get string values on remote node

* refactoring

* test for parser and comments

* add main class

* seed -> seeds

* headers, PR fixes
2018-02-20 17:00:59 +03:00
Dmitry Kurinskiy
668fd8117c Node app flow (#53)
* User commands are removed from NodeApp

* node scenario comment

* compile error fixed

* WIP: NodeApp refactoring, with deps

* WIP: NodeGrpc factored out from NodeComposer

* WIP: test join

* WIP: implicit SignatureChecker; simple FluenceNode runner

* WIP: almost all tests compile

* tests compile

* RocksDbStore.Factory

* license header added

* thread safe version of GrpcServer.shutdown

* formatting

* some tests are ignored

* fix tests

* delete key path from temp

* trying to reduce boilerplate with Effect

* ignore tests
2018-02-20 10:28:00 +04:00
Dima
4c74269144 Fluence client (#51)
* WIP

* WIP, revert splitting modules, default arguments for kademlia and contracts

* WIP, join seeds, create dataset logic, testing

* WIP, fix test cases, contract allocation is working

* merge

* fix key array byte
fix hash functions in test
fix non-lazy task in Datasets cache
add MVarMapCache

* fix comments, add headers

* externalize auth client

* delete authCache
2018-02-16 16:46:44 +03:00
Dmitry Kurinskiy
88d640dbf6 KademliaMVar.client and Kademlia.findNode (#49)
* KademliaMVar.client and Kademlia.findNode

* scalariform formatting & tiny bugfix

* sbt ops for travis?

* constant b64seed in Contact

* merge master

* compilation bugfix

* possible fix

* review fixes
2018-02-16 09:00:35 +03:00
Dmitry Kurinskiy
927c872631 slogging (#46)
* slogging

* PrintLoggerFactory

* logback-test.xml removed
2018-02-14 19:14:17 +03:00
Dima
9dfe3fd99c sha1 for js and tests (#42)
* sha1 for js and tests

* test for jdk hashers, add js hasher implementation

* typo
2018-02-14 16:45:00 +03:00
Dima
b01dffd779 new module for monix implementation of KademliaClient (#44)
* new module and renaming

* refactoring

* PR comments fixes

* delete new
2018-02-14 14:12:13 +03:00
Dima
d182a92e98 Ecdsa for scalajs (#37)
* refactor sign classes
store in private key only S, in public key only Q point without wrappers

* refactor, class ...[F[_]] to method ...[F[_]]

* remove redundant

* finally js crypto === java crypto

* facade for hash, EcdsaJS implementation, rewrite crypto logic to hex for cross-platform compatibility

* clean branch

* delete Main, add headers

* merge master

* small fixes

* todo

* refactoring, comments

* alphabet

* merge master

* fix tests

* fix PR comments

* fix PR comments
2018-02-13 17:59:17 +03:00
Dmitry Kurinskiy
17a5930399 Contact jwt (#36)
* EitherT in Crypto

* main codebase compiles

* tests compiles

* crypto tests fixed

* Contact test

* In Node's codec, check that Kademlia Key conforms Contact's Public Key

* b64url alphabet for PK encoding in JWT
2018-02-12 20:46:18 +03:00
Dmitry Kurinskiy
73ae64cc6a kad.Contact with scodec; dataset with contract check (#35)
* - kad.Contact with scodec, gitHash, protocolVersion
- check that dataset is stored by this node

* SignAlgo in NodeComposer

* Some review fixes
2018-02-12 10:52:03 +03:00
Dima
79738aa2c7 refactor sign classes (#34)
* refactor sign classes
store in private key only S, in public key only Q point without wrappers

* refactor, class ...[F[_]] to method ...[F[_]]

* remove redundant
2018-02-09 16:11:03 +03:00
Dima
fdae5eaf8f init crypto js project (#32)
* init crypto js project

* replace test

* fix PR comments

* fix PR comments
2018-02-07 15:50:47 +03:00
Dmitry Kurinskiy
41be69ecc4 Dataset RPC with ID (#29)
* init branch

* CoFail cases compiles

* trying to add ID into dataset protocol WIP

* `Datasets` class with cached DatasetStorage's

* tests compiles

* license header
2018-02-07 15:17:13 +03:00
Dmitry Kurinskiy
fe922f7f9a Co fail (#31)
* init branch

* CoFail cases compiles

* co-fail submodule
2018-02-06 17:59:07 +03:00
Dima
978634e450 Crypto to f (#30)
* read and write ecdsa key into file

* file storage to F

* fix test

* add monad error

* header create

* store keys in json

* either -> try

* simplify config loading

* delete println

* add F to crypt

* comment fixes
2018-02-06 13:52:13 +03:00
Dima
3b7c2c3deb File storage with init info (#28)
* read and write ecdsa key into file

* file storage to F

* fix test

* add monad error

* header create

* store keys in json

* either -> try

* simplify config loading

* delete println

* comment fixes
2018-02-06 11:33:27 +03:00
Dmitry Kurinskiy
e5ffc68c00 Dataset grpc (#26)
* initial DatasetStorageClient with grpc transport

* license headers

* test fixed
2018-02-02 16:18:26 +03:00
Dima
18ef41fced Edsa signature (#25)
* traits for crypto algorithms, ecdsa implementation

* fix bouncycastle dependency

* fix bouncycastle dependency

* add fluence headers

* WIP cryptography with F and MonadError

* sign method to F[_]

* verify method to F[_]

* WIP refactoring to F[_]

* refactoring to F[_]

* add tests

* headers

* small fixes

* fix test

* another refactoring

* JavaAlgorithm trait and static BouncyCastle initialization

* clean up security provider after every test run

* renaming and provider fix
2018-02-02 11:16:08 +03:00
Constantine Solovev
6559c1673d Dataset api (add test cases) (#21)
* draft of interfaces

* create interfaces for dataset api

* merkle btree client changes

* fixing integration merkle btree test

* DatasetApi integration test

* remove useless new

* add test cases for DatasetApi integration test and fix bugs

* formatting

* fix test
2018-01-30 17:41:59 +04:00
Dmitry Kurinskiy
52b9e790ef build.sbt refactoring (#22) 2018-01-30 15:06:13 +03:00
Constantine Solovev
8cc3d2eea4 Add hash of dataset to merkle tree (#15)
* Added value checksum to tree leaf, refactor, fix test
2018-01-28 11:15:47 +04:00
Dmitry Kurinskiy
06be861583 Node composition (#14)
* NodeComposer and docker build

* ByteVector and grpc tests&codecs

* remove debugging output

* license headers

* changed NodeComposerSpec ports
2018-01-25 16:27:31 +03:00
alari
dfb2d53552 BasicContract WIP; KeyPair abstraction 2018-01-19 16:52:13 +03:00
Dmitry Kurinskiy
f3d56cffc7 License headers (#23) 2017-12-20 19:01:11 +03:00
Constantine Solovev
944f724655 Binary search over encrypted data (#13)
* Binary search over encrypted data

* Binary search over encrypted data
2017-12-04 22:09:49 +04:00
Constantine Solovev
76daa8b580 WIP MerkleB+Tree (#11)
* Create MerkleBTRee with get and put methods and tests
2017-11-29 12:21:06 +04:00
Constantine Solovev
10def6ed3e Remove redundant copy 2017-10-26 16:09:39 +04:00
Constantine Solovev
5b1a89b884 Move hashing and encrypting to new crypto module 2017-10-26 15:11:19 +04:00