Commit Graph
26 Commits
Author SHA1 Message Date
Jaco Greeff 73477a2809 Add tslint (#151) 2018-06-27 10:15:46 +02:00
Jaco Greeff b872816ad9 Update with tweetnacl nacl.d.ts 2018-06-24 09:38:13 +02:00
Jaco Greeff 4470dfa7b9 TypeScript conversion (#142)
* Auto-conversion

* Cleanup type conversion errors

* Inching closer, resolution sorted

* Additional cleanups

* TS, TS everywhere

* Minor version for TS release

* Last roundups
2018-06-22 21:17:50 +02:00
Jaco Greeff 99b86d9849 Use ES6 import/export (#139)
* Use ES6 import/export

* Fix tests
2018-06-20 16:36:07 +02:00
Jaco Greeff 461dde7c3c Copyright project authors (#137)
* Copyright project authors

* Add contributors
2018-06-13 22:24:48 +02:00
Jaco Greeff db1a6adfc5 Cleanup hex functions (#130) 2018-05-25 10:27:53 +02:00
Jaco Greeff 7075495efd Update keyring usage (#128)
* Update keyring usage

* Remove "fluffy" asU8a{128,256,512} operations
2018-05-22 15:44:34 +02:00
Jaco Greeff f8e07bada9 Add pair to/fromJson (#123) 2018-05-08 12:46:04 +02:00
Jaco Greeff 6ce0efea3f Use detached sign (no splitting) (#114)
* Use detached sign (no splitting)

* Add pair meta get/set

* Types
2018-04-11 15:22:36 +02:00
Jaco Greeff 35d2f69b75 Pkcs8 bytes for pairs (non-encrypted) (#111)
* Upgrade dependencies

* Pkcs8 bytes for pairs (non-encrypted)

* Bump minor

* Pass only secretKey around for encoding

* Cleanup seed interface
2018-03-20 15:42:39 +01:00
Jaco Greeff 995dfecf61 Initial pair encryption (xsalsa20-poly1305) (#107)
* Allow keypair generation from input string

* Add keyfile encryption/decryption

* Pass secret through n rounds

* Split definition types

* Additional cleanups

* Pass salt as blake2b input

* Move kdf hashing to util-cypto

* Dangling comma

* Pull through secret as string | Uint8Array

* Update documentation
2018-03-13 17:04:44 +01:00
Jaco Greeff cdc848dce0 Add @polkadot/util-keyring (#99) 2018-02-23 11:41:59 +01:00
Jaco Greeff 88a239b532 Align nacl test keys (#97) 2018-02-21 13:29:32 +01:00
Jaco Greeff 15c4733170 Split keypair generation functions (#96) 2018-02-21 12:44:29 +01:00
Jaco Greeff ce36deb6f9 Fix blake2 with proper key & length (#94)
* Fix blake2 with proper key & length

* Fix linting

* Update @polkadot/dev for blakejs typings
2018-02-20 17:13:26 +01:00
Jaco Greeff 480a2f05c4 Fix xxhash outputs as LE (#91) 2018-02-20 10:01:32 +01:00
Jaco Greeff 6f8c54337b Remove {from,to}Buffer methods (#89)
* Remove all {from,to}Buffer utility methods

* Fix check & test

* Updsate docs

* Bump minor
2018-02-15 10:32:05 +01:00
Jaco Greeff 03dc89c2b6 Remove exposed Buffer in crypto (#80)
* Use js-sha3 instead of keccak

* Remove exposed toBuffer from util-crypto

* Add definiton for js-sha3

* Remove Buffer from docs

* Cleanup crypto hashing

* Cleanup interface
2018-02-08 16:12:00 +01:00
Jaco Greeff e832aebb07 Introduce @polkadot/util-rlp (#76)
* Add toU8a conversions

* Add u8a utilities

* @polkadot/rlp with encoding

* Decoding test runthrough

* Update util locations

* Convert util-triehash to use util-rlp

* Allow keccak from Uint8Array

* Pass Uint8Array to keccak input

* Update documentation

* Skip some doc generation

* Update @polkadot/dev

* Update doc typo

* Update allocations

* Retrieve tests from ethereumjs-testing

* Simplify test retrieval

* Exclude etereumjs-testing from flow
2018-02-08 14:50:54 +01:00
Jaco Greeff 6b3be0bc30 Introduce @polkadot/util-triehash (#75)
* Expand util-crypto test coverage

* Add @polkadot/util-triehash

* Update link to util-triehash
2018-02-07 13:41:45 +01:00
Jaco Greeff feef48b44c Uint8Array outputs from crypto (#74)
* Uint8Array outputs from crypto

* Small typos

* Update documentation
2018-02-07 11:22:17 +01:00
Jaco Greeff a5518ce830 Align NaCl functions with Rust tests (#72)
* Align nacl functions with Rust tests

* Match tests from Rust
2018-02-02 13:02:55 +01:00
Jaco Greeff 3720ebc920 Add ed25519 keypair, sign & verify (#71) 2018-01-31 14:50:20 +01:00
Jaco Greeff 9893256642 Buffer conversion for xxhash (#70)
* Buffer conversion

* Fix flow
2018-01-30 14:12:44 +01:00
Jaco Greeff 523dc1c48d Update hashing functions to ref (#68)
* Package upgrades

* Use h64 by default

* Remove AsNumber distinction

* xxhash32/64 & blake2b/2s

* Add xxhashAsHex{128,256}

* Add blake2AsHex{128,256,512}

* Update documentation

* Update docs
2018-01-30 11:55:32 +01:00
Jaco Greeff b5c5734c7c Add Blake2s & XXHash utility functions (#66)
* Initial split of util & util-crypto

* Add initial XXHash version

* Blake2s wit tests & documentation

* Add sha512 (from NaCl)

* Add randomBytes (from NaCl)

* Flow fixes

* Update documentation

* Update latest @polkadot/dev
2018-01-25 14:13:43 +01:00