Daniel Huigens
e959602a94
Switch packages installed from git to @openpgp scope
2021-02-28 21:45:21 +01:00
Daniel Huigens
9e85f75519
Don't mark async function as returning a Promise explicitly
...
It seems redundant.
2021-02-28 01:47:48 +01:00
Daniel Huigens
21e3ba4653
Clean up JSDocs
2021-02-28 00:32:02 +01:00
Daniel Huigens
636c7cf529
Update documentation
2021-02-27 01:22:13 +01:00
Daniel Huigens
2382482090
[v5] Unexport openpgp.util, openpgp.crypto, and low-level types ( #1175 )
2021-02-09 19:25:20 +01:00
Dan Ristea
331a0c27a9
Store named signature parameters ( #1158 )
...
Also, remove the now-unnecessary MPI type.
2021-02-09 19:25:20 +01:00
Daniel Huigens
b3e08fdc26
Don't export default objects / namespaces
...
Import individual functions, instead.
2021-02-09 19:25:20 +01:00
larabr
3a75eadaa0
Store named key params in key objects ( #1141 )
...
- Store private and public params separately and by name in objects,
instead of as an array
- Do not keep params in MPI form, but convert them to Uint8Arrays when
generating/parsing the key
- Modify low-level crypto functions to always accept and return
Uint8Arrays instead of BigIntegers
- Move PKCS1 padding to lower level functions
2021-02-09 19:25:20 +01:00
larabr
8854b097b4
Use native BigInt when available instead of bn.js ( #1119 )
...
In the lightweight build, lazily load bn.js only when necessary.
Also, use Uint8Arrays instead of strings in PKCS1 padding functions, and
check that the leading zero is present when decoding EME-PKCS1 padding.
2021-02-09 19:25:20 +01:00
Ilya Chesnokov
e16807505f
Switch util function names to camelCase ( #1091 )
2021-02-09 19:25:20 +01:00
larabr
00c5f38689
Cipher-specific key validation ( #1116 )
...
Also, check binding signatures for decryption keys.
Also, do not always fallback on Web Crypto ECC errors.
2020-07-13 19:57:33 +02:00
larabr
35b0012f2f
Pass around KDF params as object ( #1104 )
2020-06-03 14:16:54 +02:00
Daniel Huigens
563b397391
Don't mask curve25519 private key twice
...
Also, fix handling of private keys with leading zeros for certain
curves.
2019-10-25 17:32:43 +02:00
Ilya Chesnokov
08b7725b8c
Create lightweight build that can lazily load indutny/elliptic if needed ( #956 )
...
This PR adds four config options to configure whether and how to load
indutny/elliptic: use_indutny_elliptic, external_indutny_elliptic,
indutny_elliptic_path and indutny_elliptic_fetch_options.
Also:
- Use tweetnacl.js instead of indutny/elliptic for curve25519 key generation
- Don't initialize indutny's curve25519, improving performance when using that curve
- Verify NIST signatures using Web Crypto instead of indutny/elliptic when not streaming
- Move KeyPair.sign/verify to ecdsa.js
- Move KeyPair.derive to ecdh.js
- Move keyFromPrivate and keyFromPublic to a new indutnyKey.js file
2019-10-25 16:07:57 +02:00
Ilya Chesnokov
5d9629d6a3
Style fixes; add spaces around all infix operators, remove new Buffer ( #954 )
...
* Add "space-infix-ops": "error" rule
* Remove deprecated Buffer constructor
* Resolve new-cap eslint rule
* @twiss: Clarify code that selects curve and algorithm
2019-08-30 12:27:30 +02:00
Ilya Chesnokov
70cf2d60ff
Implement ECDH using Node crypto ( #921 )
2019-07-09 20:45:28 +02:00
chesnokovilya
1bd5689d75
Implement ECDH using Web Crypto for supported (NIST) curves ( #914 )
2019-06-27 19:21:32 +02:00
Daniel Huigens
ffa8344809
Only include tweetnacl functions we need
2019-05-02 12:08:08 +02:00
Daniel Huigens
e637e75891
Clean up ECDH API
2019-05-02 12:08:08 +02:00
Daniel Huigens
ca0322bbea
Use tweetnacl's X25519 implementation
2019-05-02 12:08:08 +02:00
Daniel Huigens
a9599fea42
Work around go crypto bug in ECDH messages ( #869 )
2019-03-04 13:53:19 +01:00
Daniel Huigens
1dd168e7a2
Fix ECDH message encryption for some session keys
2019-02-05 13:46:59 +01:00
wussler
6b19af0a63
new BN, fix doc
2019-01-22 16:50:06 +01:00
wussler
2975e49dd0
genPublicEphemeralKey to return Uint8Array
2019-01-22 16:24:55 +01:00
wussler
6d9160dd87
Fix mistake in documentation
2019-01-22 16:22:05 +01:00
Aron Wussler
1face482ba
Naming
2019-01-21 15:35:45 +01:00
Aron Wussler
4c809a4846
Fix to returns
2019-01-21 14:57:02 +01:00
Daniel Huigens
31f72fb64d
Update src/crypto/public_key/elliptic/ecdh.js
...
Co-Authored-By: wussler <aron@wussler.it>
2019-01-18 16:40:31 +01:00
Daniel Huigens
680aa03bcd
Update src/crypto/public_key/elliptic/ecdh.js
...
Co-Authored-By: wussler <aron@wussler.it>
2019-01-18 16:40:22 +01:00
Daniel Huigens
f77ebc7605
Update src/crypto/public_key/elliptic/ecdh.js
...
Co-Authored-By: wussler <aron@wussler.it>
2019-01-18 16:40:13 +01:00
Aron Wussler
06952b4e30
Make ephemeral secret available from ECDH module
2019-01-18 16:06:57 +01:00
Daniel Huigens
abce79b509
Use Web Crypto for hashing
2018-11-01 14:11:22 +01:00
Daniel Huigens
e055d86062
Update documentation
2018-08-14 17:50:26 +02:00
Daniel Huigens
4afaae13ca
Remove unused variables
2018-05-03 13:07:52 +02:00
Daniel Huigens
310d8dd9b9
Fix V5 key fingerprint in ECDH parameters
2018-04-30 15:55:36 +02:00
Mahrud Sayrafi
96c9cd0d73
Fixes dead links in the documentation
2018-03-13 00:13:04 -07:00
Mahrud Sayrafi
08da24de27
documentation fixes
2018-03-08 10:55:58 -08:00
Mahrud Sayrafi
9e1236c04c
Modernizes util.js
2018-02-28 15:49:41 -08:00
Mahrud Sayrafi
7eef65926a
Simplifies elliptic/curve.js
2018-02-28 00:58:50 -08:00
Mahrud Sayrafi
3df0997f4d
Cleanups
2018-02-26 20:01:01 -05: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
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
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
3370eaa2aa
Expands truncated little-endian parameters in EdDSA
2018-02-02 05:42:54 -08:00
Sanjana Rajan
3ce6309788
cleanup
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
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