Ilya Chesnokov
45c2e67624
Use native Node crypto for RSA encryption ( #1006 )
2019-11-26 16:06:49 +01:00
Ilya Chesnokov
6e7f399eb3
Use Web Crypto & Node crypto for RSA signing and verifying ( #999 )
...
Also, when generating RSA keys in JS, generate them with p < q, as per
the spec.
Also, when generating RSA keys using Web Crypto or Node crypto, swap the
generated p and q around, so that will satisfy p < q in most browsers
(but not old Microsoft Edge, 50% of the time) and so that we can use the
generated u coefficient (p^-1 mod q in OpenPGP, q^-1 mod p in RFC3447).
Then, when signing and verifying, swap p and q again, so that the key
hopefully satisfies Safari's requirement that p > q, and so that we can
keep using u again.
2019-11-18 14:59:01 +01:00
Tom J
3be779e0a1
Fix comment describing RSA coefficient u ( #937 )
2019-08-07 17:39:57 +02:00
chesnokovilya
1bd5689d75
Implement ECDH using Web Crypto for supported (NIST) curves ( #914 )
2019-06-27 19:21:32 +02:00
Daniel Huigens
e637e75891
Clean up ECDH API
2019-05-02 12:08:08 +02:00
Daniel Huigens
1dd168e7a2
Fix ECDH message encryption for some session keys
2019-02-05 13:46:59 +01:00
Daniel Huigens
3f1734ae7a
Move CFB optimizations into cfb.js
...
So that uses of CFB other than sym_encrypted_integrity_protected.js
can benefit from them.
Also, implement CFB resync mode in terms of normal CFB rather than
separately (and duplicated).
2019-01-02 15:12:53 +01:00
Sanjana Rajan
836ad2805a
Revert "Web Crypto CFB encryption"
2018-12-23 18:42:24 +01:00
Daniel Huigens
668264aa9a
Move CFB optimizations into cfb.js
...
So that uses of CFB other than sym_encrypted_integrity_protected.js
can benefit from them.
Also, implement CFB resync mode in terms of normal CFB rather than
separately (and duplicated).
2018-12-20 17:50:01 -05:00
Daniel Huigens
4afaae13ca
Remove unused variables
2018-05-03 13:07:52 +02:00
Mahrud Sayrafi
a5e7562066
Many documentation improvements; more to come
2018-03-08 19:27:57 -08:00
Mahrud Sayrafi
08da24de27
documentation fixes
2018-03-08 10:55:58 -08:00
Mahrud Sayrafi
2e95335825
millerRabin set to 40 iterations; doc fixes
2018-02-25 09:30:19 -05: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
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
BafS
b672f1936a
Use let and const ES6 features.
...
Remove var, for let or const if possible, clean some syntax, enforce one var per declaration and semicolons
2018-02-13 23:33:09 +01:00
BafS
de6ffc2f76
Remove 'user strict'
...
'use strict' is unnecessary inside modules because module code is always strict mode code. Ref: https://www.ecma-international.org/ecma-262/6.0/#sec-strict-mode-code
2018-02-13 23:33:09 +01:00
Mahrud Sayrafi
d851398b0c
Merge branch 'master' into http-to-https
2018-02-08 10:56:46 -08:00
Mahrud Sayrafi
b2e39ccaf9
Documentation and cleanups
2018-02-07 03:25:28 -08: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
Mahrud Sayrafi
a4134b9f55
Addresses various review comments by @bartbutler + some cleanups
2018-01-31 17:52:38 -08:00
Sanjana Rajan
3ce6309788
cleanup
2018-01-30 18:36:26 +01:00
Mahrud Sayrafi
35f18444b0
keygen and sign/verify with ed25519 works
2018-01-30 18:34:54 +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
11a2d0070b
ESLint is happy!
2018-01-30 18:31:30 +01:00
Sanjana Rajan
8794446a66
change some variable names, add some curve parameters
2018-01-30 18:30:17 +01:00
Sanjana Rajan
f8bfde7447
comments, docs
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
3b8cea67a2
some style fixes, update tests
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
673151ec87
Read and write ECDSA packets
2018-01-30 18:30:14 +01:00
Tankred Hase
dea42df209
Refactor src/crypto/**/*.js to use import & export
2016-02-05 10:36:09 +07:00
Tankred Hase
90a7457b71
Refactor most src files to strict mode, delint
2016-02-04 00:37:00 +07:00
Bart Butler
b4916e29a3
binary strings to typed arrays in most places
2016-02-03 20:24:54 +07: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
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
Robert Nelson
f436c85482
Add a bunch of links to documentation
2014-01-05 23:10:19 -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