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

Fix encoding of sign() JS API function #4816

Closed
takuro-sato opened this issue Jan 10, 2023 · 2 comments · Fixed by #4829
Closed

Fix encoding of sign() JS API function #4816

takuro-sato opened this issue Jan 10, 2023 · 2 comments · Fixed by #4829
Assignees

Comments

@takuro-sato
Copy link
Contributor

We are aiming to make the JS crypto API to follow the Web Crypto API in behavior.
To do so, #2735 changed ccf.crypto.verifySignature to accept IEEE P1363 as signature's encoding format from DER when ECDSA is used.
But recently added ccf.crypto.sign doesn't follow it and creates DER encoded signature and we need to fix it.
Also we haven't checked encoding to use for EdDSA, so we need to check it from Web Crypto API spec.

@achamayou achamayou changed the title Fix encoding of sing() JS API function Fix encoding of sign() JS API function Jan 10, 2023
@achamayou
Copy link
Member

@takuro-sato we need to check for RSA too.

@takuro-sato takuro-sato self-assigned this Jan 11, 2023
@takuro-sato
Copy link
Contributor Author

takuro-sato commented Jan 12, 2023

TODOs

  • Sign with P1363 encoding for ECDSA
  • Check if the encoding for RSA and EdDSA is compatible with Web Crypto API (and fix if not)

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

Successfully merging a pull request may close this issue.

2 participants