Skip to content

Question: algorithm for both, signing/verification and encryption/decryption #371

Closed Answered by wbamberg
jepetko asked this question in Code examples
Discussion options

You must be logged in to vote

My actual question is: which algorithm needs to be used to support both, signing/verification and encryption/decryption. Using 'RSA-OAEP' (instead of 'RSASSA-PKCS1-v1_5') is not an option because it cannot be used for signing. Is this possible at all? (asking because I haven't found such examples in the documentation).

I believe you're not supposed to use the same key for signing/verification and encryption/decryption: https://security.stackexchange.com/questions/1806/why-should-one-not-use-the-same-asymmetric-key-for-encryption-as-they-do-for-sig .

The spec has a helpful table listing the algorithms and possible usages: https://w3c.github.io/webcrypto/#algorithm-overview , and you'll s…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Rumyra
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #370 on May 04, 2023 09:51.