Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v6] Drop support for browsers without native BigInts (e.g. Safari <14) #1754

Merged
merged 6 commits into from May 16, 2024

Conversation

larabr
Copy link
Collaborator

@larabr larabr commented May 6, 2024

BigInt is not polyfillable, and in order to support legacy browsers that do not implement it natively (e.g. Safari <14), a large alternative library (BN.js) needs to be bundled as well, and imported also by modern browsers (in OpenPGP.js v6, which depends the @noble libs).

We're finally dropping the fallback support as usage of Safari 11-13 has gone down significantly.
Aside from optimising the bundle size, thanks to the change we reduce the number of forked dependencies we need to maintain.

Remove BN.js fallback, and only keep native BigInteger interface
(for algorithmic constant-time functions).
Also, add support for TS modules, to move some over from the forked
noble repos.
openpgp.d.ts Outdated Show resolved Hide resolved
openpgp.d.ts Outdated Show resolved Hide resolved
src/biginteger.ts Outdated Show resolved Hide resolved
src/crypto/public_key/prime.js Outdated Show resolved Hide resolved
src/crypto/public_key/rsa.js Show resolved Hide resolved
src/crypto/random.js Outdated Show resolved Hide resolved
src/openpgp.js Show resolved Hide resolved
@larabr larabr force-pushed the v6-drop-bigint-fallback branch 2 times, most recently from f538f45 to 1093ff9 Compare May 10, 2024 17:17
@larabr larabr merged commit cf0285a into openpgpjs:v6 May 16, 2024
11 of 12 checks passed
@larabr larabr mentioned this pull request May 16, 2024
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants