-
Notifications
You must be signed in to change notification settings - Fork 62
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
feat(crypto)!: libsodium crypto implementation #574
feat(crypto)!: libsodium crypto implementation #574
Conversation
891659d
to
3d4ae6a
Compare
3fbd797
to
6900223
Compare
4cb292b
to
18e1e2d
Compare
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.
Fantastic work here @AngelCastilloB
c9244ac
to
a11bdd9
Compare
a747730
to
5ebe69d
Compare
5ebe69d
to
a27b4ab
Compare
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.
First round of comments.
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.
Some additional refactoring is needed:
- typedHex() should probably live in
util
package just like opaqueTypes (seems to be duplicated in core & crypto packages right now) - Base hash types (e.g.
Hash32ByteBase16
) should probably live incrypto
package
d740a48
to
702d341
Compare
6737b0d
to
ea79235
Compare
This was addressed in this PR #589 |
0d51847
to
ce79d4e
Compare
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.
Let's add a notification in the crypto
package README, warning users the implementation has not yet been audited, and use at this stage is at own risk. Can also add this in the package.json
description.
606100f
to
29dc5a5
Compare
5770cec
to
e11a9a8
Compare
Context
Currently, the SDK uses the Cardano Multiplatform Lib to perform all Ed25519-related operations. We want to replace this dependency by implementing our own package that uses libsodium for cryptographic operations.
Proposed Solution
Introduce a new set of ed25519 classes to the crypto package based on libsodium. There is also a new BIP32 set of classes implemented natively in javascript for key public and private key derivation.
Critical Segments
This PR introduces some code that must be audited and verified, as we consider it to be critical:
Important Changes Introduced