Skip to content
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: import everything from tweetnacl? #697

Closed
peterpeterparker opened this issue Mar 5, 2023 · 5 comments
Closed

feat: import everything from tweetnacl? #697

peterpeterparker opened this issue Mar 5, 2023 · 5 comments

Comments

@peterpeterparker
Copy link
Member

Is your feature request related to a problem? Please describe.
While having a look at the size of agent-js I noticed tweetnacl which is currently imported with a wild card

import * as tweetnacl from 'tweetnacl';

Is there a chance that importing only the resources needed would spare few kb of code that is not needed here?

Additional context

Capture d’écran 2023-03-05 à 22 19 07

@peterpeterparker
Copy link
Member Author

Btw. do agent-js still needs that lib or can use the platform API instead?

@peterpeterparker
Copy link
Member Author

Same for import * as cbor from 'simple-cbor'; btw.

@krpeacock
Copy link
Contributor

I can investigate the size impacts!

Unfortunately, web SubtleCrypto doesn't support ED25519, so we're dependent on a library for the time being

@paulmillr
Copy link

you folks should use noble-curves or noble-ed25519 instead, tweetnacl is not secure

@krpeacock
Copy link
Contributor

krpeacock commented Dec 5, 2023

Tweetnacl is removed in #784 in favor of noble-curves

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants