Daniel Huigens
e83bc4b4fb
Don't use unexported low-level functions in tests
2020-09-16 12:43:02 +02:00
Daniel Huigens
25118c3f28
Don't export default objects / namespaces
...
Import individual functions, instead.
2020-09-16 12:43:02 +02:00
Daniel Huigens
9a6d391f3b
Export key, message, signature, cleartext functions and classes directly
...
Instead of as modules.
Replace *.read with read*, *.readArmored with readArmored*, etc.
Replace cleartext.readArmored with readArmoredCleartextMessage.
Replace message.fromText with Message.fromText, etc.
2020-09-16 12:43:02 +02:00
larabr
7776c0f7d1
Store named key params in key objects ( #1141 )
...
- Store private and public params separately and by name in objects,
instead of as an array
- Do not keep params in MPI form, but convert them to Uint8Arrays when
generating/parsing the key
- Modify low-level crypto functions to always accept and return
Uint8Arrays instead of BigIntegers
- Move PKCS1 padding to lower level functions
2020-09-14 15:35:27 +02:00
larabr
94848ecac4
Use native BigInt when available instead of bn.js ( #1119 )
...
In the lightweight build, lazily load bn.js only when necessary.
Also, use Uint8Arrays instead of strings in PKCS1 padding functions, and
check that the leading zero is present when decoding EME-PKCS1 padding.
2020-09-14 15:35:27 +02:00
Wiktor Kwapisiewicz
559772f25f
Allow parsing keys without User IDs ( #1146 )
2020-09-14 15:35:27 +02:00
larabr
f795e24a71
Use higher level functions in key validation tests ( #1128 )
...
Use `key.keyPacket.validate` instead of `crypto.publicKey.validateParams`, see
https://github.com/openpgpjs/openpgpjs/pull/1116#discussion_r447781386 .
Also, `key.decrypt` now only throws on error, no other value is returned.
Also, fix typo (rebase error) that caused tests to fail in Safari for p521.
2020-09-14 15:35:27 +02:00
Dan Ristea
ca2fb080af
JSdoc types & ESLint fixes ( #1132 )
2020-09-14 15:35:27 +02:00
larabr
3b39ce8d37
Finish merging key validation
2020-09-14 15:35:27 +02:00
Dan Ristea
d50616b9f2
Fix comments on symmetric- and public-key encrypted session keys ( #1120 )
2020-09-14 15:35:27 +02:00
Daniel Huigens
635c92bc6a
Rename SymEncryptedAEADProtectedDataPacket to AEADEncryptedDataPacket
2020-09-14 15:35:27 +02:00
Daniel Huigens
04208e6db4
Appease linter
2020-09-14 15:35:27 +02:00
Daniel Huigens
8b6c97d930
Use ES6 classes
2020-09-14 15:35:27 +02:00
Daniel Huigens
fcf0a4b189
Allow dead code elimination
2020-09-14 15:35:27 +02:00
Daniel Huigens
b88e9daa8c
Add --build-only parameter to filter build outputs
...
Also, don't generate test bundle by default, but provide
`npm run build-test` instead.
2020-09-14 15:35:27 +02:00
Daniel Huigens
e5654d40f4
Only produce source maps for minified dist builds
2020-09-14 15:35:26 +02:00
Daniel Huigens
775674e474
Add shortcut to import 'openpgp/lightweight'
2020-09-14 15:35:26 +02:00
Daniel Huigens
0e96e863cf
CI: for lightweight build, only run tests tagged 'lightweight'
2020-09-14 15:35:26 +02:00
Daniel Huigens
38af2d18cb
Use dynamic import in lightweight build
...
Instead of dynamically loading a <script> tag.
This also removes the non-module lightweight build.
2020-09-14 15:35:26 +02:00
Daniel Huigens
bf181b2b75
Remove src and test directory from npm package
2020-09-14 15:35:26 +02:00
Daniel Huigens
6f147f4695
Bump Browserstack test to iOS 12
2020-09-14 15:35:26 +02:00
Daniel Huigens
9087dd0d5f
Drop Node.js 8 support and Travis test
...
It should still work, but we can no longer test it
because rollup requires Node.js 10+.
Also, remove "allowed failures".
2020-09-14 15:35:26 +02:00
Daniel Huigens
705e708f1e
Polyfill globalThis
2020-09-14 15:35:26 +02:00
Daniel Huigens
a9d64f2c5f
Remove bower.json
2020-09-14 15:35:26 +02:00
Daniel Huigens
815dba04d8
Remove compat polyfills
2020-09-14 15:35:26 +02:00
Daniel Huigens
e96e7097f5
Replace release.sh with npm version scripts
2020-09-14 15:35:26 +02:00
Daniel Huigens
42826d2d8b
Link to source code on GitHub from documentation
...
Instead of including the entire source code in the documentation.
2020-09-14 15:35:26 +02:00
Daniel Huigens
4be4052f91
Replace remaining grunt tasks with npm scripts
2020-09-14 15:35:26 +02:00
Daniel Huigens
50579d0b9e
Replace 'global' with 'globalThis'
2020-09-14 15:35:26 +02:00
Daniel Huigens
6a942456fe
Switch to ES8 build of asmcrypto.js
2020-09-14 15:35:26 +02:00
Daniel Huigens
9cf2d56595
Switch build system to rollup
...
Also, default to minimized builds.
2020-09-14 15:35:26 +02:00
Daniel Huigens
b9ca597db4
Remove default export
2020-09-14 15:35:26 +02:00
Daniel Huigens
d56c4698f8
Remove dist folder from GitHub
2020-09-14 15:35:26 +02:00
Daniel Huigens
a20ccae331
Build OpenPGP.js on local npm install
2020-09-14 15:35:26 +02:00
Ilya Chesnokov
483798701f
Rename enums to use camelCase ( #1093 )
2020-09-14 15:35:26 +02:00
Daniel Huigens
62bd67c1b1
Fix lightweight build and browserstack test ( #1092 )
2020-09-14 15:35:26 +02:00
Ilya Chesnokov
a15c5c81f1
Switch util function names to camelCase ( #1091 )
2020-09-14 15:35:26 +02:00
Ilya Chesnokov
a75ecf1169
Rename config option names to camelCase ( #1088 )
2020-09-14 15:35:23 +02:00
Daniel Huigens
962486c7c3
Allow key.validate() to pass if it has a GNU dummy primary key
...
A valid signing subkey is required, in this case.
2020-09-14 15:34:57 +02:00
larabr
c869cb668c
Remove worker ( #1072 )
2020-09-14 15:34:57 +02:00
larabr
8f89ec9c0c
Remove 3DES and CAST5 from default preferred symmetric algorithms ( #1068 )
2020-09-14 15:34:57 +02:00
larabr
ca9129322d
Remove SHA-1 from default preferred hash algorithms ( #1067 )
...
Also, remove SHA-1 from the (unused) KDF params constructor defaults.
2020-09-14 15:34:57 +02:00
larabr
54ea245c81
Generate ECC keys by default ( #1065 )
...
Also, remove the deprecated numBits options of generateKey in favor of rsaBits.
2020-09-14 15:34:57 +02:00
larabr
75dd25661a
Use V5 keys by default ( #1063 )
2020-09-14 15:34:57 +02:00
larabr
f8f8d3e387
Use AEAD protection by default ( #1062 )
2020-09-14 15:34:57 +02:00
Daniel Huigens
db1c0e4afe
Remove browsers that always fail from Browserstack tests
2020-09-14 15:34:57 +02:00
Daniel Huigens
e9ffee50b2
Return only one key in key.read[Armored], add readAll[Armored]
2020-09-14 15:34:48 +02:00
Daniel Huigens
fe90df2b5e
Throw on unarmored messages with garbage data appended
2020-09-14 15:22:57 +02:00
Daniel Huigens
5af597fe03
Don't mutate key in openpgp.encryptKey/decryptKey
2020-09-14 15:22:57 +02:00
Daniel Huigens
86c85a4341
Throw in openpgp.initWorker if worker failed to load
2020-09-14 15:22:57 +02:00