jelhan / croodle

Croodle is a web application to schedule a date or to do a poll on a general topics.
MIT License
184 stars 24 forks source link

Use Web Cryptography API if available #141

Open jelhan opened 7 years ago

jelhan commented 7 years ago

Currently all encryption / decryption is done by Stanford JavaScript Crypto Library (sjcl). Since Web Cryptography API is now a recommendation and implemented by Firefox and Chrome we should investigate if we could use that one if it exists.

Using Web Cryptography API might be less performant than sjcl if these benchmarks are still valid.

jelhan commented 6 years ago

Investigated that one a little bit:

rugk commented 5 years ago

all major browsers but HMAC-SHA-256 hash function is not

You likely just did not find it, because it's used in the .sign API, not the hash one.

Actually, it looks supported: https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/sign#HMAC

(That MDN doc has been updated some time ago. Thanks to the fact that someone™ complained. :wink: And Mozilla fixed it, of course… :hugs:)