-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite Crypto WASM using the original
iroha_crypto
crate (#188)
* [refactor]: update WASM API, wip `cargo check --target wasm32-unknown-unknown` fails: `getrandom` crate features are invalid Signed-off-by: Dmitry Balashov <[email protected]> * [feat]: complete refactoring (upstream is WIP) Signed-off-by: Dmitry Balashov <[email protected]> * [refactor]: update upstream to hyperledger-iroha/iroha#4341 Signed-off-by: Dmitry Balashov <[email protected]> * [refactor]: update crypto, finally Signed-off-by: Dmitry Balashov <[email protected]> --------- Signed-off-by: Dmitry Balashov <[email protected]>
- Loading branch information
Showing
41 changed files
with
3,667 additions
and
6,465 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
'@iroha2/crypto-core': major | ||
'@iroha2/crypto-target-bundler': major | ||
'@iroha2/crypto-target-node': major | ||
'@iroha2/crypto-target-web': major | ||
--- | ||
|
||
**Breaking:** Complete rewrite of crypto WASM, and major update of the surrounding API. | ||
|
||
- Now WASM is made from the original `iroha_crypto` from Iroha 2 repo. As one of the outcomes, binary blob size is reduced from 2mb to 600kb. | ||
- Remove `KeyGenConfiguration`. Use `KeyPair.deriveFromSeed`, `KeyPair.deriveFromPrivateKey`, and `KeyPair.random` instead. | ||
- Normalise API across `PublicKey`, `PrivateKey`, `KeyPair`, and `Signature` classes (JSON methods, raw conversion methods etc.) | ||
- Introduce `Bytes` utility to accept binary input either as `Bytes.array([1, 2, 3])` or `Bytes.hex('001122')` | ||
- Export more types¡ | ||
|
||
See the [issue](https://github.com/hyperledger/iroha-javascript/issues/186) for related context. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@iroha2/client': minor | ||
--- | ||
|
||
**refactor:** handle the major update of `@iroha2/crypto-core` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@iroha2/crypto-util': minor | ||
--- | ||
|
||
**feat:** add `Bytes` util class. Use `Bytes.hex` or `Bytes.array` to pass byte input in a convenient way. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[target.wasm32-unknown-unknown] | ||
runner = 'wasm-bindgen-test-runner' |
Oops, something went wrong.