Commit Graph

170 Commits

Author SHA1 Message Date
Tankred Hase
4070e27959 Cleanup of AES-CFB code in integrity protected packet 2016-03-25 16:10:27 +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
c8569e0cd5 Add version attribute to the AEAD packet 2016-03-24 10:53:35 +08:00
Tankred Hase
8f8218e9de Cleanup and test AEAD protected packet 2016-03-22 17:45:19 +08:00
Tankred Hase
149f5d5191 Use promise api in sym_encrypted_* packets 2016-03-22 17:45:18 +08:00
Tankred Hase
ded8926b27 Support AES-GCM with AEAD Protected Data Packets
Closes openpgpjs/openpgpjs#421
2016-03-22 17:44:22 +08:00
Harry Marr
68d1b5a35c Handle carriage-return only newlines
Newlines are normalised to \r\n, but that previously assumed that only
\r\n and \n newline characters could be used. Even though \r newlines
are rarely used in the wild, it's be helpful to support them. Currently,
they're just removed entirely.
2016-02-14 12:01:19 +00:00
Tankred Hase
000c3b3686 Revert "Decode utf8 text only for correct format in Literal.getText()"
This reverts commit 83fcbaa633.
2016-02-10 15:33:45 +07:00
Tankred Hase
6547b4ef68 Test encrypt/decryptSessionKey and finalize api, review docs 2016-02-10 12:52:13 +07:00
Tankred Hase
4f6e036a07 Cleanup packet list clonong --> src/packet/clone.js 2016-02-09 19:01:30 +07:00
Tankred Hase
83fcbaa633 Decode utf8 text only for correct format in Literal.getText() 2016-02-06 22:58:43 +07:00
Tankred Hase
d40c3e81d9 Cleanup code of src/packet/literal.js 2016-02-06 14:22:19 +07:00
Tankred Hase
f87d8d0433 Fix parsing packets from tag in web worker 2016-02-05 15:39:11 +07:00
Tankred Hase
70ac662073 Refactor src/packet/*.js to use import & export 2016-02-05 14:44:22 +07:00
Tankred Hase
bcfc8ef7f7 Use npm published asmcrypto-lite module 2016-02-04 21:47:40 +07:00
Tankred Hase
3bf421206b Further cleanup of sym_encrypted_integrity_protected.js 2016-02-04 16:41:40 +07:00
Tankred Hase
642f754169 Add more files to linting, make strict mode optional for each file 2016-02-04 16:41:37 +07:00
Tankred Hase
cfe058596f Include asmCrypto via npm 2016-02-04 09:42:49 +07:00
Tankred Hase
90a7457b71 Refactor most src files to strict mode, delint 2016-02-04 00:37:00 +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
Bart Butler
469a6be31a Rebase for upload to main openpgpjs repo 2016-02-03 20:24:54 +07:00
Bart Butler
f56b6887d9 native crypto and hash for nodeJS 2016-02-03 20:24:54 +07:00
Bart Butler
88a7534b8a Add asmCrypto, native node crypto calls for faster AES 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
Bart Butler
2e4e9387a0 Fixes for symmetrically encrypted session keys 2016-02-03 20:24:54 +07:00
Artem Chudinov
3e2f34ac62 Add missing semicolons 2016-01-07 15:35:47 +01:00
Thomas Oberndörfer
2ee347154c Symmetrically encrypted packet: raise error if MDC is missing for modern cipher. 2016-01-07 15:35:47 +01:00
evilaliv3
9589fa0b52 Apply mixed code review thanks to webstorm inspector 2016-01-07 14:46:55 +01:00
Peter Breitling
07e4278a3a Optimized memory footprint for encrypting and decrypting 2015-06-10 21:12:55 +02:00
Tankred Hase
bed393063d Merge pull request #272 from laktak/compress
Compression Support
2014-12-09 15:36:41 +01:00
Christian Zangl
da650e2d63 add compression support (for zip & zlib) using https://github.com/imaya/zlib.js
add zlibjs dependency, grunt task
fix compData vs compdata bug
2014-12-04 22:29:33 +01:00
Christian Zangl
8d08d0bd1a fix symkey version 2014-11-12 16:47:32 +01:00
Tankred Hase
2362cce642 Merge pull request #259 from openpgpjs/promises
Refactor public api to use ES6 Promises
2014-10-20 16:12:13 +02:00
Tankred Hase
562831d6dc Merge pull request #245 from inovari/master
Bugfix in packet_length calculation
2014-10-02 00:24:23 +02:00
Tankred Hase
0ac58356b5 Refactor keygen to use promises (Work in progress) 2014-10-01 13:13:09 +02:00
Tankred Hase
cbe4a17ccb Refactor key generation to use callback
* TODO: reactive native web crypto in rsa.js:142
* TODO: generate publicExponent Uint8Array from argument E in rsa.js:148
* TODO: signing with generated web crypto key fails with "Could not find valid key packet for signing in key"
2014-09-30 18:22:17 +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
060da64aab Key generation: do not clear private MPIs for keys without passphrase. 2014-07-30 16:36:01 +02:00
inovari
91ccbeed80 Bugfix in packet_length calculation
One of the bitshifts used to construct tmplen (lines 230-231) was inconsistent with the other expressions:

(input[mypos2++].charCodeAt() << 8)

causing following error:

TypeError: Cannot call method 'charCodeAt' of undefined
    at Object.module.exports.read (/home/scott/dev/keystone/fetch/node_modules/openpgp/src/packet/packet.js:231:16)

Corrected to 

(input.charCodeAt(mypos2++) << 8)
2014-07-16 15:37:06 -04:00
Tankred Hase
62debad52d Allow removal of passphrase protection by calling encrypt with an empty passphrase 2014-07-01 15:02:09 +02:00
Thomas Oberndörfer
7a7c181ee6 Allow private keys for verify methods in Cleartext and Message class. Refactor getKeyPacket methods in Key class. 2014-05-14 11:32:09 +02:00
Thomas Oberndörfer
bb0ac83cb7 Generate key by default without unlocking secret part. Use options parameter for generate method. 2014-05-05 12:11:36 +02:00
Thomas Oberndörfer
82b18c61f3 Add empty read method to trust packet. Otherwise import of key with a trust packet will fail. Trust packets are ignored and filtered out by the Key class. 2014-04-04 17:33:30 +02:00
Thomas Oberndörfer
86537fb48c Add support to write V3 signatures 2014-04-03 21:21:56 +02:00
Thomas Oberndörfer
fb8f2a2a57 Implement user attribute packet write() 2014-04-02 19:21:44 +02:00
Thomas Oberndörfer
d28eb4406d Fix error message for unsupported key packet version 2014-04-02 12:39:35 +02:00
Thomas Oberndörfer
06adf49122 Merge pull request #202 from PawelGorny/fixSigUnknwTypeNotation
An implementation SHOULD ignore any subpacket of a type that it does not recognize
2014-03-31 12:39:30 +02:00