-
Notifications
You must be signed in to change notification settings - Fork 276
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
[refactor] #3422: Ursa replacement #4047
Merged
DCNick3
merged 14 commits into
hyperledger-iroha:iroha2-dev
from
DCNick3:ursa-replacement
Nov 20, 2023
Merged
[refactor] #3422: Ursa replacement #4047
DCNick3
merged 14 commits into
hyperledger-iroha:iroha2-dev
from
DCNick3:ursa-replacement
Nov 20, 2023
Conversation
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
github-actions
bot
added
the
iroha2-dev
The re-implementation of a BFT hyperledger in RUST
label
Nov 9, 2023
DCNick3
requested review from
s8sato,
mversic,
Arjentix,
SamHSmith,
QuentinI,
outoftardis,
ilchu,
pesterev,
Erigara and
0x009922
as code owners
November 9, 2023 11:40
DCNick3
force-pushed
the
ursa-replacement
branch
from
November 9, 2023 15:32
956590e
to
e408f52
Compare
DCNick3
force-pushed
the
ursa-replacement
branch
2 times, most recently
from
November 10, 2023 11:55
5f24836
to
b082523
Compare
Pull Request Test Coverage Report for Build 6927938662
💛 - Coveralls |
mversic
reviewed
Nov 13, 2023
mversic
reviewed
Nov 13, 2023
mversic
reviewed
Nov 13, 2023
mversic
reviewed
Nov 13, 2023
Erigara
reviewed
Nov 13, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, not much to add
DCNick3
force-pushed
the
ursa-replacement
branch
2 times, most recently
from
November 13, 2023 10:57
01d470a
to
5876e75
Compare
mversic
reviewed
Nov 13, 2023
mversic
reviewed
Nov 14, 2023
DCNick3
force-pushed
the
ursa-replacement
branch
2 times, most recently
from
November 14, 2023 11:04
e1a8dac
to
15e47a7
Compare
mversic
reviewed
Nov 16, 2023
mversic
reviewed
Nov 16, 2023
mversic
reviewed
Nov 16, 2023
mversic
requested changes
Nov 16, 2023
mversic
approved these changes
Nov 20, 2023
mversic
force-pushed
the
ursa-replacement
branch
from
November 20, 2023 07:21
15e47a7
to
31d44ea
Compare
…ough ursa Signed-off-by: Nikita Strygin <[email protected]>
…pt to iroha_crypto types Signed-off-by: Nikita Strygin <[email protected]>
…ode from ursa Signed-off-by: Nikita Strygin <[email protected]>
…20Poly1305 code from ursa, migrate iroha_p2p to use it Signed-off-by: Nikita Strygin <[email protected]>
Signed-off-by: Nikita Strygin <[email protected]>
Signed-off-by: Nikita Strygin <[email protected]>
Signed-off-by: Nikita Strygin <[email protected]>
…o blocks This also removes bls signature aggregation and rogue key mitigation, as iroha does not and probably will not use aggregated signatures Signed-off-by: Nikita Strygin <[email protected]>
This makes all the dependency tree of iroha_crypto wasm-compatible (except `getrandom`, which either requires a "js" feature enabled when used from web, or a custom getrandom implementation in other cases) Signed-off-by: Nikita Strygin <[email protected]>
…tests Clean up the API a bit: - hide the implementation details of signatures (they are only used through the PublicKey, PrivateKey and Signature types) - remove even more unused API functions - add missing documentation items Signed-off-by: Nikita Strygin <[email protected]>
- make the signature implementations not use the &self, they are all stateless anyway - remove redundant Result returns - add docs on errors Signed-off-by: Nikita Strygin <[email protected]>
… crate, allows removing dep of iroha_p2p on aead. Also remove buffer-based API from iroha_crypto, it's not used anyways. Signed-off-by: Nikita Strygin <[email protected]>
…edundant result.is_ok() checks Signed-off-by: Nikita Strygin <[email protected]>
… dependency from `iroha_crypto` and introduce configurable tls backends to `iroha_client` openssl-sys was previously added to `iroh_crypto` to allow static builds of openssl with musl libc. This was somewhat a kludge though, as `iroha_crypto` does not depend on `openssl` (or at least it stopped depending on it after removing `ursa` dependency). It was used, however, in the client to allow connecting to iroha nodes via HTTPS. This commit gives the user more freedom in choosing their TLS implementation by providing four features: `tls-native`, `tls-native-vendored`, `tls-rustls-native-roots` and `tls-rustls-webpki-roots`, which mirror corresponding features of `attohttpc` and `tokio-tungstenite`. Unlike previously, none of the TLS implementations are enabled by default, which is a breaking change Signed-off-by: Nikita Strygin <[email protected]>
mversic
force-pushed
the
ursa-replacement
branch
from
November 20, 2023 09:18
31d44ea
to
ff89e85
Compare
Erigara
approved these changes
Nov 20, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Ursa is a rust cryptographic library that iroha has been using for a lot of time. It combines several cryptographic libraries from crates.io and provides a unified interface. Unfortunately, it is no longer maintained, so we have to migrate to other ecosystem crates.
This PR does this by importing the parts of ursa code that we have been using into
iroha_crypto
. It then proceeds to clean the code up a bit, removing unused functionality, updating dependencies and simplifying internal APIs.In the end, as ursa was just a unifying layer, iroha_crypto ends up using almost the same underlying cryptographic function implementations (except for a switch from C-based
secp256k1
to pure-rustk256
for easier use as a wasm library in JS SDK later #4046).Linked issue
Closes #3422
Benefits
Not having an unmaintained dependency is obviously a plus, allowing us to benefit from updates to upstream libraries.
Future work
#4046, #4045
Checklist