Sanjana Rajan
d3f42b2fc1
update comments
2018-03-08 15:36:40 +01:00
Sanjana Rajan
c5b5bf7826
utils fix
2018-03-08 14:28:50 +01:00
Mahrud Sayrafi
6fefe22c09
Finished fixing key.js; fixes async tests
2018-03-08 10:01:55 +01:00
Mahrud Sayrafi
0b2817ba39
Last little things become async ...
2018-03-08 10:01:55 +01:00
Mahrud Sayrafi
47006069d1
Added test for encryption with revoked subkey
2018-03-08 10:01:54 +01:00
Mahrud Sayrafi
23a4141ce9
Addresses @sanjanarajan's comments
2018-03-08 10:01:54 +01:00
Mahrud Sayrafi
73a240df6c
Simplifies (Key|User|SubKey).isRevoked, API changes in key.js
...
For User s/revocationCertifications/revocationSignatures/g
For Key/SubKey s/revocationSignature/revocationSignatures/g is now an array.
2018-03-08 10:01:54 +01:00
Mahrud Sayrafi
ec22dabac3
Slightly simplifies key.js; adds key.verifyKeyPackets which should be run before getEncryption/SigningKeyPacket
2018-03-08 10:01:54 +01:00
Sanjana Rajan
354b961b67
primegen bugfix, recalculate i
2018-03-07 08:32:52 +01:00
KAYLukas
59d2973c05
ESLint
2018-03-07 00:50:26 +01:00
Mahrud Sayrafi
0684fb760e
Using small_primes from gpg2
2018-03-06 14:28:01 -08:00
KAYLukas
389d6410c9
Don't consider multiples of 3 and 5
2018-03-06 23:11:49 +01:00
Bart Butler
1cd9018346
some cleanup
2018-03-06 10:04:33 -08:00
Bart Butler
2bb5db2cf4
multiple web workers
2018-03-05 21:36:53 -08:00
Bart Butler
572abadc91
random number web worker buffer automatic refill
2018-03-05 17:57:35 -08:00
Bart Butler
f57888fe55
change all calls of getRandomBytes and getRandomBN to be async
2018-03-05 16:31:56 -08:00
Bart Butler
b088f005da
simplify random.js
2018-03-05 12:18:04 -08:00
Sanjana Rajan
3df1d849b3
missing brackets
2018-03-05 17:49:09 +01:00
Mahrud Sayrafi
2077d8487f
Wait for browser to finish ECC functions to make sure it succeeds
2018-03-01 15:47:50 -08:00
Bart Butler
20a0e76998
Merge branch 'master' of github.com:openpgpjs/openpgpjs
2018-03-01 11:55:17 -08:00
Bart Butler
5564b67cc8
remove readSignedContent in favor of appendSignature
2018-03-01 11:55:09 -08:00
Mahrud Sayrafi
30bd6102d5
OID's stored as Uint8Array
2018-03-01 11:35:16 -08: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
9275119dbc
Enables JSDoc Markdown Plugin
2018-02-28 14:13:44 -08:00
Mahrud Sayrafi
7eef65926a
Simplifies elliptic/curve.js
2018-02-28 00:58:50 -08:00
Mahrud Sayrafi
746d5032e8
Provide our own randomness to elliptic
2018-02-27 17:40:41 -08:00
Mahrud Sayrafi
ecc38d0c6e
Adds worker tests for NIST P-256 and X25519
2018-02-27 16:40:28 -08:00
Mahrud Sayrafi
f04273cd8d
Merge branch 'master' into feat/asmcrypto
2018-02-27 14:57:34 -08:00
Sanjana Rajan
51adfcc244
fromClone function for ecdh symkey
2018-02-27 23:15:42 +01:00
Mahrud Sayrafi
a79acf0386
Loopless getRandomBN using extra random bits
2018-02-27 13:10:52 -08:00
Mahrud Sayrafi
d529edfdda
Addresses @sanjanarajan's review comments
2018-02-27 13:04:45 -08:00
Mahrud Sayrafi
b518d27ff0
Added Fixed-Base Miller-Rabin
2018-02-27 00:23:51 -08:00
Mahrud Sayrafi
d418b4aa40
MPI stores data as Uint8Array instead of BN
2018-02-27 00:19:34 -08:00
Mahrud Sayrafi
3df0997f4d
Cleanups
2018-02-26 20:01:01 -05:00
Mahrud Sayrafi
378fb85733
Optimizes getRandomBN, Brings back IE11 KeyOperation helper
2018-02-26 16:56:42 -05:00
Mahrud Sayrafi
2e95335825
millerRabin set to 40 iterations; doc fixes
2018-02-25 09:30:19 -05:00
Mahrud Sayrafi
7a3a75a7df
JavaScript RSA using bn.js, without asmcrypto.js
2018-02-25 00:11:29 -05:00
Mahrud Sayrafi
9943379cb7
Added Native RSA Key Generation
2018-02-24 22:10:36 -05:00
Mahrud Sayrafi
168a6b0bb8
New probabilistic random number generation algorithms; UNTESTED
2018-02-22 18:27:34 -08:00
Mahrud Sayrafi
3b912d2fae
Cleaning mpi.js; TODO: store MPI.data as Uint8Array instead of BN
...
Also improved asynchronousity in packet tests
2018-02-22 14:51:57 -08:00
Mahrud Sayrafi
d40e8fe428
Use asmcrypto.js directly + quickfix
2018-02-22 11:51:21 -08:00
Bart Butler
1b66b9cf60
fix worker tests
2018-02-22 00:37:43 -08:00
Mahrud Sayrafi
a2868a5c14
Begone jsbn.js! I tell you begonegit status
2018-02-22 00:37:43 -08:00
Mahrud Sayrafi
1812166a53
RSA using asmcrypto with asmcrypto bignum
2018-02-22 00:37:42 -08:00
Mahrud Sayrafi
605021af3b
Various quickfixes and cleanups
2018-02-22 00:37:42 -08:00
BafS
10c49be91d
Use ES6 modules for exports
2018-02-22 00:37:42 -08:00
Mahrud Sayrafi
e1d85ba682
ElGamal and MPI use bn.js; TODO: RSA Key Generation
2018-02-22 00:37:42 -08:00
Mahrud Sayrafi
490b1dc0f0
ECDH, ECDSA, EdDSA are all on BN.js; TODO: ElGamal & type_mpi
2018-02-22 00:37:42 -08:00
Mahrud Sayrafi
9200f026f3
Starting to change MPI
2018-02-22 00:37:42 -08:00
Mahrud Sayrafi
2f3c0a86e9
DSA uses BN.js
...
added toBN for type_mpi
2018-02-22 00:37:41 -08:00
Mahrud Sayrafi
b126fd5be7
RSA encrypt/decrypt use asmcrypto as well
...
TODO: RSA key generation, removing jsbn from dsa, elgamal, mpi, etc.
2018-02-22 00:37:41 -08:00
Mahrud Sayrafi
aee8974ef5
RSA signatures now use asmcrypto.js; various fixes and tweaks
2018-02-22 00:37:41 -08:00
Mahrud Sayrafi
ed4cef102a
This branch uses the current version of asmcrypto.js
2018-02-22 00:37:41 -08:00
KAYLukas
a5b30468ef
Check creation time in expiration checks
2018-02-22 00:41:12 +01:00
KAYLukas
6b4d44dbb1
Fix browser tests
2018-02-19 22:12:24 +01:00
KAYLukas
454ca1d879
Address comments
2018-02-18 11:50:27 +01:00
KAYLukas
071fc35f38
Check created time to be valid and discard milliseconds from date objects
2018-02-17 11:28:04 +01:00
KAYLukas
6ca8bc2180
Add timeparameter for verification and remove verify_expired_keys
2018-02-16 17:20:48 +01:00
KAYLukas
7e66ea20db
Add timeparameter to signing and encryption
2018-02-16 17:20:48 +01:00
Bart Butler
3c2871a0e4
only access window.crypto.webkitSubtle in fallback
2018-02-15 15:34:32 -08:00
Bart Butler
7286116f1c
add deflate_level to config
2018-02-15 09:44:31 -08:00
Bart Butler
c8adaff826
change JS zlib to pako, use Node zlib if available
2018-02-14 14:21:53 -08:00
Bart Butler
fa2672fcc1
Merge pull request #642 from mmso/feat/bzip2
...
Fix #607 - Add support for bzip2 de/compression
2018-02-14 11:00:56 -08:00
Sanjana Rajan
b5d19b6f8d
pull out common signature code
2018-02-14 19:00:13 +01:00
Sanjana Rajan
38a11d7aaf
reuse createVerificationObjects for cleartext
2018-02-14 17:55:54 +01:00
Sanjana Rajan
94b12e566b
correctly handle cleartext headers with no hash specified
2018-02-14 17:07:39 +01:00
mmso
8808fdb8ed
Fix #607 - Add support for bzip2 de/compression
2018-02-14 14:14:07 +01:00
Bart Butler
8dd27722a3
unify hash libraries
2018-02-13 22:29:57 -08:00
BafS
9eb574b6c4
Hotfix - change var for const
2018-02-13 23:46:44 +01:00
BafS
a53f2b3780
Update packages, add lint script, remove useless eslint-plugins
2018-02-13 23:33:09 +01: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
6b65640ac7
Radix should be specified
...
Part of the best practices https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt and https://eslint.org/docs/rules/radix
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
Sanjana Rajan
de51d418d2
algorithm info for public key, include curve for ecc and bits for non-ecc
2018-02-13 21:23:13 +01:00
Bart Butler
8873ed0ff1
Update openpgp.js
...
doc fix
2018-02-13 11:01:09 -08:00
Bart Butler
c855fd4e4e
Update message.js
...
doc fix
2018-02-13 10:58:55 -08:00
mmso
9f7466ef45
Add compression support for the encrypt function
2018-02-13 15:08:41 +01:00
Sanjana Rajan
62015c2c8d
useWildcard -> wildcard
2018-02-12 19:31:47 +01:00
Sanjana Rajan
989ad5077e
cleanup, docs
2018-02-12 13:40:23 +01:00
Sanjana Rajan
7365ffc9b7
wildcard implementation
2018-02-12 09:47:51 +01:00
Sanjana Rajan
e5e49901a7
change var names
2018-02-12 09:47:51 +01:00
Sanjana Rajan
18e46ed6cf
gracefully handle reformatting keys with no subkey packets
2018-02-09 16:18:27 +01:00
Bart Butler
0a4e9461ca
Merge pull request #632 from openpgpjs/ripemd_license_issue
...
use different, MIT-licensed RIPEMD library, closing #625
2018-02-08 21:10:04 -08:00
Bart Butler
bf8b4e940c
fix browsers
2018-02-08 16:33:53 -08:00
Bart Butler
7bd78585fd
Merge pull request #629 from dkg/http-to-https
...
move from http to https where possible.
2018-02-08 13:36:14 -08:00
Bart Butler
fa208e8308
Merge pull request #630 from dkg/speling
...
Fix typos
2018-02-08 11:51:12 -08:00
Bart Butler
7975c86508
use different, MIT-licensed RIPEMD library, closing #625
2018-02-08 11:49:10 -08:00
Mahrud Sayrafi
d851398b0c
Merge branch 'master' into http-to-https
2018-02-08 10:56:46 -08:00
Bart Butler
c2a7ea2a20
Merge pull request #593 from laurinenas/inform-user-invalid-numBits-size
...
Add a console error when numBits param too low
2018-02-08 10:51:21 -08:00
Mahrud Sayrafi
0ebe0972e7
Merge branch 'master' into speling
2018-02-08 10:46:42 -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
Bart Butler
0f4d81bf2c
add test for signing with multiple keys, align signature packet order with high-level API private key order
2018-02-07 18:16:54 -08:00
Mahrud Sayrafi
1383107202
Fixed and unmuted a few eslint errors, ~10 remain
2018-02-07 04:23:16 -08:00
Mahrud Sayrafi
b2e39ccaf9
Documentation and cleanups
2018-02-07 03:25:28 -08:00
Bart Butler
602bbb707d
rename decryptSessionKey to decryptSessionKeys, return only unique session keys
2018-02-06 21:25:49 -08:00
Bart Butler
210ec26ed3
fix sporadic two password decryption failure
2018-02-06 16:43:51 -08:00
Bart Butler
bdf1ce8d64
add some more polyfills for old browsers
2018-02-06 10:56:29 -08:00
Bart Butler
89f86d83d5
fix obsolete browser tests, add some polyfills
2018-02-05 22:17:41 -08:00
Bart Butler
ac440b9ae6
use ES6 polyfill for worker and tests, not in openpgp.js
2018-02-05 14:21:35 -08:00
Mahrud Sayrafi
37eec2bde2
Added Ed25519 Test Vectors from RFC8032
2018-02-04 02:44:05 -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
Mahrud Sayrafi
3370eaa2aa
Expands truncated little-endian parameters in EdDSA
2018-02-02 05:42:54 -08:00
Mahrud Sayrafi
9cbfbf453b
Added contingency for when browser does not support NIST curves
2018-02-01 14:31:17 -08:00
Daniel Kahn Gillmor
1799107aac
Fix typos
...
This patch contains several trivial/inconsequential orthographic
fixes.
2018-02-01 10:03:41 -05:00
Daniel Kahn Gillmor
4da28fcc29
move from http to https where possible.
...
There are dozens of links in the OpenPGP.js codebase that are http but
could be replaced with https links. I've converted as many of them as
i could find.
2018-02-01 09:58:06 -05:00
Sanjana Rajan
41f1e697b5
remove isValid
2018-02-01 13:41:19 +01:00
Sanjana Rajan
5a6e65c00f
verification when decoding pkcs5
2018-02-01 13:14:26 +01:00
Bart Butler
76d7fac967
eliminate openpgp_browser.js
2018-01-31 19:27:00 -08:00
Bart Butler
496a45a97c
Update eddsa.js
2018-01-31 19:04:26 -08:00
Mahrud Sayrafi
a4134b9f55
Addresses various review comments by @bartbutler + some cleanups
2018-01-31 17:52:38 -08:00
Mahrud Sayrafi
d97bc064ea
Cleanups and doc fixes
2018-01-31 12:24:21 -08:00
Mahrud Sayrafi
aba8a7a647
Switches to asmcrypto-lite for AES
2018-01-30 18:36:38 +01:00
Mahrud Sayrafi
be2c605e5b
Improves secret key encryption/decryption performance by 35%
2018-01-30 18:36:38 +01:00
Mahrud Sayrafi
bf00fbd3ea
added ECC curve options to docs
2018-01-30 18:36:38 +01:00
Mahrud Sayrafi
d02b9c7bf0
Fixes problems with user certificate verification.
...
TODO: if using lower level functions, key.verifyPrimaryUser() MUST be
called and resolved before calling key.getSigning/EncryptionKeyPacket(),
key.getPrimaryUser(), etc.
Also: adds a flag to allow verification with expired keys from:
(cherry picked from commit b9d175d998
)
(cherry picked from commit 50940b2a1e
)
2018-01-30 18:36:37 +01:00
Sanjana Rajan
fa5805eaf7
don't assume all mpi type for encsessionkey
2018-01-30 18:36:26 +01:00
Sanjana Rajan
a173a63b16
doc fixes
2018-01-30 18:36:26 +01:00
Sanjana Rajan
3ce6309788
cleanup
2018-01-30 18:36:26 +01:00
Mahrud Sayrafi
5cb89f4f25
Addresses various review comments by @sanjanarajan
...
* Various FIXME tags are removed
* In curve.js:
- webCrypto/nodeCrypto fallback bug is fixed
- Curve25519 has keyType ecdsa (won't be used for signing, but technically can be)
- webGenKeyPair is simplifed
* In base64.js:
- documentation added and arguments simplified
* In ecdsa.js and eddsa.js:
- hash_algo is now at least as strong as the default curve hash
- simplified the code by moving webSign/nodeSign and webVerify/nodeVerify to live in key.js (ht @ismaelbej)
* In message.js:
- in decryptSessionKey, loops break once a key packet is decrypted
* In key.js:
- getPreferredHashAlgorithm returns the best hash algorithm
- enums are used for curve selection
2018-01-30 18:36:26 +01:00
Mahrud Sayrafi
3e1d9c4d0d
Fixes ECDH with Curve25519 and key import/export problems
2018-01-30 18:35:06 +01:00
Mahrud Sayrafi
35f18444b0
keygen and sign/verify with ed25519 works
2018-01-30 18:34:54 +01:00
Mahrud Sayrafi
e6820d7b2a
Passing all tests, on Node, Firefox, and Chrome
2018-01-30 18:34:28 +01:00
Mahrud Sayrafi
dcff16d32b
npm test and grunt browsertest can run side by side now; npm tests pass, browser stuck on problem related to asn1.js
2018-01-30 18:34:07 +01:00
Mahrud Sayrafi
21ae66c604
encrypt/decrypt/sign/verify will always return promises
...
Note: publicKeyEncryptedSessionKey uses promises, symEncryptedSessionKey does not
2018-01-30 18:33:55 +01:00
Mahrud Sayrafi
1a714cec73
ECC with async/await is 'Done, without errors.'
2018-01-30 18:33:55 +01:00
Mahrud Sayrafi
12eb037ba7
Everything in test/crypto/elliptic.js passes; working on test/general/ecc.js
2018-01-30 18:31:39 +01:00
Mahrud Sayrafi
11a2d0070b
ESLint is happy!
2018-01-30 18:31:30 +01:00
Mahrud Sayrafi
370a15e2a1
Remove jshint/jscs and fix babelify
...
(cherry picked from commit e4b810fe412bd5e383507668ef2d60320c31b1ca)
2018-01-30 18:31:18 +01:00
Mahrud Sayrafi
6886cd648a
elliptic/curves.js uses native code for genkey and sign/verify; sign/verify use async/await
2018-01-30 18:31:07 +01:00
Sanjana Rajan
8794446a66
change some variable names, add some curve parameters
2018-01-30 18:30:17 +01:00
Sanjana Rajan
311d288bb7
clone processing
2018-01-30 18:30:16 +01:00
Sanjana Rajan
86e15dbd0a
aes kw update
2018-01-30 18:30:16 +01:00
Sanjana Rajan
f8bfde7447
comments, docs
2018-01-30 18:30:16 +01:00
Sanjana Rajan
cbe61e6feb
key expansion for aes decryption keys, aesdecrypt function
2018-01-30 18:30:16 +01:00
Sanjana Rajan
26de17150c
use internal aes encrypt in key wrap, start refactoring aes to do decryption as well
2018-01-30 18:30:16 +01:00
Sanjana Rajan
b40408d42f
standardize packet reading code, make pkcs5 function names same as pkcs1
2018-01-30 18:30:16 +01:00
Sanjana Rajan
b718cf359d
simplify packet parsing using type maps
2018-01-30 18:30:16 +01:00
Sanjana Rajan
cdc7004b96
refactor mpi, generalize mpi to params to account for non-mpi algorithm-specific data
2018-01-30 18:30:15 +01:00
Sanjana Rajan
840c0229f8
move hex2Uint8array to utils
2018-01-30 18:30:15 +01:00
Sanjana Rajan
fade832619
remove material parameter for now
2018-01-30 18:30:15 +01:00
Sanjana Rajan
0de9eecdc8
distinguish between key and subkey type, when refactoring key just grab type from packets
2018-01-30 18:30:15 +01:00
Sanjana Rajan
3b8cea67a2
some style fixes, update tests
2018-01-30 18:30:15 +01:00
Sanjana Rajan
fdcfcf3a54
refactor formatUserIds
2018-01-30 18:30:15 +01:00
Ismael Bejarano
f87e759cb0
Create key from provided material
2018-01-30 18:30:14 +01:00
Ismael Bejarano
a5d9e6d09e
Generation of keys for elliptic curves
2018-01-30 18:30:14 +01:00
Ismael Bejarano
38a53c1bb1
Parse and create ECDH packets
2018-01-30 18:30:14 +01:00
Ismael Bejarano
585a2bd69d
Functions to encrypt and decrypt ECDH keys
2018-01-30 18:30:14 +01:00
Ismael Bejarano
673151ec87
Read and write ECDSA packets
2018-01-30 18:30:14 +01:00
Ismael Bejarano
ba2f49234e
Signature creation and verification
2018-01-30 18:30:14 +01:00
Ismael Bejarano
a8e8271185
Support functions for Elliptic Curve Cryptography
2018-01-30 18:30:13 +01:00
Ismael Bejarano
54b79be0b0
Add and remove PKCS5 padding
2018-01-30 18:30:13 +01:00
Ismael Bejarano
2f69d22130
Key Wrap and Unwrap from RFC 3394
2018-01-30 18:30:13 +01:00
Ismael Bejarano
26c6ab9b97
Parameters for the ECDH key derivation function
2018-01-30 18:30:13 +01:00
Ismael Bejarano
d8b1e3359a
Result of wrapping a session key for ECDH key
2018-01-30 18:30:13 +01:00
Ismael Bejarano
01be192a35
Object identifier type
2018-01-30 18:30:13 +01:00
Sanjana Rajan
b9d175d998
tests
2018-01-17 19:36:51 +01:00
Sanjana Rajan
50940b2a1e
flag to allow verification with expired keys
2018-01-17 18:37:25 +01:00
Bart Butler
1682787152
deal with empty encrypted data correctly
2017-12-22 13:26:53 -08:00
Bart Butler
81a59b76b1
do not echo data back to caller for detached signing
2017-12-05 11:44:01 -08:00
Sanjana Rajan
135bd3d46a
doc update
2017-12-02 11:48:14 -08:00
Sanjana Rajan
0e254a8c8c
simplify
2017-12-02 11:17:39 -08:00
Sanjana Rajan
6189cd4568
returnSessionKey flag in encrypt function
2017-12-02 11:04:29 -08:00
Sanjana Rajan
7e03410bc9
allow sessionKey param in top level encrypt
2017-12-01 21:25:43 -08:00
Bart Butler
59d99fc0c7
do not replace stack in async_proxy, add as workerStack
2017-11-28 10:25:16 -08:00
Bart Butler
7a9c3b0ddd
remove stack trace concatenation (non-standard), modify error message only
2017-11-27 19:06:25 -08:00
Bart Butler
617c1c9ee9
include error message in stack trace for Safari/Firefox
2017-11-27 16:50:18 -08:00
Bart Butler
49695ff50c
Error object cannot be used with structured clone, pass stack
2017-11-27 15:44:04 -08:00
Bart Butler
2a9a1b4846
Merge pull request #606 from FlowCrypt/issue_602_reformatkey_error
...
reformatKey: Key not decrypted error + test | #602
2017-11-27 13:22:17 -08:00
Bart Butler
f666e400fa
Merge pull request #605 from FlowCrypt/issue_598_armor_headers
...
improve armor header validation + tests | #598
2017-11-27 13:21:42 -08:00
Justin Chase
a5a913419b
Also concat stacks
2017-11-25 10:45:58 -06:00
Tom James Holub
d0d0874268
reformatKey: Key not decrypted error | #602
2017-11-25 12:24:44 +08:00
Tom James Holub
4495df0f42
improve armor header validation + tests | #598
2017-11-25 10:57:41 +08:00
Justin Chase
567d212204
Dont join stacks
2017-11-24 16:16:42 -06:00
Justin Chase
bf6c2b9319
Added a test verifying innerError
2017-11-24 16:12:37 -06:00
Bart Butler
58031cfaca
add openpgp.key.read() function for unarmored serialized keys
2017-11-06 13:42:07 -08:00
Andrius Laurinėnas
1d287cd9a9
Add a console error when numBits param too low
2017-10-13 19:50:48 +03:00
Sanjana Rajan
9893d602e2
account for non-cleartext sign/verify message parameters
2017-10-09 17:27:02 -07:00
Sanjana Rajan
b756d35b8f
use hash param in rsa key gen with webkit subtle
2017-09-20 18:28:37 +02:00
Thomas Oberndörfer
e3eb298ab7
Set keyExpirationTime for subkey binding signature
2017-08-30 16:09:53 +02:00
Bart Butler
ad029f1929
Update armor.js
...
Only console.log if debug mode on
2017-08-19 10:52:36 -07:00
Bart Butler
1e8bd4315b
Update armor.js
...
Small tweak
2017-08-19 10:49:36 -07:00
Patrick Brunschwig
93d823abb4
Fix for issue 573: don't throw with unknown Armor Headers, but just
...
with invalid ones
2017-08-19 18:32:02 +02:00
Tom James Holub
ce9dee9370
util.readNumber: stop overflowing until full range of uint32 | #497
2017-07-22 09:26:30 -07:00
Tom James Holub
2bda12731b
subKey.bindingSignature -> subKey.bindingSignatures[] - process all | #527
2017-07-21 21:38:33 -07:00
Tom James Holub
3f40a36081
do not remove equal sign at the end of armored body when missing checksum
2017-07-21 17:39:19 -07:00
Tom James Holub
ac055d69d2
fixed outdated annotations in armor.js
2017-07-21 15:39:06 -07:00
Tom James Holub
841b03d6cd
improved armor behavior - trailing newline
2017-07-21 15:35:27 -07:00
Tom James Holub
c27725782c
do not fail when missing armor checksum | #563
2017-07-21 10:13:33 -07:00
Bart Butler
d737f65ccc
Merge pull request #559 from openpgpjs/sign_byte_arrays
...
Sign Uint8 arrays
2017-07-12 19:45:53 -07:00
Sanjana Rajan
e53cbe8417
remove extra spaces
2017-07-08 13:26:20 +02:00
Sanjana Rajan
95c5e3af01
use message obj when signing uint8 array
2017-07-08 13:25:24 +02:00
Bart Butler
d33c46a33c
minor bugfix
2017-07-06 15:27:45 -07:00
Sanjana Rajan
d061af1fc3
style fixes
2017-07-06 16:29:25 +02:00
Sanjana Rajan
a9bb3f1839
armor based on text vs. bytes
2017-07-04 16:47:23 -07:00
Sanjana Rajan
28e5f5d3f4
allow cleartext msg data to be string or byte array
2017-07-04 14:15:39 -07:00
Sanjana Rajan
a7702a74d3
support split checksum where body and checksum are on the same line
2017-06-27 16:41:53 -07:00
Bart Butler
ddf6eb5783
change URL to https
2017-04-25 14:09:31 +02:00
Abhishek Hingnikar
472294ec84
Fix documentation
...
The storeHandler seems to need loadPublic, loadPrivate, storePublic, storePrivate methods but the current documentation only mentions load and store.
2017-04-08 16:12:47 +05:30
Kévin Bernard-Allies
342bc8fe01
Simplify code of CRC24 checksum in armor encoding
2017-04-06 13:12:45 +02:00
Sanjana Rajan
c3958b0270
tolerant default to true
2017-04-05 16:36:29 -07:00
Sanjana Rajan
b51b8ad341
add tolerant mode which suppresses errors in reading non-data packets
2017-04-05 07:54:08 -07:00
nauadratti
3673e21a77
Allow punycode encoded TLDs in email
...
Closes #500
2017-03-30 19:05:22 +00:00
Bart Butler
5fb23ac833
use web worker for reformatKey
2017-03-29 16:27:16 -07:00
Bart Butler
a1ff93f1fc
not all platforms implement TypedArray.slice
2017-03-28 11:44:04 -07:00
Bart Butler
62c24ed227
Merge pull request #534 from openpgpjs/signature_input
...
Accept signature object as an input to encrypt function
2017-03-28 10:43:00 -07:00
Bart Butler
a4190061d9
optimize Uint8Array2str function for large payloads
2017-03-28 10:35:20 -07:00
Sanjana Rajan
16c6d2f162
signatureInput -> signature
2017-03-23 13:01:12 -07:00
Sanjana Rajan
d04c09687d
spacing
2017-03-23 11:16:16 -07:00
Sanjana Rajan
25d16046c2
add one pass in case where no priv keys are passed in for signing
2017-03-22 17:14:30 -07:00
Sanjana Rajan
79160abcc9
allow signature as input in high level encrypt
2017-03-22 17:04:21 -07:00
Sanjana Rajan
af211f63c0
update README to demonstrate detached signature use, some documentation fixes
2017-03-17 16:54:34 -07:00
Sanjana Rajan
e4621fc688
initialize publicKeys to empty array, test case where signed message is decrypted without public keys to verify
2017-03-15 17:44:43 -07:00
Sanjana Rajan
4ec07672a7
return signature object inside verification object
2017-03-10 10:38:59 -08:00
Sanjana Rajan
da9e3c6264
small fixes
2017-03-07 19:10:33 -08:00
Sanjana Rajan
465d4643a8
add clone to packetlist support for signature objects
2017-03-07 16:51:08 -08:00
Sanjana Rajan
7d02154dc9
small fixes
2017-03-07 13:59:18 -08:00
Sanjana Rajan
43355e079f
add detached sig option to upper level functions
2017-03-07 13:59:18 -08:00
Sanjana Rajan
c3908cbec0
add detached sign/verify options to cleartext
2017-03-07 13:59:18 -08:00
Sanjana Rajan
4fd4c13ddd
refactor cleartext message to use signature object instead of packetlist
2017-03-07 13:59:17 -08:00
Sanjana Rajan
7b58cd9200
add tests
2017-03-07 13:59:17 -08:00
Sanjana Rajan
57d07091e8
add support for detached signatures
2017-03-07 13:59:17 -08:00
Bart Butler
ebc37f3a7d
Merge pull request #417 from zartdinov/master
...
Added ability to sign and verify public keys
2017-03-05 12:24:37 -08:00
Aydar Zartdinov
be776c61b1
Validate signatures by all suitable keys
2017-03-04 19:27:27 +00:00
Aydar Zartdinov
d5e88c7c79
Prevent self signing by fingerprint instead of keyId
2017-03-04 18:47:33 +00:00
Bart Butler
b0c1a854fd
move SHA1 to the bottom of the preferred hash algorithm list
2017-02-27 10:30:39 -08:00
Sanjana Rajan
e90161c2d1
add missing parentheses
2017-02-15 13:06:18 -08:00
Aydar Zartdinov
d9cb8e681d
Array.prototype.find replaced for Node.js 0.12 and IE 11
2017-02-15 21:31:05 +03:00
Aydar Zartdinov
3fa4c0c760
Base functionality moved to User.prototype
2017-02-15 21:08:17 +03:00
Aydar Zartdinov
715f98bb38
Reverted top level api changes
2017-02-15 21:04:50 +03:00
Aydar Zartdinov
5140a946e5
Added ability to sign and verify public keys
2017-02-15 21:04:50 +03:00
Bart Butler
6be9ddde59
Merge pull request #517 from openpgpjs/userID
...
Key reformatting and resigning
2017-02-13 16:11:17 -08:00
Sanjana Rajan
11e1040a30
remove extra input param
2017-01-31 14:18:13 -08:00
Sanjana Rajan
a902c421eb
add upper level refactorKey function
2017-01-31 14:14:27 -08:00
Sanjana Rajan
9de579a29d
remove extra space, typo
2017-01-30 19:41:43 -08:00
Sanjana Rajan
9d59351007
reformatKey function
2017-01-30 19:38:49 -08:00
Alax Villmann
e526cf0a3b
Generate valid version 3 signatures
2017-01-26 12:49:49 -08:00
David Janes
c223b88829
implement keyExpirationTime
2017-01-24 16:54:52 -05:00
Bart Butler
bc69357ab5
Merge pull request #498 from larshp/master
...
S2K - Only generate what is needed
2017-01-22 23:36:36 -08:00
Alax Villmann
0989015ed2
V3 header generation was concat()-ing non-Uint8 arrays
2017-01-09 10:30:31 -08:00
Sanjana Rajan
d65d629264
trim name
2016-12-15 10:39:29 -08:00
Sanjana Rajan
d058523e9e
clearer syntax
2016-12-15 10:01:50 -08:00
Sanjana Rajan
109f8a5d20
don't allow leading spaces in user id
2016-12-14 12:38:01 -08:00
Lars Hvam
c69a92d694
only generate what is needed
2016-11-20 09:54:00 -05:00
Sanjana Rajan
344294659e
invalidate expired primary keys
2016-10-27 11:50:30 -07:00
Bart Butler
659c6f23d2
Merge pull request #493 from openpgpjs/armored_decrypted_key_fix
...
Reset secret key's encrypted field to null after decryption
2016-10-26 16:58:07 -07:00
Bart Butler
6abf7ffcc0
Fix rare race condition with webworker tasks, fix minified web worker filename default
2016-10-26 16:56:21 -07:00
Sanjana Rajan
8620220cfb
reset encrypted field to null when decrypting secret key
2016-10-26 16:55:49 -07:00
emersion
e9940eb100
Properly set one-pass signture packet flag
2016-08-17 13:03:56 +02:00
Tankred Hase
e3cbaba33a
Be sure to only pop unsupported packet if already pushed
2016-06-08 11:30:53 +02:00
Tankred Hase
490d8e4e90
Bugfix: drop unsupported packets in packetlist.read()
...
add unit test for RSA key with ECC subkey
2016-06-07 18:21:31 +02:00
Tankred Hase
87b4bfefd8
Fix error handling
2016-05-24 17:22:15 +02:00
Tankred Hase
4fd9fd3c7f
Cleanup and document worker.js
2016-05-24 13:12:39 +02:00
Thomas Oberndörfer
9c76df73ff
Merge pull request #446 from openpgpjs/issue/443
...
Implement feature #443
2016-05-03 10:01:48 +02:00
evilaliv3
4e3937f1e2
Replace isDecrypted=false with keys[i].clearPrivateMPIs()
2016-04-28 17:40:14 +02:00
evilaliv3
0d93127186
Simplify code-flow of Key.encrypt
2016-04-28 16:01:33 +02:00
evilaliv3
a5fdc36062
Cleanup API for key.decrypt and align unit tests
2016-04-27 16:06:52 +02:00
evilaliv3
1007637f39
Mark isDecrypted flag when the key is encrypted
2016-04-25 18:35:57 +02:00
evilaliv3
61470ad068
Apply edits as suggested in review of pull #446
2016-04-25 18:35:50 +02:00
Tankred Hase
fd218ef52d
Add comments to preferred algorithms
2016-04-25 13:08:00 +02:00
evilaliv3
afc2c95238
Implement feature #443
2016-04-25 00:54:16 +02:00
Tankred Hase
e3b146b9d9
Fix Keyid.fromId()
2016-04-11 12:11:35 +02:00
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
72c8bf5ea7
Deactivate GCM by default
2016-03-24 20:47:42 +08:00
Tankred Hase
969e39dcf2
Rename useAEAD --> nativeAEAD
2016-03-24 13:49:26 +08:00
Tankred Hase
f4fc274f14
Fix: use worker for CFB w/ webcrypto support
2016-03-24 13:24:18 +08:00
Tankred Hase
c8569e0cd5
Add version attribute to the AEAD packet
2016-03-24 10:53:35 +08:00
Tankred Hase
8b46a117ab
Prefer aes128 over aes192 (no WebCrypto support)
2016-03-24 10:53:30 +08:00
Tankred Hase
979f212305
Cleanup Promise code
2016-03-24 09:29:41 +08:00
Tankred Hase
ddedb5cb42
Cleanup public api
2016-03-23 21:36:48 +08:00
Tankred Hase
1e3d6468d6
Wrap code into promises to globally catch errors
2016-03-23 21:19:02 +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
760bdb8f00
Use only standard window.crypto.subtle in gcm.js
...
There is currently no support for AES-GCM in IE11 and Safari/iOSqq
2016-03-23 17:27:09 +08:00
Tankred Hase
9b2823aa67
Fix unit tests under node
2016-03-23 16:43:40 +08:00
Tankred Hase
963648c6ea
Fix unit tests for browsers
2016-03-23 15:39:51 +08:00
Tankred Hase
e5e76d2eb7
Cleanup gcm.js
2016-03-23 14:32:48 +08:00
Tankred Hase
a225027a6b
Wrap message.sign into a promise in openpgp.encrypt
2016-03-23 13:43:12 +08:00
Tankred Hase
7fabe02e03
Fix GCM under node.js
2016-03-23 13:43:06 +08:00
Tankred Hase
8f8218e9de
Cleanup and test AEAD protected packet
2016-03-22 17:45:19 +08:00
Tankred Hase
8aa15b66a9
Cleanup and unit test gcm.js
2016-03-22 17:45:19 +08:00
Tankred Hase
365a9d2107
Fix link to IEFT draft packet tag in enums.js
2016-03-22 17:45:18 +08:00
Tankred Hase
2e4d8547a0
Fix typo in src/crypto/index.js
2016-03-22 17:45:18 +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
Tankred Hase
b5618fd63d
Remove redundant util.emailRegEx
2016-02-19 11:17:35 +07:00
Tankred Hase
a1ab02adc8
Revert "Point to TLS/HSTS secured .com domain"
...
This reverts commit 177d701f5b
.
2016-02-18 11:38:12 +07:00
Tankred Hase
506e36c9cc
Remove function bind polyfill from worker.js
...
This is no longer required in Phantom.js 2.x
2016-02-18 11:15:59 +07:00
Tankred Hase
177d701f5b
Point to TLS/HSTS secured .com domain
2016-02-15 14:06:31 +07: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
e4b2b8208e
Add jsdoc annotations to openpgp.js
2016-02-13 16:54:43 +07:00
Tankred Hase
24c213d8d9
Add better examples for binary data use. Fix message docs
2016-02-11 17:36:24 +07:00
Tankred Hase
6c954e19c0
Update README.md with v2.x api examples
...
Minor cleanup in public api, fix typos in docs
2016-02-11 13:41:53 +07:00
Tankred Hase
d399cb8c47
Fix public api doc whitespaces
2016-02-10 23:19:13 +07: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
d5a2e0fb81
Delete plaintext sessionKey from packet after calling message.encryptSessionKey
2016-02-10 12:58:12 +07:00
Tankred Hase
25131e0df9
Added unit tests for util.getTransferables
2016-02-10 12:52:13 +07:00
Tankred Hase
6547b4ef68
Test encrypt/decryptSessionKey and finalize api, review docs
2016-02-10 12:52:13 +07:00
Tankred Hase
6ff470a36a
Cleanup worker.js
2016-02-09 20:35:23 +07:00
Tankred Hase
7d97bcec58
Implement openpgp.decryptKey
2016-02-09 19:04:31 +07:00
Tankred Hase
4f6e036a07
Cleanup packet list clonong --> src/packet/clone.js
2016-02-09 19:01:30 +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
89df70cbe0
Cleanup src/openpgp.js
2016-02-09 15:37:13 +07:00
Tankred Hase
206f1f9c0f
Add 'armor' parameter to sign api
2016-02-09 12:57:23 +07:00
Tankred Hase
c0cc0ee991
Use 'armor' param in encrypt api instead of 'packets' to return full message object
2016-02-09 11:32:35 +07:00
Tankred Hase
994b8d2354
Use generic AsyncProxy.delegate for all public apis
2016-02-09 09:15:52 +07:00
Tankred Hase
f5375ef700
Drastically simplify async_proxy with generic delegate function
2016-02-09 08:46:18 +07:00
Tankred Hase
ee07b77320
Fail gracefully when no web worker support on initWorker
2016-02-09 07:52:08 +07:00
Tankred Hase
b1f6266cc8
Write tests for new api: openpgp.encrypt/decrypt
2016-02-08 23:28:54 +07:00
Tankred Hase
a44e1e5024
Write tests for new api: openpgp.generateKey
2016-02-08 19:32:42 +07:00
Tankred Hase
c7a6a88098
Add type validation util functions
2016-02-08 13:36:21 +07:00
Tankred Hase
1405ec8d1c
Return filename for utf8 message
2016-02-08 10:18:37 +07:00
Tankred Hase
f72b4522ad
Rename openpgp api: generateKeyPair --> generateKey
2016-02-07 18:01:10 +07:00
Tankred Hase
735ec3df74
Rename openpgp apis: signCleartext --> sign, verifyCleartext --> verify
2016-02-07 17:36:48 +07:00
Tankred Hase
f3ae671a57
Fix @fileoverview comment in hkp module
2016-02-07 08:15:33 +07:00
Tankred Hase
4aaa1d3184
Update copyright notice due to complete rewrite of src/openpgp.js
2016-02-07 08:08:47 +07:00
Tankred Hase
2ad425294c
Second draft of public api
2016-02-06 22:58:43 +07:00
Tankred Hase
0f8bfe2dca
Rename keys to publicKeys in message.encrypt()
2016-02-06 22:58:43 +07:00
Tankred Hase
31df9c07da
Allow either privateKey, session key or password for message.decrypt()
2016-02-06 22:58:43 +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
2754bfef54
Cleanup public api
2016-02-06 22:58:38 +07:00
Tankred Hase
8777289b77
Cleanup config
2016-02-06 19:11:58 +07:00
Tankred Hase
8d82a18c19
Fix bug in message.decryptSessionKey where it would return this (msg obj)
...
Cleanup message code
2016-02-06 15:03:04 +07:00
Tankred Hase
55110c3409
Remove sessionKeyAlgorithm parameter from message.decrypt()
...
See: 2010456a19 (commitcomment-12397926)
2016-02-06 14:33:10 +07:00
Tankred Hase
c4bc9b2fe0
Use global this in src/worker/worker.js and add to linting
2016-02-06 14:28:05 +07:00
Tankred Hase
d40c3e81d9
Cleanup code of src/packet/literal.js
2016-02-06 14:22:19 +07:00
Tankred Hase
9da63d56b3
Cleanup style inconsistencies in cfb.js and random.js
2016-02-06 13:36:19 +07:00
Tankred Hase
1997e445f9
Use ES6 destructuring and default parameters in public api
2016-02-05 17:23:17 +07:00
Tankred Hase
f87d8d0433
Fix parsing packets from tag in web worker
2016-02-05 15:39:11 +07:00
Tankred Hase
8728db2b08
Finish refactoring src/**/*.js to use import & export
2016-02-05 15:23:11 +07:00
Tankred Hase
70ac662073
Refactor src/packet/*.js to use import & export
2016-02-05 14:44:22 +07:00
Tankred Hase
9ebe31a4ec
Refactor src/worker/*.js to use import and export
2016-02-05 13:20:05 +07:00
Tankred Hase
444128829a
Refactor src/keyring/*.js to use import & export
2016-02-05 13:16:42 +07:00
Tankred Hase
acabca9585
Fix config path in hkp.js
2016-02-05 12:45:45 +07:00
Tankred Hase
1157cd2ac8
Move src/hkp/hkp.js -> src/hkp.js
...
Delete src/hkp/index.js
2016-02-05 12:45:40 +07:00
Tankred Hase
8559cd2bff
Refactor src/encoding/*.js and src/hkp/*.js to use import
2016-02-05 12:40:30 +07:00
Tankred Hase
509d6c67ee
Refactor src/type/*.js to use import
2016-02-05 10:37:15 +07:00
Tankred Hase
dea42df209
Refactor src/crypto/**/*.js to use import & export
2016-02-05 10:36:09 +07:00
Tankred Hase
3aed324d51
Refactor src/crypto/hash/*.js to use import & export
2016-02-05 09:30:24 +07:00
Tankred Hase
19a97bf117
Refactor src/crypto/cipher/*.js to use import & export
2016-02-05 09:09:04 +07:00
Tankred Hase
60b23169ac
Refactor src/config/*.js to use import
2016-02-05 09:09:04 +07:00
Tankred Hase
f06e5aea55
Refactor src/*.js to use import
2016-02-05 09:09:04 +07:00
Tankred Hase
185d575ba3
Refactor src/index.js to re-export ES6 module
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
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
261db8035d
Remove redundant message.symEncrypt/symDecrypt
2016-02-04 16:41:39 +07:00
Tankred Hase
c840fabc7d
Further cleanup of hash module
2016-02-04 16:41:39 +07:00
Tankred Hase
d67efe22eb
Only log errors when config.debug is true
2016-02-04 16:41:38 +07:00
Tankred Hase
316a37a1cd
Cleanup hash index.js
2016-02-04 16:41:38 +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
b8f353abe8
Include rusha via npm
2016-02-04 10:05:19 +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
2f74acc94f
Cleanup src/crypto/index.js
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
00ea3918c5
Cleanup and linting on all *.js
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
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
4c82568fad
hash performance fix
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
1c6e777a3d
bugfixes
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
b310877c7d
fixes
2016-02-03 20:24:54 +07:00
Bart Butler
11a8a99aef
add filename to return object when decrypting binary file
2016-02-03 20:24:54 +07:00
Bart Butler
60fb6ba18d
direct session key manipulation and encryption/decryption
2016-02-03 20:24:54 +07:00
Bart Butler
91d35ff99c
initial modifications
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
Tankred Hase
f240feac4b
Always polyfill ES6 Promises
...
Go back to v1.0.0 for Promise polyfill
Add node v5.x to travis build
2016-01-30 16:02:59 +07:00
Tankred Hase
dec7881f93
Don't inject fetch polyfill in hkp module anymore
2016-01-29 20:03:11 +07:00
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
Thomas Oberndörfer
a968f60f0b
Keyring: support plain email addresses (without name) as user IDs.
2016-01-07 15:35:47 +01:00
Nick Doiron
ef566b6a3c
Specify a filename in encrypt fromBinary [ Closes #284 ]
2016-01-07 15:35:47 +01:00
Thomas Oberndörfer
6f8a3abdfa
Support multiple user IDs for key generation
2016-01-07 15:35:47 +01:00
Matthew Shaylor
37ce176d42
If you attempt to store an empty keylist then delete the storage key
2016-01-07 15:35:47 +01:00
Artem Chudinov
068d38d832
Use RegExp.prototype.test instead of String.prototype.match where it is OK
...
There is no sense in using String.prototype.match if the retrieved matched results
are not used.
By the way, if a bit of performance (especially RAM usage) is preferred over
unification, then, obviously, conditions like
if (/SIGNED MESSAGE/.test(header[1])) {
can be changed to
if (header[1].indexOf('SIGNED MESSAGE') !== -1) {
2016-01-07 15:35:47 +01:00
Artem Chudinov
30926e4738
message.js: Don't use variable signingKeyPacket
out of scope
2016-01-07 15:35:47 +01: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
Tankred Hase
85efb463cf
Check http status when uploading key
2015-12-27 16:27:55 +07:00
Tankred Hase
450fddaf8e
Call encodeURIComponent on hkp query parameters
2015-12-19 15:23:00 +07:00
Tankred Hase
bcde9bfa1a
Add HKP lookup example to README
2015-12-12 10:39:38 +07:00
Tankred Hase
6634abf326
Add basic HKP lookup and upload support
2015-12-11 13:12:34 +07:00
Thomas Oberndörfer
668a9bbe70
Throw exception on unsupported S2K type.
2015-10-03 15:57:03 +02:00
Artem Chudinov
9de55b49f3
s2k.js,async_proxy.js: Initialize variable data
properly
...
It fixes error when running the example code (in Node.js with enforced strict
mode) from README.md:
[ReferenceError: data is not defined]
Error: Error generating keypair using js fallback!
at /tmp/fff/node_modules/openpgp/src/openpgp.js:266:13
at process._tickDomainCallback (node.js:399:9)
2015-08-19 22:32:06 +05: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
Tankred Hase
a12d2ee27e
Merge pull request #296 from bartbutler/ie11_keygen
...
Support for crypto API keygen in IE11 on Windows 7 and 8
2015-06-09 15:43:40 +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
Tankred Hase
4d6a34faa1
Implement Symmetric-Key Message Encryption using a passphrase
...
See https://tools.ietf.org/html/rfc4880#section-3.7.2.2
2015-04-22 01:41:00 +02:00
Thomas Oberndörfer
be6ae2c464
Escape email before using as regular expression in emailCheck method.
2015-03-05 13:32:44 +01:00
Tankred Hase
fca5f7de2b
Merge pull request #298 from mailvelope/sig_verify_sub_bind_check
...
Check validity of key packet before signature verification
2015-03-04 07:17:51 +01:00
Thomas Oberndörfer
a33b8c035d
Check validity of key packet before signature verification
2015-03-03 18:15:17 +01: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
d25c90bff1
Fix AsyncProxy tests
2015-02-11 14:20:42 +01:00
Tankred Hase
da3dbf7acc
Set config in AsyncProxy
2015-02-11 14:01:08 +01:00
Sergey Ratiashvili
c9e019d20e
fix worker instance misconfiguration
2015-02-11 13:08:13 +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
Tankred Hase
06b66d7f62
Merge pull request #274 from mailvelope/get-worker
...
Add getter method for worker to high level API. Initialization options for AsyncProxy: path and worker.
2015-02-11 11:05:36 +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
Thomas Oberndörfer
712f807e50
Restore path parameter of initWorker method
2015-01-24 14:44:06 +01:00
Thomas Oberndörfer
a642640cf1
Keyring: use regex for email check. Fix exception if userid does not contain an email address.
2014-12-18 16:28:38 +01:00
Thomas Oberndörfer
de0a6d1259
Helper method: get Keyid object from hex keyid.
2014-12-15 14:34:02 +01:00
Thomas Oberndörfer
c9b4f7532e
Add getter method for worker to high level API. Initialization options for AsyncProxy: path and worker.
2014-12-15 14:33:13 +01:00
Thomas Oberndörfer
eb7f854afe
Add useWebCrypto to config and set to true
2014-12-15 14:30:22 +01:00
Tankred Hase
f79ce008b7
Merge pull request #268 from bantu/typo-unknow
...
Typo: Unknow -> Unknown
2014-12-09 16:35:49 +01: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
Andreas Fischer
b00ce34e90
Typo: Unknow -> Unknown
2014-11-17 12:31:04 +01:00
Christian Zangl
8d08d0bd1a
fix symkey version
2014-11-12 16:47:32 +01:00
Tankred Hase
eedb722d7b
Fall back to js crypto in case native RSA keygen fails
2014-10-29 18:17:03 +01:00
Tankred Hase
d38fc07578
Fix promise documentation
2014-10-28 10:46:49 +01:00
Tankred Hase
2a01399cb3
Update documentation to make returned promises clearer
2014-10-28 10:38:11 +01:00
Tankred Hase
f4682599be
Return correct promise in error case
2014-10-20 18:30:26 +02: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
e3b6903eb1
Use global error catch
2014-10-20 16:10:09 +02:00
Tankred Hase
39e1e145e4
Add es6-promise polyfill to build step so users don't have to.
2014-10-02 10:55:27 +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
bf1cb6d521
Add high level error messages to public api.
2014-10-01 22:20:28 +02:00
Tankred Hase
bdbd7819f4
Fix phantom.js web worker tests that use promises
2014-10-01 21:55:50 +02:00
Tankred Hase
f08fc0a4f7
Refactor web worker async proxy to use promises.
2014-10-01 21:18:05 +02:00
Tankred Hase
7f2573c77d
Refactor complete public api to use promises
2014-10-01 19:12:39 +02:00
Tankred Hase
0ac58356b5
Refactor keygen to use promises (Work in progress)
2014-10-01 13:13:09 +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
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
069b97d16f
Fix sorting of primary users
2014-09-03 14:38:31 +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
e885fb1433
Use same signature array structure in verify for ClearSignedMessages as Message
2014-07-07 12:02:13 +02:00
Tankred Hase
de3ba18400
Implement content verification using detached signatures
2014-07-03 14:57:52 +02:00
Tankred Hase
396199f631
Iterate over signature not keys to allow empty signatures array in case the message has no signatures.
2014-07-02 12:52:14 +02:00
Tankred Hase
8c93688b0e
Warn user with signature null for wrong public key instead of exception.
2014-07-01 16:22:09 +02:00
Tankred Hase
62debad52d
Allow removal of passphrase protection by calling encrypt with an empty passphrase
2014-07-01 15:02:09 +02:00
Tankred Hase
ecb6798441
Throw an error if a wrong public key is used to verify a signature.
2014-06-30 19:26:33 +02:00
Tankred Hase
68a5739354
Merge pull request #232 from msjoinder/single_public_key
...
API accepts a single public key or an array
2014-06-28 16:44:32 +02:00
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
Robert Nelson
57c98386f9
Add node.js support
2014-01-08 09:01:15 -08:00
Robert Nelson
82fbc0ffa7
Merge branch 'pr/144'
2014-01-06 19:50:08 +01:00
Robert Nelson
f436c85482
Add a bunch of links to documentation
2014-01-05 23:10:19 -08:00
Robert Nelson
0c6b345ba8
Refactor classes
2014-01-05 10:13:25 -08:00
Tankred Hase
06e4b83943
fix tests
2014-01-03 21:53:41 +01:00
Tankred Hase
3d67721fb5
remove old files
2014-01-03 20:40:05 +01:00
Tankred Hase
deb64215c8
Merge remote-tracking branch 'origin/devel'
2014-01-03 19:26:40 +01:00
Robert Nelson
31b5427c87
Merge branch 'devel' into lint-fixes
2014-01-03 10:11:36 -08:00
Tankred Hase
1cec81d576
merged devel into master
2014-01-03 18:48:27 +01:00
Robert Nelson
3d4dfaea87
Add function names to constructors
2014-01-02 12:50:48 -08:00
Robert Nelson
dba6f379e8
Fix all the lint noise, mostly semicolons, duplicate var definitions and ==0
2014-01-02 12:24:10 -08:00
Robert Nelson
17ad1f5fed
More documentation fixes
2013-12-26 22:49:37 -08:00
Robert Nelson
40a5af2aae
Fixup more documentation links
2013-12-22 23:44:41 -08:00
Robert Nelson
e891d81e17
Merge upstream/devel changes
2013-12-22 13:01:24 -08:00
Robert Nelson
8923813580
Fix jsdoc generation and make keyring multiple instance.
...
Add jsdoc @module definitions.
Fix references to old class names.
Make keyring a multiple instance module.
Eliminate unit test dependency on running npm test.
2013-12-22 12:39:11 -08:00
Thomas Oberndörfer
b27b01905b
Refactoring Key class to use structured data. Transform key from-to packetlist.
...
Add User and SubKey class. Verification methods for key components.
2013-12-20 18:19:11 +01:00
Thomas Oberndörfer
1ca90a980c
Support multiple keys per ASCII armored block. Unify error handling: replace print_error function
...
with exceptions. The idea is to use exceptions internally, but catch them in the high level API
functions and return errors as implemented in openpgp.key.readArmored.
2013-12-17 16:09:52 +01:00
Thomas Oberndörfer
a31fe80a2c
Merge readPublicKey for V3 and V4
2013-12-12 16:17:01 +01:00
Thomas Oberndörfer
d7d74ec5e3
Verify V3 certification signatures
2013-12-12 14:22:23 +01:00
Thomas Oberndörfer
ff8d93f956
Fix key expiration time. Add key revocation unit test.
2013-12-12 12:05:00 +01:00
Thomas Oberndörfer
d22facc61c
Remove CP-1252 cleartext signature unit-test
2013-12-09 19:33:30 +01:00
Thomas Oberndörfer
5fd4bdbccb
Fix make bundle-test and keyring unit-tests
2013-12-09 16:57:44 +01:00
Robert Nelson
1c07c482aa
Create a bundle for keyring and split out the store code
2013-12-08 20:54:25 -08:00
Robert Nelson
f00d3210aa
Convert keyring to use key interface rather than the packetlist.
2013-12-08 19:35:01 -08:00
Robert Nelson
bfba0eca0c
Changed unitttests and keyring to use bundled openpgp and updated keyring to use openpgp.key instead of packetlists.
...
Added getUserIds() to key.
Reenabled keyring ci tests.
2013-12-08 15:41:31 -08:00
Thomas Oberndörfer
5d32718096
Normalize end of line, add getter and setter for text in literal data packet.
2013-12-08 14:24:52 +01:00
Robert Nelson
5f30c67499
All signature unit tests passing now
2013-12-06 14:26:11 -08:00
Robert Nelson
f57de1ec40
Unit tests passing
2013-12-06 09:56:05 -08:00
Robert Nelson
03d0d44061
Signature fixes
2013-12-05 22:31:33 -08:00
Robert Nelson
e6a116d14e
Fix warnings from 'make minify' + other bugs
2013-12-05 20:12:20 -08:00
Robert Nelson
f0c2427895
Array indexing on strings is nonstandard and doesn't work on IE
2013-12-05 20:03:08 -08:00
Robert Nelson
f07702e867
More consistency changes
2013-12-05 12:29:52 -08:00
Robert Nelson
e965b6771b
Cleanup canonical message handling for signatures
2013-12-05 12:21:23 -08:00
Tankred Hase
8c16abbfee
bugfix for only call showMessage if it was defined
2013-12-05 12:37:55 +01:00
Tankred Hase
fecad8b8c0
only call showMessage if it was defined
2013-12-05 12:33:03 +01:00
Robert Nelson
8110782633
Fix checksum failure debug message
2013-12-04 15:42:56 -08:00
Thomas Oberndörfer
f6176ed484
Move key generation to Key class
2013-12-04 16:45:14 +01:00
Thomas Oberndörfer
7e711510cc
Implement cleartext signed messages
2013-12-02 20:11:21 +01:00
Thomas Oberndörfer
be96de5188
Move methods of Key and Message class to prototype. Clean up openpgp.js file.
2013-12-02 14:54:05 +01:00
Thomas Oberndörfer
89eb5dff2a
Rename attribute for data of armored message from .openpgp to .data
2013-12-02 11:27:14 +01:00
Robert Nelson
63db9246c6
Enhance debugging output and fix escaped dashes.
2013-12-01 17:46:56 -08:00
Robert Nelson
e1908496c7
Add verification for version 3 signatures
2013-11-30 22:29:28 -08:00
Robert Nelson
84f6483cba
Fix signing with version 3 keys
2013-11-30 21:17:04 -08:00
Robert Nelson
1f4911450b
Resolve two more situations
...
Handle messages with strings of dashes.
Work around IE bug with split().
2013-11-30 12:29:47 -08:00
Thomas Oberndörfer
c2a79368dc
Add verify method to message class and other improvements. Implement openpgp.decryptAndVerifyMessage. Allow parsing of unhashed signature subpackets.
2013-11-30 17:29:20 +01:00