Commit Graph

75 Commits

Author SHA1 Message Date
Tankred Hase
bc5eb03ccd Add var declaration to des.js and use strict mode 2016-01-24 19:55:20 +07:00
evilaliv3
1f995bea22 Fix scope of variables used by des_createKeys in src/crypto/cipher/des.js 2016-01-18 11:58:43 +01:00
evilaliv3
a730d3f7ad Replace check for detecting that an object is a promise 2016-01-07 18:28:40 +01:00
evilaliv3
9589fa0b52 Apply mixed code review thanks to webstorm inspector 2016-01-07 14:46:55 +01:00
Artem Chudinov
1ee96a3f40 md5.js: Remove an unused variable to support enforced strict mode
The problem was:
arzeth /tmp/test % npm install openpgp
openpgp@1.2.0 node_modules/openpgp
├── node-localstorage@0.3.6
├── es6-promise@1.0.0
└── zlibjs@0.2.0

arzeth /tmp/test % node --version
v3.0.0

arzeth /tmp/test % node
> var openpgp = require('openpgp');
undefined
>

arzeth /tmp/test % node --use_strict
> var openpgp = require('openpgp');
ReferenceError: txt is not defined
    at md51 (/tmp/test/node_modules/openpgp/src/crypto/hash/md5.js:135:7)
    at md5 (/tmp/test/node_modules/openpgp/src/crypto/hash/md5.js:198:14)
    at Object.<anonymous> (/tmp/test/node_modules/openpgp/src/crypto/hash/md5.js:211:5)
    at Module._compile (module.js:430:26)
    at Object.Module._extensions..js (module.js:448:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/tmp/test/node_modules/openpgp/src/crypto/hash/index.js:10:8)
2015-08-19 22:15:21 +05:00
Peter Breitling
07e4278a3a Optimized memory footprint for encrypting and decrypting 2015-06-10 21:12:55 +02:00
Bart Butler
51dbbe2090 tanx update 2 2015-05-22 12:03:59 -07: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
1cc3f4fe2e Merge pull request #285 from bartbutler/master
Comparison fix for broken getRandomBigIntegerInRange function
2015-02-11 11:31:58 +01:00
Krzysztof Kotowicz
587127acd1 Correctly check parameters range in DSA verify. 2015-02-10 12:01:22 +01:00
Bart Butler
0ce32bec92 Need to use compareTo when comparing BigIntegers, otherwise get a string comparison with lexical order 2015-02-08 21:20:07 -08:00
Tankred Hase
0ac58356b5 Refactor keygen to use promises (Work in progress) 2014-10-01 13:13:09 +02:00
Tankred Hase
72cb1cfc49 Make WebCrypto optional with config.useWebCrypto 2014-10-01 11:17:48 +02:00
Tankred Hase
e6f66b9039 Cleanup promise error handling 2014-10-01 08:40:26 +02:00
Tankred Hase
0af12b81a3 Fix typo 2014-10-01 07:40:02 +02:00
Tankred Hase
7c2cf89589 Fix decoding of JWK. Webcrypto works. 2014-09-30 21:57:46 +02:00
Tankred Hase
85d2199971 Activate web crypto api (still fails tests)
* Remove api support for safari
* Fix error handling
2014-09-30 19:31:12 +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
Thomas Oberndörfer
d6963f2017 map JWK parameters to local BigInteger 2014-09-30 18:20:26 +02:00
Tankred Hase
15edf09972 Add RSA keygen example using WebCrypto Api 2014-09-30 18:20:26 +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
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
Tankred Hase
79309b6a88 Fix random.js for IE11 2014-04-02 18:38:24 +02: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
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
105ec06da3 Throw error when trying to use IDEA cipher 2014-03-18 18:42:52 +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
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
Tankred Hase
95db18eb4a Add unit test to catch #156 and fix it 2014-01-31 14:03:59 +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
1fa47f0b4b Web worker: add entropy estimation 2014-01-15 19:40:57 +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
4cabe075d5 Add standalone support 2014-01-09 07:31:00 -08:00