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

node: add crypto.Sign #17843

Closed
kt3k opened this issue Dec 15, 2022 · 6 comments
Closed

node: add crypto.Sign #17843

kt3k opened this issue Dec 15, 2022 · 6 comments

Comments

@kt3k
Copy link
Member

kt3k commented Dec 15, 2022

crypto.Sign is not implemented now, but is necessary to use npm:@google-cloud/translate (npm:google-auth-library)

ref https://github.com/denoland/deno_std/discussions/3002

@jeiea
Copy link
Contributor

jeiea commented Jan 23, 2023

I tried implementing it and encountered difficult point. I tried using Web Crypto API for replacing node crypto, but Web Crypto API has promise based API only while node crypto.Sign has synchronous API.

For now I found SharedArrayBuffer and Atomics but I can't sure it is feasible and right way. So request comments.

@kt3k
Copy link
Member Author

kt3k commented Jan 24, 2023

Which Web Crypto APIs do you need to implement crypto.Sign? We have a few synchronous versions of Web Crypto APIs in std/crypto

@jeiea
Copy link
Contributor

jeiea commented Jan 24, 2023

I thought SubtleCrypto.sign and didn't search others.

There is a PR trying to embed nodejs API polyfill, but is it okay to use deno_std/crypto?

@kt3k
Copy link
Member Author

kt3k commented Jan 24, 2023

@kt3k
Copy link
Member Author

kt3k commented Jan 24, 2023

But it looks like we don't have sync version of crypto.subtle.sign yet...

@kt3k kt3k mentioned this issue Feb 21, 2023
14 tasks
@kt3k kt3k transferred this issue from denoland/std Feb 21, 2023
@littledivy
Copy link
Member

We're tracking all missing APIs from node:crypto in #18455. Closing.

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

Successfully merging a pull request may close this issue.

5 participants
@kt3k @jeiea @bartlomieju @littledivy and others