Commit Graph

334 Commits

Author SHA1 Message Date
Msjoinder
016490656f update function documentation 2014-06-22 20:43:29 +00:00
Msjoinder
74ef7455f5 use .length to test 2014-06-07 15:09:55 -05:00
Msjoinder
4bca02e635 include other key arrays 2014-06-07 14:36:04 -05:00
Msjoinder
1fd2c0f6f4 API accepts single public key string instead of array 2014-06-07 14:11:53 -05:00
Chris Wiegand
47cf9b6980 fix JSON.parse(null)
if window.localStorage.config is null then JSON.parse returns an error about "u" not being valid (the word "undefined" is not valid JSON apparently :). So I test for null-ness first.
2014-06-03 21:55:16 -06:00
Tankred Hase
896e90c1ee Merge pull request #223 from toberndo/unify_verify_interface
Allow private keys for verify methods in Cleartext and Message class.
2014-05-17 09:20:32 +02:00
Thomas Oberndörfer
172855a8e9 Redefine Regex for blank line after armor header. This fixes an issue with truncated blank lines at the beginning of cleartext signed messages. 2014-05-16 19:08:29 +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
4a55905a8f Merge subkey binding signatures in key update method 2014-05-02 17:30:11 +02:00
Tankred Hase
b21bab2e42 Merge pull request #218 from toberndo/opt_prim_user
Minimize signature verifications to evaluate primary user
2014-05-02 11:32:32 +02:00
Thomas Oberndörfer
8ea87050bd Minimize signature verifications to evaluate primary user 2014-04-26 10:50:55 +02:00
Thomas Oberndörfer
b7847c072a Fix twofish cipher: did not accept typed arrays. 2014-04-25 16:35:43 +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
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
5e74302973 Keyring: don't break on error reading armored key. 2014-04-04 17:14:39 +02:00
Thomas Oberndörfer
ced145865e Accept armor header with trailing whitespace 2014-04-04 16:00:26 +02:00
Thomas Oberndörfer
86537fb48c Add support to write V3 signatures 2014-04-03 21:21:56 +02:00
Tankred Hase
4bf2fbf985 Merge pull request #207 from openpgpjs/ie11
Fix random.js for IE11
2014-04-02 19:52:13 +02:00
Thomas Oberndörfer
fb8f2a2a57 Implement user attribute packet write() 2014-04-02 19:21:44 +02:00
Tankred Hase
79309b6a88 Fix random.js for IE11 2014-04-02 18:38:24 +02:00
Thomas Oberndörfer
9413cd6e7f Drop key packets not in a meaningful order according to RFC4880 "11. Packet Composition" 2014-04-02 18:28:08 +02:00
Thomas Oberndörfer
d28eb4406d Fix error message for unsupported key packet version 2014-04-02 12:39:35 +02:00
Tankred Hase
9d428a735b Merge pull request #205 from openpgpjs/bundles
Generate openpgp.js without source map. New source map target is openpgp...
2014-03-31 16:23:52 +02:00
Thomas Oberndörfer
a4598f3bd4 Generate openpgp.js without source map. New source map target is openpgp_debug.js. Change dependency of workers: openpgp.worker.js -> openpgp.js, openpgp.worker.min.js -> openpgp.min.js. Remove openpgp.js with maps from unittests-bundle.js 2014-03-31 16:09:23 +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
Thomas Oberndörfer
867900cb37 Merge pull request #188 from toberndo/fix_partial_body_length
Fix packet partial body length
2014-03-31 12:13:23 +02:00
Thomas Oberndörfer
e8ef355604 OP-01-010 Invalid Armor Checksum Validation (Low) 2014-03-29 16:25:28 +01:00
Thomas Oberndörfer
5eca11ca5b Set signature feature subpacket depending on config.integrity_protect flag 2014-03-29 15:39:26 +01:00
Thomas Oberndörfer
1c818f2410 OP-01-006 Generated keys have no stored algorithm preference (Medium). Set preferences for symmetric, hash and compression algorithms. Fix preferred_compression_algorithms subpacket reading. 2014-03-28 21:39:54 +01:00
Thomas Oberndörfer
b9c597a41a OP-01-003 Suggested Code Enforcement of RandomBuffer (Low). Clearing random number from buffer after usage. buffer variable is still a public. 2014-03-28 13:16:33 +01:00
Thomas Oberndörfer
1acf1cff9a OP-01-002 Math.random() usage in dead Code Branch (Low) 2014-03-28 10:29:23 +01:00
Thomas Oberndörfer
4d96089f72 OP-01-001 Type confusion in crypto.random.RandomBuffer (Low) 2014-03-27 15:49:10 +01:00
Thomas Oberndörfer
ed13502dc2 OP-01-025 EME-PKCS1-v1_5 Error Handling in RSA Decryption (High). Rewrite pkcs1.eme.decode() and pkcs1.eme.encode(). Add fix from jsbn 1.4 release. 2014-03-27 12:58:58 +01:00
Thomas Oberndörfer
79dbb2e6dd Errata 2270: Fix ASN.1 prefix for SHA224. http://www.rfc-editor.org/errata_search.php?rfc=4880&eid=2270 2014-03-26 18:15:29 +01:00
Thomas Oberndörfer
357d49f7e9 OP-01-026 Errors in EMSA-PKCS1-v1_5 decoding routine (High) and OP-01-018 Suggested improvement in RSA signature verification (Low). Do RSA signature verification as described in RFC 3447 Section 8.2.2. Remove pkcs1.emsa.decode(). Rewrite pkcs1.emsa.encode(). Hash algorithms: throw exception on error condition. 2014-03-26 18:04:58 +01:00
PawelGorny
48ec28fef2 An implementation SHOULD ignore any subpacket of a type that it does not
recognize.
2014-03-24 21:36:57 +01: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
Thomas Oberndörfer
3f626f4bfb OP-01-024 Random Range Bias in DSA/Elgamal (Low). Fix ranges, add TWO constant to BigInteger. 2014-03-21 17:12:02 +01:00
Thomas Oberndörfer
04680a67cd OP-01-020 Missing check in DSA signature generation (Medium). Add check and repeat until r and s not equal to 0. 2014-03-21 16:45:19 +01:00
Thomas Oberndörfer
93ca8b62fe OP-01-019 Cleartext Message Spoofing in Armor Headers (Critical). Fix: throw error if unknown ASCII armor type. 2014-03-21 16:11:48 +01:00
Thomas Oberndörfer
329c92bc73 OP-01-009 Cleartext Messages Spoofing by Lax Armor Headers parsing (Critical). Add armor header verification. Verify "Hash" header in cleartext signed message. 2014-03-21 15:37:52 +01:00
Thomas Oberndörfer
105ec06da3 Throw error when trying to use IDEA cipher 2014-03-18 18:42:52 +01:00
Thomas Oberndörfer
22e4540ed9 OP-01-007 Algorithm Preferences ignored upon Encryption (Low) 2014-03-18 17:45:15 +01:00
Thomas Oberndörfer
9f23c6a891 OP-01-005 Side-channel leak in RSA decryption (High). Add config option for RSA blinding, default true. Update jsbn to 1.3. Remove decrypted packets after Message.decrypt(). 2014-03-17 11:54:40 +01:00
Thomas Oberndörfer
e1fcc51d0e OP-01-015 EME-PKCS1-v1_5 padding uses Math.random() (Critical) 2014-03-12 21:24:52 +01:00
Tankred Hase
3604f19eb9 Add onerror handler to Worker to see uncaught errors 2014-03-07 23:04:22 +01:00
Thomas Oberndörfer
6bb53f04b4 Merge pull request #176 from Matze2010/master
Possibility to set filename of literal data packet (tag 11)
2014-02-27 13:07:28 +01:00
Thomas Oberndörfer
1a4c504bc7 Fix packet partial body length 2014-02-27 13:01:47 +01:00
Tankred Hase
7cba2be2fc Merge pull request #179 from toberndo/keyring_enh
Refactoring keyring, Key update method, Fixes
2014-02-27 11:04:25 +01:00
Thomas Oberndörfer
1dfdfb62cb Keyring: simplify API, accept 16 char hex or fingerprint as keyid. 2014-02-26 11:45:03 +01:00
Tankred Hase
3d423655c4 reduce memory allocations in aes block cipher, optimize performance test 2014-02-26 00:20:46 +01:00
Tankred Hase
9e23b94db3 clean wroning api usage in cfb 2014-02-25 14:55:29 +01:00
Tankred Hase
ec4a0aca46 use typed array in aes and cfb, cleanup for loops 2014-02-25 14:38:52 +01:00
Tankred Hase
afabb56d41 use forge sha256 implementation 2014-02-25 12:47:45 +01:00
Tankred Hase
31f9064e90 use string instead of array in cfb encrypt 2014-02-25 10:50:57 +01:00
Tankred Hase
47d86825e2 cleanup for loops, use strings += instead of array.push/join, use strict mode 2014-02-25 09:55:58 +01:00
Tankred Hase
6b81995dd5 remove aes args from global scope 2014-02-25 00:05:43 +01:00
Tankred Hase
d0c319dd49 minor optimizations in cfb mode 2014-02-24 21:30:21 +01:00
Thomas Oberndörfer
151694ff07 Write unhashed subpackets. Fix #178. 2014-02-23 20:51:02 +01:00
Thomas Oberndörfer
5d4d3f5ba1 Fix structure cloning after keyid buffering change 2014-02-23 20:49:51 +01:00
Thomas Oberndörfer
efc384e71c Keyring: separate storage for public and private keys. ImportKey method supports update. 2014-02-23 20:48:38 +01:00
Thomas Oberndörfer
d6e4e3c028 Add key update method. Fix getPrimaryUser: evaluation of most significant self signature. 2014-02-23 20:46:52 +01:00
Tankred Hase
fb2ca2ed03 Merge pull request #175 from openpgpjs/async-api
Async api
2014-02-12 22:20:40 +01:00
Tankred Hase
37c6ab8a0c do clearer case checking and load minified lib in worker 2014-02-12 19:28:54 +01:00
Matze2010
3a984edb02 Possibility to set filename of literal data packet (tag 11)
The filename of the literal data packet was hardcoded to msg.txt. Now
one has the possibility to manually set the filename of the literal
data packet.
2014-02-12 17:54:36 +01:00
Tankred Hase
e431f686b1 update docs 2014-02-12 17:05:52 +01:00
Tankred Hase
b0bd5168a8 add optional callback to public api and invoke AsyncProxy behind the scenes 2014-02-12 15:11:06 +01:00
Daniel
78adbdda42 Fixing typo as reported in issue #172 2014-02-11 14:56:48 -08:00
Thomas Oberndörfer
753b1fc637 Method getKeysForKeyId renamed and optimized, returns only single key. Deep optional parameter to search also in subkeys. Add method getKeyForLongId with same properties. Optimize access to keyid and fingerprint by using a buffer. 2014-02-10 18:57:17 +01:00
Thomas Oberndörfer
c47e1d8780 Fix getPrivateKeyForAddress. Replace global openpgp with specific modules. 2014-02-06 17:26:55 +01:00
Thomas Oberndörfer
f00f4a9582 Merge branch 'key_enh' 2014-02-06 12:46:24 +01:00
Thomas Oberndörfer
b1e8c9ec52 Add unit tests for getExpirationTime Key method 2014-02-06 12:28:36 +01:00
Thomas Oberndörfer
191eca353e Merge branch 'pr/170' 2014-02-06 12:23:47 +01:00
Thomas Oberndörfer
b3a5597ab9 Merge pull request #169 from openpgpjs/subkey_revocation
Verify subkey revocation signatures according to: RFC4880 Errata ID: 3298
2014-02-06 11:41:30 +01:00
Thomas Oberndörfer
a595d683a9 Add getExpirationTime method to Key and SubKey 2014-02-05 18:09:54 +01:00
Lars Olzem
69bf01fb86 fix keyring email check 2014-02-05 17:10:25 +01:00
Lars Olzem
c88718d1b6 add description 2014-02-05 14:29:40 +01:00
Lars Olzem
f5b88ea2ac fix calue access 2014-02-05 14:01:27 +01:00
Lars Olzem
0f16fc4be4 add variable item name in localstore 2014-02-05 13:14:23 +01:00
Thomas Oberndörfer
a9c9f78dd4 Verify subkey revocation signatures according to: http://www.rfc-editor.org/errata_search.php?rfc=4880&eid=3298 2014-02-04 17:44:22 +01:00
Thomas Oberndörfer
57849437d9 Fix isValidEncryptionKeyPacket function: access key flags by index 2014-02-04 15:51:47 +01:00
Tankred Hase
01469be87f Merge pull request #163 from MarcoPolo/master
Fixed keyring local storage
2014-02-02 09:14:44 -08:00
Tankred Hase
95db18eb4a Add unit test to catch #156 and fix it 2014-01-31 14:03:59 +01:00
Marco Munizaga
875ccf5196 Fixed keyring local storage 2014-01-31 02:26:57 -05:00
Thomas Oberndörfer
040ccbaf2c Web worker: simplify random data supply 2014-01-20 09:56:02 +01:00
Thomas Oberndörfer
abf0545208 Change internal representation of random data from Uint32Array to Uint8Array 2014-01-18 16:37:15 +01:00
Thomas Oberndörfer
37213e1654 Web worker: add decryptKey and decryptKeyPacket methods to proxy 2014-01-16 16:44:05 +01:00
Thomas Oberndörfer
a777371418 Web worker: unit tests for random buffer and entropy estimation 2014-01-16 13:34:31 +01:00
Thomas Oberndörfer
c9910929df Fix: clear subpackets of symmetrically encrypted packet after encryption 2014-01-15 19:44:00 +01:00
Thomas Oberndörfer
1fa47f0b4b Web worker: add entropy estimation 2014-01-15 19:40:57 +01:00
Thomas Oberndörfer
17c6f90113 Unit tests for web worker. Only active for browsers. 2014-01-13 15:42:03 +01:00
Thomas Oberndörfer
3612fc12dc Add web worker support. Load the whole library in a web worker
and make the high-level API accessible from an asynchronous proxy.
Entropy is seeded to worker on each generateKeyPair() call.
Allow serialization of packets and custom types for messaging API.
2014-01-13 13:56:06 +01:00
Robert Nelson
ec061ba101 Fix travis problem hopefully for real this time 2014-01-09 09:59:25 -08:00
Robert Nelson
4719966988 Fix travis problem 2014-01-09 09:40:57 -08:00
Robert Nelson
c951b64741 Merge branch 'nodejs-fixes' into standalone
Conflicts:
	src/crypto/random.js
2014-01-09 08:04:21 -08:00
Robert Nelson
5768fd5b23 Fix nodejs support 2014-01-09 07:51:05 -08:00
Robert Nelson
4cabe075d5 Add standalone support 2014-01-09 07:31:00 -08: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