Skip to content

Replace crypto-js by browser native WebCrypto ? #20

@robinmoisson

Description

@robinmoisson

Pro/Cons that I see:

Pros

  • no dependencies at all
  • smaller output (not a big issue I think, minified crypto-js is quite lean already)
  • no need to update the lib, always as up to date as the browser

Cons

  • at encryption time: I see it as going from using the crypto implementation of a single library that can be audited to leaving it to each user's browser, so the responsability of checking that their browser is up to date/bugfree on that point falls on each user.

    Makes sense ? Is there any data on the crypto implementation of that API in browsers ?

  • it might be nice to have a cli tool that can be inserted into one's workflow to update the encrypted files automatically. We can't use the browser API for that, crypto-js as a node library could also be used. Though the website and cli could use different tools.

  • probably wider support (for now) for crypto-js but that'd need to be checked and by how much :)

Keeping in mind that it would be possible to use different solutions for encrypting/decrypting: encrypting needs to be the safest option, decrypting the most convenient one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions