You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I am on a project to receive an ECDH pubkey from backend in order to encrypt messages so that only the true backend can decrypted, for I have to use a proxy site to pass clients' message to my actual server. I have checked pages like https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/generateKey & /importKey & /exportKey &etc.
I do not know why the await syntax worked in browser console but failed when embedded in a web page.
Anyway, since the public key pub is produced, let me try to import it:
Then there is a DOM Exception:Cannot create a key using the specified key usages. I cannot use ['encrypt'] either. So does it mean that encryption through an ECC public key is Not Supported?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi I am on a project to receive an ECDH pubkey from backend in order to encrypt messages so that only the true backend can decrypted, for I have to use a proxy site to pass clients' message to my actual server. I have checked pages like https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/generateKey & /importKey & /exportKey &etc.
First thing first, generate a public key:
I do not know why the
await
syntax worked in browser console but failed when embedded in a web page.Anyway, since the public key
pub
is produced, let me try to import it:Then there is a DOM Exception:
Cannot create a key using the specified key usages.
I cannot use['encrypt']
either. So does it mean that encryption through an ECC public key is Not Supported?Beta Was this translation helpful? Give feedback.
All reactions