Commit Graph

1796 Commits

Author SHA1 Message Date
Sanjana Rajan
e616f8a242
Merge pull request #763 from twiss/decrypt-performance-fix
Decryption performance fix
2018-09-03 15:20:19 -07:00
Daniel Huigens
ca2f6d03b6 Slightly optimize base64 decoding 2018-09-03 18:23:38 +02:00
Daniel Huigens
dc722770d0 Don't process armored message data line per line
This cuts down on the overhead of streaming by reducing the amount
of calls to reader.read() and writer.write().
2018-09-03 18:23:38 +02:00
Sanjana Rajan
b004ddecb2
Merge pull request #699 from twiss/saucelabs-browsers
Update Sauce Labs browsers
2018-08-29 10:46:46 -07:00
Daniel Huigens
8a254b6001 Update Sauce Labs browsers 2018-08-29 17:34:38 +02:00
Daniel Huigens
564c645064 Fix intermittent "Data did not arrive early" test failure 2018-08-24 13:31:44 +02:00
Sanjana Rajan
8681ce8706
Merge pull request #755 from DanielRuf/test/add-nodejs-10
test: add Node.js 10 and remove Node.js 9
2018-08-22 12:44:29 -07:00
Daniel Ruf
aa0f1320ff
tests: force npm install instead of npm ci 2018-08-19 21:18:14 +02:00
Daniel Ruf
d94a3b8735
test: add Node.js 10 and remove Node.js 9 2018-08-17 15:43:12 +02:00
Sanjana Rajan
22c66c13a6 Release new version 2018-08-14 15:37:17 -07:00
Sanjana Rajan
d3236434b8 update release script 2018-08-14 15:34:54 -07:00
Daniel Huigens
7a4df6912b Fix intermittent failures of tests for stream error detection on Node 2018-08-14 21:49:17 +02:00
Sanjana Rajan
6214459dfb
Merge pull request #709 from twiss/stream
WIP: Streaming
2018-08-14 09:23:38 -07:00
Daniel Huigens
e055d86062 Update documentation 2018-08-14 17:50:26 +02:00
Daniel Huigens
6134b0dcaf Update README.md 2018-08-14 17:50:25 +02:00
Daniel Huigens
80453d29ad Update release script 2018-08-14 17:24:41 +02:00
Daniel Huigens
e5a3095894 Fix GCM and EAX in Edge
Web Crypto AES-GCM in Edge seems to require non-empty ADATA and an
explicit tagLength.

AES-CTR doesn't seem to be supported at all, so this disables Web Crypto
for EAX in Edge.
2018-08-14 17:24:41 +02:00
Daniel Huigens
08216bab13 Add npm run build to build both compat and non-compat files 2018-08-14 17:24:41 +02:00
Daniel Huigens
a2044a2833 Fix Sauce Labs Edge 2018-08-14 17:24:41 +02:00
Daniel Huigens
4bdc5e92ab Add --compat option
Without it, the generated build is for recent versions of
Chrome, Firefox, Safari and Edge.

With it, the generated build is for IE11+.
2018-08-14 17:24:41 +02:00
Daniel Huigens
8170682e54 Replace build_debug target with --dev option
The --dev option also works with browsertest and any other targets
that depend on a build.
2018-08-14 17:24:40 +02:00
Daniel Huigens
c705f475b7 Switch back to hash.js SHA512
asmcrypto.js SHA512 is huge (75kB, 7kB gzipped).

This partially reverts fadcc4b5.
2018-08-14 17:24:40 +02:00
Daniel Huigens
d1626a7a51 Disable some tests on Sauce Labs
Since we still run the full test suite on Node.js, this would
only no longer catch bugs which are specific to

- Browser non-draft04 GCM (and don't manifest in draft04 GCM,
  and don't manifest in Node.js non-draft04 GCM)
- Browser OCB (which is not natively implemented in the browser)
- Browser V5 Keys
2018-08-14 17:24:40 +02:00
Daniel Huigens
00a2c0c0c2 Support unicode surrogate code points 2018-08-14 17:24:40 +02:00
Daniel Huigens
a2f53b2ce2 Speed up initial builds 2018-08-14 17:24:40 +02:00
Daniel Huigens
9bf7bbf45e Don't generate a new key for each encryption mode in tests 2018-08-14 17:24:39 +02:00
Daniel Huigens
67b067b1da Remove duplicate tests
Many tests would run for every encryption mode, or for both V4 and V5 keys,
without there being any difference between the different test runs.

`grunt coverage` before and after this commit reports almost identical
statistics, providing some confidence that no code coverage was lost.
2018-08-14 17:24:39 +02:00
Daniel Huigens
225f586970 Make ECC tests less idiosyncratic 2018-08-14 17:19:55 +02:00
Daniel Huigens
aa3ede94ec Fix intermittent failure of tests detecting checksum errors 2018-08-14 17:19:55 +02:00
Daniel Huigens
68016b22a5 Always scroll down unit tests on Sauce Labs 2018-08-14 17:19:54 +02:00
Daniel Huigens
8c7e4386af Fix stream-reading zero-length (partial) packets 2018-08-14 17:19:54 +02:00
Daniel Huigens
6fdfb2cd9d Don't include Node Buffer in browserified version 2018-08-14 17:19:54 +02:00
Daniel Huigens
7756e4dc99 Update npm-shrinkwrap 2018-08-14 17:19:54 +02:00
Daniel Huigens
052fa444be Support Node streams 2018-08-14 17:19:54 +02:00
Daniel Huigens
0ddff3ae7d Rename asStream to streaming
Also, break up `postProcess`.
2018-08-14 17:19:51 +02:00
Daniel Huigens
b35b167e63 Add openpgp.cleartext.fromText
For symmetry with message.fromText
2018-08-14 16:35:41 +02:00
Daniel Huigens
52c4fa9639 Move streams library to a separate package 2018-08-14 16:35:40 +02:00
Daniel Huigens
252da44419 Don't depend on util in stream.js 2018-08-14 16:35:40 +02:00
Daniel Huigens
bb15ffc2a0 Fix streaming verify when using Worker and streams polyfill 2018-08-14 16:35:40 +02:00
Daniel Huigens
61a0e3fa69 Fix tests on IE11 2018-08-14 16:35:40 +02:00
Daniel Huigens
29271accef Enable Transferables in IE11
Reverts 11ff845c.
2018-08-14 16:35:40 +02:00
Daniel Huigens
c75e2323c0 Support IE11 for streaming 2018-08-14 16:35:39 +02:00
Daniel Huigens
721e522b17 Don't increase buffering in transformWithCancel
Keep backpressure the same as in default TransformStream().
2018-08-14 16:35:39 +02:00
Daniel Huigens
0b0112d1e6 En/decrypt all AEAD chunks in parallel when not returning a stream 2018-08-14 16:35:39 +02:00
Daniel Huigens
d844b8b06c Add minimum AEAD buffer size
This enables parallelism for streaming AEAD chunked encryption.

The reason we can't do so at the very end of the pipe chain
(e.g., in `readToEnd`) is because requests for increased
buffering (i.e. `desiredSize > 1`) do not propagate backwards,
only requests for backpressure (i.e. `desiredSize <= 0`) do.
2018-08-14 16:35:39 +02:00
Daniel Huigens
54d5bd7d39 Add testcase for verifying messages without one-pass-signatures 2018-08-14 16:35:39 +02:00
Daniel Huigens
ca537e439d Comments & code style 2018-08-14 16:35:38 +02:00
Daniel Huigens
1101a05b10 Don't return streams inside unarmored generated keys and signatures
When not requested, we convert the streams to Uint8Arrays.

This makes the generated key safe to pass to a Worker more than once.

Partially reverts 735aa1da.
2018-08-14 16:35:36 +02:00
Daniel Huigens
85223093a4 Switch to fork of asmcrypto.js
Fixes performance issues in Firefox.
2018-08-10 14:46:30 +02:00
Daniel Huigens
d489f3369f Update to asmcrypto.js 2 2018-08-10 14:46:30 +02:00