Commit Graph

131 Commits

Author SHA1 Message Date
Daniel Huigens
ddda6a0b16 Implement cancellation by manually linking together input and output streams 2018-08-10 14:46:24 +02:00
Daniel Huigens
9c1c28bc59 Add option to read unauthenticated data from stream 2018-08-10 14:46:23 +02:00
Daniel Huigens
ade2627bca Streaming verify one-pass signatures 2018-08-10 14:44:01 +02:00
Daniel Huigens
fb155ffae0 Streaming support on Node 2018-08-10 14:44:01 +02:00
Daniel Huigens
802e1b8d94 Transfer Streams to Workers
Also, add a "asStream" parameter to high-level functions to control
whether the return value is a Stream; defaulting to whether the
parameter passed was a Stream.
2018-08-10 14:44:01 +02:00
Daniel Huigens
37014ecf30 Pass more tests
- Allow leading spaces in headers (since we were already accepting
leading spaces everywhere else in the armored text).
- Read ReadableStreams before passing them to a Worker
2018-08-10 14:44:01 +02:00
Daniel Huigens
db39e616ca Replace stream.tee() with stream.clone()
Also some other fixes to pass more tests.
2018-08-10 14:44:01 +02:00
Daniel Huigens
3475843d82 Don't hack util.concatUint8Array() to handle Streams
Use util.concat() instead.
2018-08-10 14:44:01 +02:00
Daniel Huigens
16ba26c298 Streaming AEAD 2018-08-10 14:44:01 +02:00
Daniel Huigens
1f30556674 Split stream.transform into using two helper functions 2018-08-10 14:44:01 +02:00
Daniel Huigens
4ada3fa590 Don't mutate prototypes of Uint8Array, ReadableStream and ReadableStreamDefaultWriter 2018-08-10 14:44:01 +02:00
Daniel Huigens
0af4742a14 Signatures 2018-08-10 14:44:01 +02:00
Daniel Huigens
403bdc5346 Streaming decryption (Web) 2018-08-10 14:44:01 +02:00
Daniel Huigens
9853d3d830 Streaming encryption (Web) 2018-08-10 14:44:01 +02:00
Sanjana Rajan
99d3849ff3 style fix 2018-07-02 11:44:06 +02:00
Tom James Holub
35260cb5db configurable max uid length | close #724 2018-06-30 04:35:08 +00:00
Sanjana Rajan
c7a65ccd16 fix #716 2018-06-13 15:05:10 +02:00
Wiktor Kwapisiewicz
da98ccb421
Add ZBase32 encoding function
See: https://tools.ietf.org/html/rfc6189#section-5.1.6
2018-05-29 09:55:47 +02:00
mmso
11ff845c3e
Don't include transferable on IE11 on postMessage 2018-05-18 09:16:57 +02:00
Sanjana Rajan
4926667cf9
Merge pull request #694 from twiss/eslint-cleanup
Remove some ESLint silencers
2018-05-03 08:05:57 -07:00
Daniel Huigens
b5c6e655de Warn about console usage 2018-05-03 13:07:52 +02:00
Daniel Huigens
95b9e5188a Remove some ESLint silencers 2018-05-01 17:36:15 +02:00
Daniel Huigens
3c224379f6 Remove util.isUserId()
It was not really correct anyway; a user id can just be an email address
without < > brackets.
2018-05-01 13:39:24 +02:00
Daniel Huigens
6c2fec3450 Parse user IDs
Also, support comments when creating user IDs
2018-05-01 13:39:23 +02:00
Daniel Huigens
ebeedd3443 Fix removing whitespace from the last line of cleartext signed messages
Also, move normalizing line endings and removing whitespace to util functions
2018-04-30 15:55:33 +02:00
Daniel Huigens
d5a7cb3037 Constant-time double() in OCB 2018-04-27 14:06:20 +02:00
Daniel Huigens
cc4cc38fe7 Add util.print_debug_hexarray_dump 2018-04-27 14:06:15 +02:00
Daniel Huigens
f40489aa43 Implement getLeftNBits, shiftLeft and shiftRight for Uint8Arrays 2018-04-27 14:06:14 +02:00
Daniel Huigens
5d43b44e50 Log swallowed errors in debug mode 2018-04-27 14:06:14 +02:00
Mahrud Sayrafi
a5e7562066
Many documentation improvements; more to come 2018-03-08 19:27:57 -08:00
Mahrud Sayrafi
08da24de27
documentation fixes 2018-03-08 10:55:58 -08:00
Sanjana Rajan
c5b5bf7826 utils fix 2018-03-08 14:28:50 +01:00
Mahrud Sayrafi
5e857e131e
Bugfix in Native ECC in Node 2018-03-01 01:28:03 -08:00
Mahrud Sayrafi
9e1236c04c
Modernizes util.js 2018-02-28 15:49:41 -08:00
Mahrud Sayrafi
a2868a5c14
Begone jsbn.js! I tell you begonegit status 2018-02-22 00:37:43 -08:00
Mahrud Sayrafi
605021af3b
Various quickfixes and cleanups 2018-02-22 00:37:42 -08:00
Mahrud Sayrafi
aee8974ef5
RSA signatures now use asmcrypto.js; various fixes and tweaks 2018-02-22 00:37:41 -08:00
KAYLukas
071fc35f38 Check created time to be valid and discard milliseconds from date objects 2018-02-17 11:28:04 +01:00
Bart Butler
c8adaff826 change JS zlib to pako, use Node zlib if available 2018-02-14 14:21:53 -08:00
BafS
b672f1936a Use let and const ES6 features.
Remove var, for let or const if possible, clean some syntax, enforce one var per declaration and semicolons
2018-02-13 23:33:09 +01:00
BafS
de6ffc2f76 Remove 'user strict'
'use strict' is unnecessary inside modules because module code is always strict mode code. Ref: https://www.ecma-international.org/ecma-262/6.0/#sec-strict-mode-code
2018-02-13 23:33:09 +01:00
Bart Butler
bf8b4e940c fix browsers 2018-02-08 16:33:53 -08:00
Bart Butler
aa476b4905
Merge pull request #537 from nauadratti/patch-1
Allow punycode encoded TLDs in email
2018-02-07 23:26:18 -08:00
Mahrud Sayrafi
b2e39ccaf9
Documentation and cleanups 2018-02-07 03:25:28 -08:00
Mahrud Sayrafi
115d1c0949
A better patch for EdDSA truncation issue.
The last test in test/general/x25519.js is commented, as it seems to defy logic.
Yet it can be successfully imported by GPG2. TODO: How?
2018-02-03 14:36:20 -08:00
Sanjana Rajan
840c0229f8 move hex2Uint8array to utils 2018-01-30 18:30:15 +01:00
Tom James Holub
ce9dee9370 util.readNumber: stop overflowing until full range of uint32 | #497 2017-07-22 09:26:30 -07:00
nauadratti
3673e21a77 Allow punycode encoded TLDs in email
Closes #500
2017-03-30 19:05:22 +00:00
Bart Butler
a1ff93f1fc not all platforms implement TypedArray.slice 2017-03-28 11:44:04 -07:00
Bart Butler
a4190061d9 optimize Uint8Array2str function for large payloads 2017-03-28 10:35:20 -07:00
Sanjana Rajan
109f8a5d20 don't allow leading spaces in user id 2016-12-14 12:38:01 -08:00
Tankred Hase
843fba0d40 Use underscore instead of camelcase in config
zeroCopy —> zero_copy
useNative —> use_native
Remove unnecessary tests from build
2016-03-24 21:02:29 +08:00
Tankred Hase
f4fc274f14 Fix: use worker for CFB w/ webcrypto support 2016-03-24 13:24:18 +08:00
Tankred Hase
453a9cee07 Use web worker for encrypt/decrypt if no native gcm 2016-03-23 21:17:36 +08:00
Tankred Hase
b5618fd63d Remove redundant util.emailRegEx 2016-02-19 11:17:35 +07:00
Tankred Hase
25131e0df9 Added unit tests for util.getTransferables 2016-02-10 12:52:13 +07:00
Tankred Hase
450a7321d1 Fix typo in util 2016-02-09 17:38:16 +07:00
Tankred Hase
ab68d4b997 Support transferable objects in web worker for zero copy support 2016-02-09 17:01:48 +07:00
Tankred Hase
c7a6a88098 Add type validation util functions 2016-02-08 13:36:21 +07:00
Tankred Hase
8728db2b08 Finish refactoring src/**/*.js to use import & export 2016-02-05 15:23:11 +07:00
Tankred Hase
f06e5aea55 Refactor src/*.js to use import 2016-02-05 09:09:04 +07:00
Tankred Hase
d725abd5b6 Remove debuggind comments from util 2016-02-04 22:06:48 +07:00
Tankred Hase
346aa8f11a Cleanup node.js api detection 2016-02-03 20:24:54 +07:00
Tankred Hase
68d298c948 Fix node.js detection 2016-02-03 20:24:54 +07:00
Tankred Hase
4d325ca65c Cleanup RSA and util code 2016-02-03 20:24:54 +07:00
Tankred Hase
55bd9757e7 Refactor config.useWebCrypto to config.useNative 2016-02-03 20:24:54 +07:00
Bart Butler
11038dd946 Add Rusha for fast SHA hashes 2016-02-03 20:24:54 +07:00
Bart Butler
5711028449 does not pass tests yet 2016-02-03 20:24:54 +07:00
Bart Butler
b4916e29a3 binary strings to typed arrays in most places 2016-02-03 20:24:54 +07:00
Peter Breitling
07e4278a3a Optimized memory footprint for encrypting and decrypting 2015-06-10 21:12:55 +02:00
Bart Butler
2a89baa837 tanx updates 2015-05-22 12:02:23 -07:00
Bart Butler
e8465350fc Support for crypto API keygen in IE11 on Windows 7 and 8 2015-02-28 03:43:39 -08:00
Tankred Hase
cb3cc86a88 Add native RSA keygen (WebCrypto) support for Safari/iOS 2015-02-13 22:14:27 +01:00
Tankred Hase
7f2573c77d Refactor complete public api to use promises 2014-10-01 19:12:39 +02:00
Tankred Hase
5d07ee1eb1 Add documentation to getWebCrypto 2014-10-01 11:23:34 +02:00
Tankred Hase
72cb1cfc49 Make WebCrypto optional with config.useWebCrypto 2014-10-01 11:17:48 +02:00
Tankred Hase
bbe174828f Upgrade license to LGPL version 3.0 or later. 2014-09-30 18:16:58 +02:00
Thomas Oberndörfer
e1dffffe8d Refactor cfb.encrypt: fix inconsistent output depending on plaintext length. Use typed arrays for ciphertext. 2014-04-25 16:33:28 +02:00
Thomas Oberndörfer
28e7a80eba OP-01-011 Error suppression in UTF-8 decoding function (Medium). Add check for parameter type to decode_utf8. 2014-03-21 18:32:05 +01:00
Robert Nelson
9f4e6e7ebb Add files missed in last commit 2014-01-09 02:47:57 -08:00
Robert Nelson
3680695a69 Implement node.js support and cleanup source tree.
Rename resources to dist.

Eliminate keyring bundle and expose keyring class in openpgp module.

Add mochaTest grunt task to run node server-side tests.

Add node_pack grunt task to create npm package into dist and install it for testing.

Add node_store config property which specifies location of localStorage emulation when using node.

Add repository info to package.json.

Move util.js to src directory from util since it is the only file there.

Rename class properties in openpgp to the new class names.
2014-01-09 02:29:30 -08:00