Ilya Chesnokov
08b7725b8c
Create lightweight build that can lazily load indutny/elliptic if needed ( #956 )
...
This PR adds four config options to configure whether and how to load
indutny/elliptic: use_indutny_elliptic, external_indutny_elliptic,
indutny_elliptic_path and indutny_elliptic_fetch_options.
Also:
- Use tweetnacl.js instead of indutny/elliptic for curve25519 key generation
- Don't initialize indutny's curve25519, improving performance when using that curve
- Verify NIST signatures using Web Crypto instead of indutny/elliptic when not streaming
- Move KeyPair.sign/verify to ecdsa.js
- Move KeyPair.derive to ecdh.js
- Move keyFromPrivate and keyFromPublic to a new indutnyKey.js file
2019-10-25 16:07:57 +02:00
Ilya Chesnokov
528fbfb017
Switch back to using upstream email-address library ( #998 )
2019-10-25 13:25:03 +02:00
descampsk
810b8daab2
Fix crypto.random.getRandomBytes when loading openpgp.js inside a worker ( #997 )
2019-10-25 13:20:54 +02:00
Ilya Chesnokov
114184c6f2
Split up key.js ( #972 )
2019-10-15 18:42:14 +02:00
Daniel Huigens
2cc3262149
Fix test failing on high-core-count systems due to AEAD concurrency
2019-10-15 18:38:02 +02:00
Daniel Huigens
3ee77f9e50
AEAD: Fix high water mark calculation based on chunk size
...
Use current packet's chunk size instead of default chunk size.
2019-10-15 18:24:14 +02:00
Daniel Huigens
192893ecf0
Fix util.Uint8Array_to_b64 to not return lone \r characters
2019-10-15 14:24:58 +02:00
Daniel Huigens
c91fcd684d
Fix key preferences test when using Worker and use_native=false
2019-10-15 14:21:05 +02:00
Daniel Huigens
9f8a139624
Fix openpgp.revokeKey().publicKey when using the Worker
2019-10-15 14:15:41 +02:00
Ilya Chesnokov
1e37b27673
Use rsaBits=2048 in addSubkey tests when using Web Crypto ( #971 )
...
Fix tests failing in old browsers due to too low rsaBits.
Also, always throw in addSubkey when rsaBits is too low.
2019-09-24 13:53:12 +02:00
Daniel Huigens
fbbeaa3cd9
Rename numBits
and bits
to rsaBits
( #970 )
...
Keep supporting the old names as well though in `openpgp.generateKey`
and `getAlgorithmInfo`, but not in `openpgp.key.generate` (as it is
recommended that developers use `openpgp.generateKey` instead, and
it now throws when using `numBits` instead of `rsaBits`, so there's
no risk of silent key security downgrade).
The old names are now deprecated, and might be removed in v5.
2019-09-18 13:40:44 +02:00
Ilya Chesnokov
7f40ab0940
Implement Key.prototype.addSubkey
( #963 )
2019-09-16 15:53:19 +02:00
Daniel Huigens
9b5124d5cd
Switch from Sauce Labs to Browserstack ( #965 )
...
* Switch from Sauce Labs to Browserstack
* Don't run all tests on CI
2019-09-16 14:59:06 +02:00
Daniel Huigens
91aa8b0d4c
Only store newly created signatures as valid in the non-streaming case
...
When streaming, we're not actually sure yet that signing won't fail.
2019-09-12 14:03:29 +02:00
Daniel Huigens
2877bac018
Release new version
2019-09-12 01:17:37 +02:00
Daniel Huigens
aa8d37a82c
Fix verifying one-pass signatures in the compat build ( #968 )
...
This was broken in 735d6d0
.
See babel/babel#10431 .
2019-09-12 00:42:35 +02:00
Daniel Huigens
a14b09c89b
Release new version
2019-09-11 18:45:16 +02:00
Daniel Huigens
67e98e8fb5
Merge pull request #967 from twiss/keygen-fixes
...
Fix generating signing subkeys
2019-09-11 18:29:19 +02:00
Daniel Huigens
18474bdfb6
Fix decrypting newly generated key object when using the Worker
2019-09-11 18:11:16 +02:00
Daniel Huigens
a731a607ce
Fix writing newly generated embedded primary key binding signatures
2019-09-11 18:11:15 +02:00
Ilya Chesnokov
5d9629d6a3
Style fixes; add spaces around all infix operators, remove new Buffer ( #954 )
...
* Add "space-infix-ops": "error" rule
* Remove deprecated Buffer constructor
* Resolve new-cap eslint rule
* @twiss: Clarify code that selects curve and algorithm
2019-08-30 12:27:30 +02:00
Ilya Chesnokov
b23ee190c7
Fix intermittent Brainpool sign/verify bug ( #948 )
...
Fix #854
2019-08-23 14:09:25 +02:00
Daniel Huigens
a7cc71e35e
Throw when trying to encrypt a key that's already encrypted ( #950 )
2019-08-19 13:27:52 +02:00
Tom J
d27060e508
Use native Node crypto for RSA key generation ( #947 )
2019-08-16 13:11:04 +02:00
Daniel Huigens
c685e34c76
Release new version
2019-08-12 19:18:04 +02:00
Daniel Huigens
8d4440a369
Merge pull request #895 from twiss/fix-unencrypted-v5-keys
...
Implement V5 signatures and update V5 keys to rfc4880bis-07
Also, remove support for `openpgp.config.aead_protect_version = 0`.
2019-08-12 18:55:32 +02:00
Daniel Huigens
8f54c00fd3
Bump link to draft spec in README.md
2019-08-12 17:46:37 +02:00
Daniel Huigens
a184ef6ec4
Remove support for the previous draft00 AEAD
2019-08-12 17:46:37 +02:00
Daniel Huigens
80c535eeb7
Separate config option to use V5 keys from AEAD config option
2019-08-12 17:46:37 +02:00
Daniel Huigens
9bb1710a9f
Remove unused writeOldHeader function
2019-08-12 17:46:37 +02:00
Daniel Huigens
8312399f9d
Update V5 key hashing for signatures to rfc4880bis-07
2019-08-12 17:46:37 +02:00
Daniel Huigens
c8729a0295
Fix serializing GNU stripped-keys
2019-08-12 17:46:37 +02:00
Daniel Huigens
735d6d088f
Implement V5 signatures
2019-08-12 17:46:37 +02:00
Daniel Huigens
f629ddcb31
Fix reading and writing unencrypted V5 secret key packets
2019-08-12 17:46:37 +02:00
Ilya Chesnokov
dff1a8aed8
Fix test failing due to expired key ( #941 )
2019-08-12 17:45:35 +02:00
Daniel Huigens
cbe88a54e9
Disable HKP tests ( #940 )
...
keyserver.ubuntu.com no longer serves CORS headers.
2019-08-09 20:03:40 +02:00
Ilya Chesnokov
a0e9c608ba
DSA: Fix intermittent generation of invalid signatures ( #938 )
2019-08-07 17:42:55 +02:00
Tom J
3be779e0a1
Fix comment describing RSA coefficient u ( #937 )
2019-08-07 17:39:57 +02:00
Daniel Huigens
8585ad8924
Merge pull request #935 from twiss/fix-armor-checksum-errors
...
Fix armor checksum errors being ignored when not streaming
2019-07-19 20:08:16 +02:00
Daniel Huigens
562783df01
Fix armor checksum mismatch error message with allow_unauthenticated_stream
2019-07-19 19:06:19 +02:00
Daniel Huigens
9166d6737c
Don't babelify ES6 in unit tests when testing in modern browsers
2019-07-19 19:06:19 +02:00
Daniel Huigens
2a5ab75fca
Decrypt message with multiple keys in parallel
...
Don't keep the entire message in memory.
This also fixes an unhandled promise rejection when the input
stream contains an error (e.g. an armor checksum mismatch).
2019-07-19 19:05:26 +02:00
Daniel Huigens
10cbd307c3
Add test for throwing on armor modifications
2019-07-19 19:05:26 +02:00
Daniel Huigens
237db2c7f3
Fix armor checksum errors being ignored when not streaming
2019-07-19 19:05:26 +02:00
Ilya Chesnokov
29d67415e2
Accept @
in User ID names ( #930 )
2019-07-18 15:45:54 +02:00
Ilya Chesnokov
70cf2d60ff
Implement ECDH using Node crypto ( #921 )
2019-07-09 20:45:28 +02:00
Ilya Chesnokov
6d626ea70c
Style fixes and new style rules for eslint ( #919 )
2019-06-28 15:33:18 +02:00
chesnokovilya
1bd5689d75
Implement ECDH using Web Crypto for supported (NIST) curves ( #914 )
2019-06-27 19:21:32 +02:00
Daniel Huigens
32b4f2bd27
Fix grunt-saucelabs ( #917 )
...
Update Sauce Labs Tunnel
2019-06-26 23:32:21 +02:00
Daniel Huigens
3a7db8ea60
Release new version
2019-06-24 20:17:15 +02:00