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
There is a polyfill that could potentially fix this, but I think using a polyfill for crypto has serious drawbacks: a big performance penalty, possibly faulty or insecure implementation and increased bundle size.
This quote also doesn't inspire a lot of confidence: "We have done no security review or take a position on the security of these third-party libraries. YOU HAVE BEEN WARNED."
I might be missing something but following this post I can use webkitSubtle with Safari 11.1 to generate promise after the generateKey in the console like you did in your code.
Very strange...
Now I'd need someone to build it locally to try out if this little change would make it work or if there is some other problem then.
I'd also need to know if it's only generateKey that has trouble with that particular exponent or if importing and verifying would also cause problems with that exponent.
Activity
ChristophP commentedon Jun 12, 2018
This is what Safari complains about:

Zinggi commentedon Jun 13, 2018
Ok, so Safari seems to have problems with either
RSA-PSSorRSA-OAEPor both (https://github.com/Zinggi/NoKey/blob/master/web/js/setup.js#L77).There might also be more problems down the line.
There is a polyfill that could potentially fix this, but I think using a polyfill for crypto has serious drawbacks: a big performance penalty, possibly faulty or insecure implementation and increased bundle size.
This quote also doesn't inspire a lot of confidence: "We have done no security review or take a position on the security of these third-party libraries. YOU HAVE BEEN WARNED."
So I'm not sure what should be done...
passiomatic commentedon Jun 20, 2018
I might be missing something but following this post I can use
webkitSubtlewith Safari 11.1 to generate promise after thegenerateKeyin the console like you did in your code.Zinggi commentedon Jun 20, 2018
You probably have to run the promise, before you see the error.
Try:
passiomatic commentedon Jun 20, 2018
It seems to work:
And when I inspect the object:
Zinggi commentedon Jun 20, 2018
Interesting, can you also try
RSA-PSS?If that also works, maybe they fixed it? Are you still getting the same error here?
passiomatic commentedon Jun 20, 2018
Unfortunately RSA-PSS gives an error. ;( For the record RSA-PSS is not listed in the
algovalue here: https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/generateKeyjdmnd commentedon Jun 20, 2018
This issue appears to be related to
publicExponent.Using the exponent suggested here (65,537) appears to fix the issue for some reason.
The following code works on Safari 11.1:
Output:

Zinggi commentedon Jun 21, 2018
Very strange...
Now I'd need someone to build it locally to try out if this little change would make it work or if there is some other problem then.
I'd also need to know if it's only
generateKeythat has trouble with that particular exponent or if importing and verifying would also cause problems with that exponent.cqupt-yifanwu commentedon Dec 25, 2019
https://developer.mozilla.org/en-US/docs/Web/API/Crypto/subtle#Browser_compatibility
cqupt-yifanwu commentedon Jan 7, 2020
u can use this polyfill https://github.com/PeculiarVentures/webcrypto-liner