1.0.5 • Published 5 years ago
talent-lib v1.0.5
talent-lib
The Smart Talent dApp Library
Build CPP Source with emmake
Install Submodule including CryptoPP :
git submodule update --init --recursive
- Build Submodule with WebAssembly Compiler :
npm run make:deps
- Build WebAssembly Source :
npm run make
Normal Usage
For normal usage, WebAssembly JSON should be included in src/lib/cryptolib.json
. Developers can just call the json and use it as Binary String File.
- Build The Library
npm run build
- Uint Test for The Library
npm test
Library Basic Functions
- Elliptic Curve KeyPair Generation
- ECDSA
- ECIES
- SHA256
- Random Bytes
- AES256
Library High Level Functions
- Create Free Data with Signature
- Create Encrypted Data with Signature
- Create Sign Request Data
- Create Signature From Sign Request Data
- Create Data Response
Data Format
- Hash of Data = DH
- Data Encryption Key = DK
- Owner Key = PK
- Notary Key = NK
- Request Key = RK
- Free Data: { payload, PK signature }
- Encrypted Data: { payload, enc(PK, DK), sign(PK, DH) }
- Signing Request: { enc(NK, DK) }
- Data Response: { enc(RK, DK), sign(NK / PK, DK) }