OpenPGP.js
-OpenPGP.js is a JavaScript implementation of the OpenPGP protocol. It implements RFC4880 and parts of RFC4880bis .
+OpenPGP.js is a JavaScript implementation of the OpenPGP protocol. It implements the crypto-refresh (superseding RFC4880 and RFC4880bis ).
Table of Contents
OpenPGP.js
@@ -85,24 +85,24 @@
-The dist/openpgp.min.js bundle works well with recent versions of Chrome, Firefox, Safari and Edge.
+The dist/openpgp.min.js (or .mjs) bundle works with recent versions of Chrome, Firefox, Edge and Safari 13+.
-The dist/node/openpgp.min.js bundle works well in Node.js. It is used by default when you require('openpgp') in Node.js.
+The dist/node/openpgp.min.mjs (or .cjs) bundle works in Node.js v16+: it is used by default when you import ... from 'openpgp' (resp. require('openpgp')).
-Currently, Chrome, Safari and Edge have partial implementations of the
-Streams specification , and Firefox
-has a partial implementation behind feature flags. Chrome is the only
-browser that implements TransformStreams, which we need, so we include
-a polyfill for
-all other browsers. Please note that in those browsers, the global
-ReadableStream property gets overwritten with the polyfill version if
-it exists. In some edge cases, you might need to use the native
+
Streaming support: the latest versions of Chrome, Firefox, Edge and Safari implement the
+Streams specification , including TransformStreams.
+These are needed if you use the library with streamed inputs.
+In previous versions of OpenPGP.js, WebStreams were automatically polyfilled by the library,
+but from v6 this task is left up to the library user, due to the more extensive browser support, and the
+polyfilling side-effects. If you're working with older browsers versions which do not implement e.g. TransformStreams , you can manually
+load WebStream polyfill .
+Please note that when you load the polyfills, the global ReadableStream property (if it exists) gets overwritten with the polyfill version.
+In some edge cases, you might need to use the native
ReadableStream (for example when using it to create a Response
object), in which case you should store a reference to it before loading
-OpenPGP.js. There is also the
-web-streams-adapter
+the polyfills. There is also the web-streams-adapter
library to convert back and forth between them.
@@ -201,21 +201,19 @@ library to convert back and forth between them.
*** these curves are only constant-time if the underlying native implementation is available and constant-time
-Version 2.x of the library has been built from the ground up with Uint8Arrays. This allows for much better performance and memory usage than strings.
-
-
If the user's browser supports native WebCrypto via the window.crypto.subtle API, this will be used. Under Node.js the native crypto module is used.
-The library implements the IETF proposal for authenticated encryption using native AES-EAX, OCB, or GCM. This makes symmetric encryption up to 30x faster on supported platforms. Since the specification has not been finalized and other OpenPGP implementations haven't adopted it yet, the feature is currently behind a flag. Note: activating this setting can break compatibility with other OpenPGP implementations, and also with future versions of OpenPGP.js. Don't use it with messages you want to store on disk or in a database. You can enable it by setting openpgp.config.aeadProtect = true.
+The library implements authenticated encryption (AEAD) as per the "crypto refresh" draft standard using AES-OCB, EAX, or GCM. This makes symmetric encryption faster on platforms with native implementations. However, since the specification is very recent and other OpenPGP implementations are in the process of adopting it, the feature is currently behind a flag. Note: activating this setting can break compatibility with other OpenPGP implementations which have yet to implement the feature. You can enable it by setting openpgp.config.aeadProtect = true.
+Note that this setting has a different effect from the one in OpenPGP.js v5, which implemented support for a provisional version of AEAD from RFC4880bis , which was modified in a later draft of the crypto refresh.
You can change the AEAD mode by setting one of the following options:
-openpgp.config.preferredAEADAlgorithm = openpgp.enums.aead.eax // Default, native
-openpgp.config.preferredAEADAlgorithm = openpgp.enums.aead.ocb // Non-native
-openpgp.config.preferredAEADAlgorithm = openpgp.enums.aead.experimentalGCM // **Non-standard**, fastest
+openpgp.config.preferredAEADAlgorithm = openpgp.enums.aead.ocb; // Default (widest ecosystem support), non-native
+openpgp.config.preferredAEADAlgorithm = openpgp.enums.aead.gcm; // Native in WebCrypto and Node.js
+openpgp.config.preferredAEADAlgorithm = openpgp.enums.aead.eax; // Native in Node.js
-For environments that don't provide native crypto, the library falls back to asm.js implementations of AES, SHA-1, and SHA-256.
+For environments that don't provide native crypto, the library falls back to asm.js AES and AEAD implementations.
Getting started
@@ -223,12 +221,12 @@ openpgp.config.preferredAEADAlgorithm = openpgp.enums.aead.experimentalGCM // **
Install OpenPGP.js using npm and save it in your dependencies:
npm install --save openpgp
-And import it as a CommonJS module:
-const openpgp = require('openpgp');
-
-Or as an ES6 module, from an .mjs file:
+And import it as an ES module, from a .mjs file:
import * as openpgp from 'openpgp';
+Or as a CommonJS module:
+const openpgp = require('openpgp');
+
Deno (experimental)
Import as an ES6 module, using /dist/openpgp.mjs.
import * as openpgp from './openpgpjs/dist/openpgp.mjs';
@@ -708,13 +706,13 @@ and a subkey for encryption using Curve25519.
- Functions Modules Classes
+ Functions Modules Classes
diff --git a/docs/module-config.html b/docs/module-config.html
index 51fef1bb..315e5010 100644
--- a/docs/module-config.html
+++ b/docs/module-config.html
@@ -89,7 +89,7 @@
Source:
@@ -247,7 +247,7 @@ as a global config setting, but can be used for specific function calls (e.g. de
Source:
@@ -365,7 +365,7 @@ Must be an integer value from 0 to 56.
Source:
@@ -390,8 +390,14 @@ Must be an integer value from 0 to 56.
Use Authenticated Encryption with Additional Data (AEAD) protection for symmetric encryption.
-Note: not all OpenPGP implementations are compatible with this option.
-FUTURE OPENPGP.JS VERSIONS MAY BREAK COMPATIBILITY WHEN USING THIS OPTION
+This option is applicable to:
+
+key generation (encryption key preferences),
+password-based message encryption, and
+private key encryption.
+In the case of message encryption using public keys, the encryption key preferences are respected instead.
+Note: not all OpenPGP implementations are compatible with this option.
+
@@ -483,7 +489,7 @@ Note: not all OpenPGP implementations are compatible with this option.
Source:
@@ -493,7 +499,7 @@ Note: not all OpenPGP implementations are compatible with this option.
See:
@@ -608,7 +614,7 @@ where key flags were ignored when selecting a key for encryption.
Source:
@@ -727,7 +733,7 @@ and have self-signature's creation date that does not match the primary key crea
Source:
@@ -848,7 +854,7 @@ This is an insecure setting:
Source:
@@ -875,7 +881,13 @@ This is an insecure setting:
Allow streaming unauthenticated data before its integrity has been checked. This would allow the application to
process large streams while limiting memory usage by releasing the decrypted chunks as soon as possible
and deferring checking their integrity until the decrypted stream has been read in full.
-This setting is insecure if the partially decrypted message is processed further or displayed to the user.
+This setting is insecure if the encrypted data has been corrupted by a malicious entity:
+
+if the partially decrypted message is processed further or displayed to the user, it opens up the possibility of attacks such as EFAIL
+(see https://efail.de/).
+an attacker with access to traces or timing info of internal processing errors could learn some info about the data.
+
+NB: this setting does not apply to AEAD-encrypted data, where the AEAD data chunk is never released until integrity is confirmed.
@@ -967,119 +979,7 @@ and deferring checking their integrity until the decrypted stream has been read
Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-(static) checksumRequired
-
-
-
-
-
-
-
-
-
-
- Properties:
-
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- checksumRequired
-
-
-
-
-
-Boolean
-
-
-
-
-
-
-
-
-
- Do not throw error when armor is missing a checksum
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Source:
-
@@ -1191,7 +1091,7 @@ and deferring checking their integrity until the decrypted stream has been read
Source:
@@ -1313,7 +1213,7 @@ See also constantTimePKCS1DecryptionSupportedSymmetricAlgorithms.
Source:
@@ -1431,7 +1331,7 @@ However, the more algorithms are added, the slower the decryption procedure beco
Source:
@@ -1543,7 +1443,7 @@ However, the more algorithms are added, the slower the decryption procedure beco
Source:
@@ -1655,7 +1555,7 @@ However, the more algorithms are added, the slower the decryption procedure beco
Source:
@@ -1767,7 +1667,7 @@ However, the more algorithms are added, the slower the decryption procedure beco
Source:
@@ -1884,7 +1784,7 @@ validation error when the notation is marked as critical.
Source:
@@ -2000,119 +1900,7 @@ validation error when the notation is marked as critical.
Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-(static) minBytesForWebCrypto
-
-
-
-
-
-
-
-
-
-
- Properties:
-
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- minBytesForWebCrypto
-
-
-
-
-
-Integer
-
-
-
-
-
-
-
-
-
- The minimum amount of bytes for which to use native WebCrypto APIs when available
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Source:
-
@@ -2229,7 +2017,7 @@ The default is 2047 since due to a bug, previous versions of OpenPGP.js could ge
Source:
@@ -2346,7 +2134,7 @@ The default is 2047 since due to a bug, previous versions of OpenPGP.js could ge
Source:
@@ -2463,7 +2251,7 @@ Only has an effect when aeadProtect is set to true.
Source:
@@ -2575,7 +2363,7 @@ Only has an effect when aeadProtect is set to true.
Source:
@@ -2687,7 +2475,7 @@ Only has an effect when aeadProtect is set to true.
Source:
@@ -2799,7 +2587,7 @@ Only has an effect when aeadProtect is set to true.
Source:
@@ -2915,7 +2703,7 @@ Only has an effect when aeadProtect is set to true.
Source:
@@ -3031,7 +2819,7 @@ Only has an effect when aeadProtect is set to true.
Source:
@@ -3147,7 +2935,7 @@ Only has an effect when aeadProtect is set to true.
Source:
@@ -3263,7 +3051,7 @@ Only has an effect when aeadProtect is set to true.
Source:
@@ -3375,7 +3163,222 @@ Only has an effect when aeadProtect is set to true.
Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+(static) s2kArgon2Params
+
+
+
+
+
+
draft-crypto-refresh 3.7.1.4 :
+Argon2 parameters for S2K (String to Key).
+Only relevant if config.s2kType is set to enums.s2k.argon2.
+Default settings correspond to the second recommendation from RFC9106 ("uniformly safe option"),
+to ensure compatibility with memory-constrained environments.
+For more details on the choice of parameters, see https://tools.ietf.org/html/rfc9106#section-4.
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+ Properties
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ passes
+
+
+
+
+
+Integer
+
+
+
+
+
+
+
+
+
+ number of iterations t
+
+
+
+
+
+
+ parallelism
+
+
+
+
+
+Integer
+
+
+
+
+
+
+
+
+
+ degree of parallelism p
+
+
+
+
+
+
+ memoryExponent
+
+
+
+
+
+Integer
+
+
+
+
+
+
+
+
+
+ one-octet exponent indicating the memory size, which will be: 2**memoryExponent kibibytes.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
@@ -3399,8 +3402,10 @@ Only has an effect when aeadProtect is set to true.
-
RFC4880 3.7.1.3 :
-Iteration Count Byte for S2K (String to Key)
+
RFC4880 3.7.1.3 :
+Iteration Count Byte for Iterated and Salted S2K (String to Key).
+Only relevant if config.s2kType is set to enums.s2k.iterated.
+Note: this is the exponent value, not the final number of iterations (refer to specs for more details).
@@ -3492,7 +3497,129 @@ Iteration Count Byte for S2K (String to Key)
Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+(static) s2kType
+
+
+
+
+
+
S2K (String to Key) type, used for key derivation in the context of secret key encryption
+and password-encrypted data. Weaker s2k options are not allowed.
+Note: Argon2 is the strongest option but not all OpenPGP implementations are compatible with it
+(pending standardisation).
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ s2kType
+
+
+
+
+
+enums.s2k.argon2
+|
+
+enums.s2k.iterated
+
+
+
+
+
+
+
+
+
+ module:enums.s2k
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
@@ -3604,7 +3731,7 @@ Iteration Count Byte for S2K (String to Key)
Source:
@@ -3716,7 +3843,7 @@ Iteration Count Byte for S2K (String to Key)
Source:
@@ -3734,15 +3861,14 @@ Iteration Count Byte for S2K (String to Key)
-(static) useIndutnyElliptic
+(static) useEllipticFallback
-
Whether to use the indutny/elliptic library for curves (other than Curve25519) that are not supported by the available native crypto API.
-When false, certain standard curves will not be supported (depending on the platform).
-Note: the indutny/elliptic curve library is not designed to be constant time.
+
Whether to use the the noble-curves library for curves (other than Curve25519) that are not supported by the available native crypto API.
+When false, certain standard curves will not be supported (depending on the platform).
@@ -3777,7 +3903,7 @@ Note: the indutny/elliptic curve library is not designed to be constant time.
- useIndutnyElliptic
+ useEllipticFallback
@@ -3834,7 +3960,7 @@ Note: the indutny/elliptic curve library is not designed to be constant time.Source:
@@ -3852,13 +3978,13 @@ Note: the indutny/elliptic curve library is not designed to be constant time.(static) v5Keys
+(static) v6Keys
-
Use V5 keys.
+
Use v6 keys.
Note: not all OpenPGP implementations are compatible with this option.
FUTURE OPENPGP.JS VERSIONS MAY BREAK COMPATIBILITY WHEN USING THIS OPTION
@@ -3895,7 +4021,7 @@ Note: not all OpenPGP implementations are compatible with this option.
- v5Keys
+ v6Keys
@@ -3952,7 +4078,7 @@ Note: not all OpenPGP implementations are compatible with this option.
Source:
@@ -4064,7 +4190,7 @@ Note: not all OpenPGP implementations are compatible with this option.
Source:
@@ -4098,13 +4224,13 @@ Note: not all OpenPGP implementations are compatible with this option.
- Functions Modules Classes
+ Functions Modules Classes
diff --git a/docs/module-crypto.html b/docs/module-crypto.html
new file mode 100644
index 00000000..6360dce9
--- /dev/null
+++ b/docs/module-crypto.html
@@ -0,0 +1,184 @@
+
+
+
+
+ JSDoc: Module: crypto
+
+
+
+
+
+
+
+
+
+
+
+
+
Module: crypto
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Provides access to all cryptographic primitives used in OpenPGP.js
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+ See:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Functions Modules Classes
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-crypto_aes_kw.html b/docs/module-crypto_aes_kw.html
new file mode 100644
index 00000000..2150278b
--- /dev/null
+++ b/docs/module-crypto_aes_kw.html
@@ -0,0 +1,553 @@
+
+
+
+
+ JSDoc: Module: crypto/aes_kw
+
+
+
+
+
+
+
+
+
+
+
+
+
Module: crypto/aes_kw
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Implementation of RFC 3394 AES Key Wrap & Key Unwrap funcions
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+ See:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ (static) unwrap(key, data) → {Uint8Array}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ key
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Throws:
+
+
+
+
+
+
+Error
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) wrap(key, data) → {Uint8Array}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ key
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Functions Modules Classes
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-crypto_cipher.html b/docs/module-crypto_cipher.html
new file mode 100644
index 00000000..089085be
--- /dev/null
+++ b/docs/module-crypto_cipher.html
@@ -0,0 +1,1430 @@
+
+
+
+
+ JSDoc: Module: crypto/cipher
+
+
+
+
+
+
+
+
+
+
+
+
+
Module: crypto/cipher
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Symmetric cryptography functions
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ (static) aes128(key) → {Object}
+
+
+
+
+
+
+
+
AES-128 encryption and decryption (ID 7)
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ key
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+ 128-bit key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+ See:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) aes192(key) → {Object}
+
+
+
+
+
+
+
+
AES-128 Block Cipher (ID 8)
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ key
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+ 192-bit key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+ See:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) aes256(key) → {Object}
+
+
+
+
+
+
+
+
AES-128 Block Cipher (ID 9)
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ key
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+ 256-bit key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+ See:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) blowfish(key) → {Object}
+
+
+
+
+
+
+
+
Blowfish Block Cipher (ID 4)
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ key
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+ 128-bit key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+ See:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) cast5(key) → {Object}
+
+
+
+
+
+
+
+
CAST-128 Block Cipher (ID 3)
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ key
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+ 128-bit key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+ See:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) idea()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Throws:
+
+
+
+
+
+
+Error
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) tripledes(key) → {Object}
+
+
+
+
+
+
+
+
Triple DES Block Cipher (ID 2)
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ key
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+ 192-bit key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+ See:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) twofish(key) → {Object}
+
+
+
+
+
+
+
+
Twofish Block Cipher (ID 10)
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ key
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+ 256-bit key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+ See:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Functions Modules Classes
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-crypto_cmac.html b/docs/module-crypto_cmac.html
new file mode 100644
index 00000000..31aaadf1
--- /dev/null
+++ b/docs/module-crypto_cmac.html
@@ -0,0 +1,413 @@
+
+
+
+
+ JSDoc: Module: crypto/cmac
+
+
+
+
+
+
+
+
+
+
+
+
+
Module: crypto/cmac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This module implements AES-CMAC on top of
+native AES-CBC using either the WebCrypto API or Node.js' crypto API.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Members
+
+
+
+(inner, constant) blockLength
+
+
+
+
+
+
This implementation of CMAC is based on the description of OMAC in
+http://web.cs.ucdavis.edu/~rogaway/papers/eax.pdf. As per that
+document:
+
We have made a small modification to the OMAC algorithm as it was
+originally presented, changing one of its two constants.
+Specifically, the constant 4 at line 85 was the constant 1/2 (the
+multiplicative inverse of 2) in the original definition of OMAC [14].
+The OMAC authors indicate that they will promulgate this modification
+[15], which slightly simplifies implementations.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ (inner) rightXORMut(data, padding)
+
+
+
+
+
+
+
+
xor padding into the end of data. This function implements "the
+operation xor→ [which] xors the shorter string into the end of longer
+one". Since data is always as least as long as padding, we can
+simplify the implementation.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ padding
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Functions Modules Classes
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-crypto_crypto.html b/docs/module-crypto_crypto.html
new file mode 100644
index 00000000..a0105d17
--- /dev/null
+++ b/docs/module-crypto_crypto.html
@@ -0,0 +1,3000 @@
+
+
+
+
+ JSDoc: Module: crypto/crypto
+
+
+
+
+
+
+
+
+
+
+
+
+
Module: crypto/crypto
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Provides functions for asymmetric encryption and decryption as
+well as key generation and parameter handling for all public-key cryptosystems.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ (async, static) generateParams(algo, bits, oid) → {Promise.<{publicParams: {Object}, privateParams: {Object}}>}
+
+
+
+
+
+
+
+
Generate algorithm-specific key parameters
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+module:enums.publicKey
+
+
+
+
+
+
+
+
+
+ The public key algorithm
+
+
+
+
+
+
+ bits
+
+
+
+
+
+Integer
+
+
+
+
+
+
+
+
+
+ Bit length for RSA keys
+
+
+
+
+
+
+ oid
+
+
+
+
+
+module:type/oid
+
+
+
+
+
+
+
+
+
+ Object identifier for ECC keys
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
The parameters referenced by name.
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<{publicParams: {Object}, privateParams: {Object}}>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) generateSessionKey(algo) → {Uint8Array}
+
+
+
+
+
+
+
+
Generating a session key for the specified symmetric algorithm
+See RFC 4880 9.2 for algorithms.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+module:enums.symmetric
+
+
+
+
+
+
+
+
+
+ Symmetric encryption algorithm
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Random bytes as a string to be used as a key.
+
+
+
+
+
+
+ Type
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) getAEADMode(algo) → {Object}
+
+
+
+
+
+
+
+
Get implementation of the given AEAD mode
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+enums.aead
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Throws:
+
+
+
+
+
+
+
+
+
+
+
+ Type
+
+
+
+Error
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) getCurvePayloadSize(algo, oidopt )
+
+
+
+
+
+
+
+
Get encoded secret size for a given elliptic algo
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+module:enums.publicKey
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ alrogithm identifier
+
+
+
+
+
+
+ oid
+
+
+
+
+
+module:type/oid
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+ curve OID if needed by algo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) getPreferredCurveHashAlgo(algo, oidopt )
+
+
+
+
+
+
+
+
Get preferred signing hash algo for a given elliptic algo
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+module:enums.publicKey
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ alrogithm identifier
+
+
+
+
+
+
+ oid
+
+
+
+
+
+module:type/oid
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+ curve OID if needed by algo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) getPrefixRandom(algo) → {Promise.<Uint8Array>}
+
+
+
+
+
+
+
+
Generates a random byte prefix for the specified algorithm
+See RFC 4880 9.2 for algorithms.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+module:enums.symmetric
+
+
+
+
+
+
+
+
+
+ Symmetric encryption algorithm
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Random bytes with length equal to the block size of the cipher, plus the last two bytes repeated.
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<Uint8Array>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) parseEncSessionKeyParams(algo, bytes) → {Object}
+
+
+
+
+
+
+
+
Returns the types comprising the encrypted session key of an algorithm
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+module:enums.publicKey
+
+
+
+
+
+
+
+
+
+ The key algorithm
+
+
+
+
+
+
+ bytes
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ The key material to parse
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
The session key parameters referenced by name.
+
+
+
+
+
+
+ Type
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) parsePrivateKeyParams(algo, bytes, publicParams) → {Object}
+
+
+
+
+
+
+
+
Parse private key material in binary form to get the key parameters
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+module:enums.publicKey
+
+
+
+
+
+
+
+
+
+ The key algorithm
+
+
+
+
+
+
+ bytes
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ The key material to parse
+
+
+
+
+
+
+ publicParams
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+ (ECC only) public params, needed to format some private params
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Number of read bytes plus the key parameters referenced by name.
+
+
+
+
+
+
+ Type
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) parsePublicKeyParams(algo, bytes) → {Object}
+
+
+
+
+
+
+
+
Parse public key material in binary form to get the key parameters
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+module:enums.publicKey
+
+
+
+
+
+
+
+
+
+ The key algorithm
+
+
+
+
+
+
+ bytes
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ The key material to parse
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Number of read bytes plus key parameters referenced by name.
+
+
+
+
+
+
+ Type
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) publicKeyDecrypt(algo, publicKeyParams, privateKeyParams, sessionKeyParams, fingerprint, randomPayloadopt ) → {Promise.<Uint8Array>}
+
+
+
+
+
+
+
+
Decrypts data using specified algorithm and private key parameters.
+See RFC 4880 5.5.3
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+module:enums.publicKey
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Public key algorithm
+
+
+
+
+
+
+ publicKeyParams
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Algorithm-specific public key parameters
+
+
+
+
+
+
+ privateKeyParams
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Algorithm-specific private key parameters
+
+
+
+
+
+
+ sessionKeyParams
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Encrypted session key parameters
+
+
+
+
+
+
+ fingerprint
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Recipient fingerprint
+
+
+
+
+
+
+ randomPayload
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+ Data to return on decryption error, instead of throwing
+(needed for constant-time processing in RSA and ElGamal)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Throws:
+
+
+
+
+
+
+
on sensitive decryption error, unless randomPayload is given
+
+
+
+
+
+
+ Type
+
+
+
+Error
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<Uint8Array>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) publicKeyEncrypt(keyAlgo, symmetricAlgo, publicParams, data, fingerprint) → {Promise.<Object>}
+
+
+
+
+
+
+
+
Encrypts data using specified algorithm and public key parameters.
+See RFC 4880 9.1 for public key algorithms.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ keyAlgo
+
+
+
+
+
+module:enums.publicKey
+
+
+
+
+
+
+
+
+
+ Public key algorithm
+
+
+
+
+
+
+ symmetricAlgo
+
+
+
+
+
+module:enums.symmetric
+
+
+
+
+
+
+
+
+
+ Cipher algorithm
+
+
+
+
+
+
+ publicParams
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+ Algorithm-specific public key parameters
+
+
+
+
+
+
+ data
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Session key data to be encrypted
+
+
+
+
+
+
+ fingerprint
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient fingerprint
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Encrypted session key parameters.
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<Object>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) serializeParams(algo, params) → {Uint8Array}
+
+
+
+
+
+
+
+
Convert params to MPI and serializes them in the proper order
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+module:enums.publicKey
+
+
+
+
+
+
+
+
+
+ The public key algorithm
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+ The key parameters indexed by name
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
The array containing the MPIs.
+
+
+
+
+
+
+ Type
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) validateParams(algo, publicParams, privateParams) → {Promise.<Boolean>}
+
+
+
+
+
+
+
+
Validate algorithm-specific key parameters
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+module:enums.publicKey
+
+
+
+
+
+
+
+
+
+ The public key algorithm
+
+
+
+
+
+
+ publicParams
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+ Algorithm-specific public key parameters
+
+
+
+
+
+
+ privateParams
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+ Algorithm-specific private key parameters
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Whether the parameters are valid.
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<Boolean>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (inner) checkSupportedCurve(oid)
+
+
+
+
+
+
+
+
Check whether the given curve OID is supported
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ oid
+
+
+
+
+
+module:type/oid
+
+
+
+
+
+
+
+
+
+ EC object identifier
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Throws:
+
+
+
+
+
+
+
if curve is not supported
+
+
+
+
+
+
+ Type
+
+
+
+UnsupportedError
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Functions Modules Classes
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-crypto_hash.html b/docs/module-crypto_hash.html
new file mode 100644
index 00000000..1e4de57d
--- /dev/null
+++ b/docs/module-crypto_hash.html
@@ -0,0 +1,596 @@
+
+
+
+
+ JSDoc: Module: crypto/hash
+
+
+
+
+
+
+
+
+
+
+
+
+
Module: crypto/hash
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Provides an interface to hashing functions available in Node.js or external libraries.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+ See:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Members
+
+
+
+(static) md5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+ See:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ (static) digest(algo, data) → {Promise.<Uint8Array>}
+
+
+
+
+
+
+
+
Create a hash on the specified data using the specified algorithm
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+module:enums.hash
+
+
+
+
+
+
+
+
+
+ Hash algorithm type (see RFC 4880 9.4 )
+
+
+
+
+
+
+ data
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Data to be hashed
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<Uint8Array>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) getHashByteLength(algo) → {Integer}
+
+
+
+
+
+
+
+
Returns the hash size in bytes of the specified hash algorithm type
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+module:enums.hash
+
+
+
+
+
+
+
+
+
+ Hash algorithm type (See RFC 4880 9.4 )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Size in bytes of the resulting hash.
+
+
+
+
+
+
+ Type
+
+
+
+Integer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Functions Modules Classes
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-crypto_hkdf.html b/docs/module-crypto_hkdf.html
new file mode 100644
index 00000000..08e03208
--- /dev/null
+++ b/docs/module-crypto_hkdf.html
@@ -0,0 +1,167 @@
+
+
+
+
+ JSDoc: Module: crypto/hkdf
+
+
+
+
+
+
+
+
+
+
+
+
+
Module: crypto/hkdf
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This module implements HKDF using either the WebCrypto API or Node.js' crypto API.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Functions Modules Classes
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-crypto_mode.html b/docs/module-crypto_mode.html
new file mode 100644
index 00000000..766568b7
--- /dev/null
+++ b/docs/module-crypto_mode.html
@@ -0,0 +1,439 @@
+
+
+
+
+ JSDoc: Module: crypto/mode
+
+
+
+
+
+
+
+
+
+
+
+
+
Module: crypto/mode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Members
+
+
+
+(static) cfb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+ See:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+(static) eax
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+ See:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+(static) gcm
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+ See:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+(static) ocb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+ See:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Functions Modules Classes
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-crypto_mode_cfb.html b/docs/module-crypto_mode_cfb.html
new file mode 100644
index 00000000..2aa1d209
--- /dev/null
+++ b/docs/module-crypto_mode_cfb.html
@@ -0,0 +1,548 @@
+
+
+
+
+ JSDoc: Module: crypto/mode/cfb
+
+
+
+
+
+
+
+
+
+
+
+
+
Module: crypto/mode/cfb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ (static) decrypt(algo, key, ciphertext, iv)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+enums.symmetric
+
+
+
+
+
+
+
+
+
+ block cipher algorithm
+
+
+
+
+
+
+ key
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ciphertext
+
+
+
+
+
+MaybeStream.<Uint8Array>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ iv
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) encrypt(algo, key, plaintext, iv, config)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+enums.symmetric
+
+
+
+
+
+
+
+
+
+ block cipher algorithm
+
+
+
+
+
+
+ key
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ plaintext
+
+
+
+
+
+MaybeStream.<Uint8Array>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ iv
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ config
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+ full configuration, defaults to openpgp.config
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Functions Modules Classes
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-crypto_mode_eax.html b/docs/module-crypto_mode_eax.html
new file mode 100644
index 00000000..76aa3551
--- /dev/null
+++ b/docs/module-crypto_mode_eax.html
@@ -0,0 +1,748 @@
+
+
+
+
+ JSDoc: Module: crypto/mode/eax
+
+
+
+
+
+
+
+
+
+
+
+
+
Module: crypto/mode/eax
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This module implements AES-EAX en/decryption on top of
+native AES-CTR using either the WebCrypto API or Node.js' crypto API.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ (inner) decrypt(ciphertext, nonce, adata) → {Promise.<Uint8Array>}
+
+
+
+
+
+
+
+
Decrypt ciphertext input.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ ciphertext
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ The ciphertext input to be decrypted
+
+
+
+
+
+
+ nonce
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ The nonce (16 bytes)
+
+
+
+
+
+
+ adata
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Associated data to verify
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
The plaintext output.
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<Uint8Array>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, inner) EAX(cipher, key)
+
+
+
+
+
+
+
+
Class to en/decrypt using EAX mode.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ cipher
+
+
+
+
+
+enums.symmetric
+
+
+
+
+
+
+
+
+
+ The symmetric cipher algorithm to use
+
+
+
+
+
+
+ key
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ The encryption key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (inner) encrypt(plaintext, nonce, adata) → {Promise.<Uint8Array>}
+
+
+
+
+
+
+
+
Encrypt plaintext input.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ plaintext
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ The cleartext input to be encrypted
+
+
+
+
+
+
+ nonce
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ The nonce (16 bytes)
+
+
+
+
+
+
+ adata
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Associated data to sign
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
The ciphertext output.
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<Uint8Array>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Functions Modules Classes
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-crypto_mode_gcm.html b/docs/module-crypto_mode_gcm.html
new file mode 100644
index 00000000..c9911464
--- /dev/null
+++ b/docs/module-crypto_mode_gcm.html
@@ -0,0 +1,334 @@
+
+
+
+
+ JSDoc: Module: crypto/mode/gcm
+
+
+
+
+
+
+
+
+
+
+
+
+
Module: crypto/mode/gcm
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This module wraps native AES-GCM en/decryption for both
+the WebCrypto api as well as node.js' crypto api.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ (async, inner) GCM(cipher, key)
+
+
+
+
+
+
+
+
Class to en/decrypt using GCM mode.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ cipher
+
+
+
+
+
+enums.symmetric
+
+
+
+
+
+
+
+
+
+ The symmetric cipher algorithm to use
+
+
+
+
+
+
+ key
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ The encryption key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Functions Modules Classes
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-crypto_mode_ocb.html b/docs/module-crypto_mode_ocb.html
new file mode 100644
index 00000000..19dceb00
--- /dev/null
+++ b/docs/module-crypto_mode_ocb.html
@@ -0,0 +1,747 @@
+
+
+
+
+ JSDoc: Module: crypto/mode/ocb
+
+
+
+
+
+
+
+
+
+
+
+
+
Module: crypto/mode/ocb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This module implements AES-OCB en/decryption.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ (inner) decrypt(ciphertext, nonce, adata) → {Promise.<Uint8Array>}
+
+
+
+
+
+
+
+
Decrypt ciphertext input.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ ciphertext
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ The ciphertext input to be decrypted
+
+
+
+
+
+
+ nonce
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ The nonce (15 bytes)
+
+
+
+
+
+
+ adata
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Associated data to sign
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
The ciphertext output.
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<Uint8Array>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (inner) encrypt(plaintext, nonce, adata) → {Promise.<Uint8Array>}
+
+
+
+
+
+
+
+
Encrypt plaintext input.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ plaintext
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ The cleartext input to be encrypted
+
+
+
+
+
+
+ nonce
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ The nonce (15 bytes)
+
+
+
+
+
+
+ adata
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Associated data to sign
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
The ciphertext output.
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<Uint8Array>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, inner) OCB(cipher, key)
+
+
+
+
+
+
+
+
Class to en/decrypt using OCB mode.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ cipher
+
+
+
+
+
+enums.symmetric
+
+
+
+
+
+
+
+
+
+ The symmetric cipher algorithm to use
+
+
+
+
+
+
+ key
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ The encryption key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Functions Modules Classes
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-crypto_pkcs1.html b/docs/module-crypto_pkcs1.html
new file mode 100644
index 00000000..2a8616b5
--- /dev/null
+++ b/docs/module-crypto_pkcs1.html
@@ -0,0 +1,882 @@
+
+
+
+
+ JSDoc: Module: crypto/pkcs1
+
+
+
+
+
+
+
+
+
+
+
+
+
Module: crypto/pkcs1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Provides EME-PKCS1-v1_5 encoding and decoding and EMSA-PKCS1-v1_5 encoding function
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+ See:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Members
+
+
+
+
+
+
+
+
+
+
ASN1 object identifiers for hashes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+ See:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ (static) emeDecode(encoded, randomPayload) → {Uint8Array}
+
+
+
+
+
+
+
+
Decode a EME-PKCS1-v1_5 padded message
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ encoded
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Encoded message bytes
+
+
+
+
+
+
+ randomPayload
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Data to return in case of decoding error (needed for constant-time processing)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+ See:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Throws:
+
+
+
+
+
+
+
on decoding failure, unless randomPayload is provided
+
+
+
+
+
+
+ Type
+
+
+
+Error
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
decoded data or randomPayload (on error, if given)
+
+
+
+
+
+
+ Type
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) emeEncode(message, keyLength) → {Uint8Array}
+
+
+
+
+
+
+
+
Create a EME-PKCS1-v1_5 padded message
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ message
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Message to be encoded
+
+
+
+
+
+
+ keyLength
+
+
+
+
+
+Integer
+
+
+
+
+
+
+
+
+
+ The length in octets of the key modulus
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+ See:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
EME-PKCS1 padded message.
+
+
+
+
+
+
+ Type
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) emsaEncode(algo, hashed, emLen) → {Uint8Array}
+
+
+
+
+
+
+
+
Create a EMSA-PKCS1-v1_5 padded message
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+Integer
+
+
+
+
+
+
+
+
+
+ Hash algorithm type used
+
+
+
+
+
+
+ hashed
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Message to be encoded
+
+
+
+
+
+
+ emLen
+
+
+
+
+
+Integer
+
+
+
+
+
+
+
+
+
+ Intended length in octets of the encoded message
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+ See:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+ Type
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Functions Modules Classes
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-crypto_public_key.html b/docs/module-crypto_public_key.html
new file mode 100644
index 00000000..c052971f
--- /dev/null
+++ b/docs/module-crypto_public_key.html
@@ -0,0 +1,439 @@
+
+
+
+
+ JSDoc: Module: crypto/public_key
+
+
+
+
+
+
+
+
+
+
+
+
+
Module: crypto/public_key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Asymmetric cryptography functions
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Members
+
+
+
+(static) dsa
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+ See:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+(static) elgamal
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+ See:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+(static) elliptic
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+ See:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+(static) rsa
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+ See:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Functions Modules Classes
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-crypto_public_key_dsa.html b/docs/module-crypto_public_key_dsa.html
new file mode 100644
index 00000000..aa017bee
--- /dev/null
+++ b/docs/module-crypto_public_key_dsa.html
@@ -0,0 +1,1084 @@
+
+
+
+
+ JSDoc: Module: crypto/public_key/dsa
+
+
+
+
+
+
+
+
+
+
+
+
+
Module: crypto/public_key/dsa
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
A Digital signature algorithm implementation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Members
+
+
+
+(inner) x
+
+
+
+
+
+
Re-derive public key y' = g ** x mod p
+Expect y == y'
+
Blinded exponentiation computes g**{rq + x} to compare to y
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ (async, static) sign(hashAlgo, hashed, g, p, q, x) → {Promise.<{r: Uint8Array, s: Uint8Array}>}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ hashAlgo
+
+
+
+
+
+Integer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ hashed
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ g
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ p
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ q
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ x
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<{r: Uint8Array, s: Uint8Array}>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) validateParams(p, q, g, y, x) → {Promise.<Boolean>}
+
+
+
+
+
+
+
+
Validate DSA parameters
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ p
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ DSA prime
+
+
+
+
+
+
+ q
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ DSA group order
+
+
+
+
+
+
+ g
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ DSA sub-group generator
+
+
+
+
+
+
+ y
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ DSA public key
+
+
+
+
+
+
+ x
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ DSA private key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Whether params are valid.
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<Boolean>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) verify(hashAlgo, r, s, hashed, g, p, q, y) → {boolean}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ hashAlgo
+
+
+
+
+
+Integer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ r
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ s
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ hashed
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ g
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ p
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ q
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ y
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Functions Modules Classes
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-crypto_public_key_elgamal.html b/docs/module-crypto_public_key_elgamal.html
new file mode 100644
index 00000000..a4e8c423
--- /dev/null
+++ b/docs/module-crypto_public_key_elgamal.html
@@ -0,0 +1,981 @@
+
+
+
+
+ JSDoc: Module: crypto/public_key/elgamal
+
+
+
+
+
+
+
+
+
+
+
+
+
Module: crypto/public_key/elgamal
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Members
+
+
+
+(inner) x
+
+
+
+
+
+
Re-derive public key y' = g ** x mod p
+Expect y == y'
+
Blinded exponentiation computes g**{r(p-1) + x} to compare to y
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ (async, static) decrypt(c1, c2, p, x, randomPayload) → {Promise.<Uint8Array>}
+
+
+
+
+
+
+
+
ElGamal Encryption function
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ c1
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ c2
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ p
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ x
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ randomPayload
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Data to return on unpadding error, instead of throwing
+(needed for constant-time processing)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Throws:
+
+
+
+
+
+
+
on decryption error, unless randomPayload is given
+
+
+
+
+
+
+ Type
+
+
+
+Error
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<Uint8Array>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) encrypt(data, p, g, y) → {Promise.<{c1: Uint8Array, c2: Uint8Array}>}
+
+
+
+
+
+
+
+
ElGamal Encryption function
+Note that in OpenPGP, the message needs to be padded with PKCS#1 (same as RSA)
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ To be padded and encrypted
+
+
+
+
+
+
+ p
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ g
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ y
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<{c1: Uint8Array, c2: Uint8Array}>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) validateParams(p, g, y, x) → {Promise.<Boolean>}
+
+
+
+
+
+
+
+
Validate ElGamal parameters
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ p
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ ElGamal prime
+
+
+
+
+
+
+ g
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ ElGamal group generator
+
+
+
+
+
+
+ y
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ ElGamal public key
+
+
+
+
+
+
+ x
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ ElGamal private exponent
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Whether params are valid.
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<Boolean>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Functions Modules Classes
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-crypto_public_key_elliptic.html b/docs/module-crypto_public_key_elliptic.html
new file mode 100644
index 00000000..f116206b
--- /dev/null
+++ b/docs/module-crypto_public_key_elliptic.html
@@ -0,0 +1,180 @@
+
+
+
+
+ JSDoc: Module: crypto/public_key/elliptic
+
+
+
+
+
+
+
+
+
+
+
+
+
Module: crypto/public_key/elliptic
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Functions to access Elliptic Curve Cryptography
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+ See:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Functions Modules Classes
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-crypto_public_key_elliptic_curve.html b/docs/module-crypto_public_key_elliptic_curve.html
new file mode 100644
index 00000000..b925f144
--- /dev/null
+++ b/docs/module-crypto_public_key_elliptic_curve.html
@@ -0,0 +1,1149 @@
+
+
+
+
+ JSDoc: Module: crypto/public_key/elliptic/curve
+
+
+
+
+
+
+
+
+
+
+
+
+
Module: crypto/public_key/elliptic/curve
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Wrapper of an instance of an Elliptic Curve
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ (inner) getPreferredHashAlgo(oid) → {enums.hash}
+
+
+
+
+
+
+
+
Get preferred hash algo to use with the given curve
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ oid
+
+
+
+
+
+module:type/oid
+
+
+
+
+
+
+
+
+
+ curve oid
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+ Type
+
+
+
+enums.hash
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (inner) jwkToRawPublic(jwk) → {Uint8Array}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ jwk
+
+
+
+
+
+JsonWebKey
+
+
+
+
+
+
+
+
+
+ key for conversion
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+ Type
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (inner) privateToJWK(payloadSize, name, publicKey, privateKey) → {JsonWebKey}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ payloadSize
+
+
+
+
+
+Integer
+
+
+
+
+
+
+
+
+
+ ec payload size
+
+
+
+
+
+
+ name
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+ curve name
+
+
+
+
+
+
+ publicKey
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ public key
+
+
+
+
+
+
+ privateKey
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ private key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Private key in jwk format.
+
+
+
+
+
+
+ Type
+
+
+
+JsonWebKey
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (inner) rawPublicToJWK(payloadSize, name, publicKey) → {JsonWebKey}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ payloadSize
+
+
+
+
+
+Integer
+
+
+
+
+
+
+
+
+
+ ec payload size
+
+
+
+
+
+
+ name
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+ curve name
+
+
+
+
+
+
+ publicKey
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ public key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Public key in jwk format.
+
+
+
+
+
+
+ Type
+
+
+
+JsonWebKey
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, inner) validateStandardParams(algo, oid, Q, d) → {Promise.<Boolean>}
+
+
+
+
+
+
+
+
Validate ECDH and ECDSA parameters
+Not suitable for EdDSA (different secret key format)
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+module:enums.publicKey
+
+
+
+
+
+
+
+
+
+ EC algorithm, to filter supported curves
+
+
+
+
+
+
+ oid
+
+
+
+
+
+module:type/oid
+
+
+
+
+
+
+
+
+
+ EC object identifier
+
+
+
+
+
+
+ Q
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ EC public point
+
+
+
+
+
+
+ d
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ EC secret scalar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Whether params are valid.
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<Boolean>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Functions Modules Classes
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-crypto_public_key_elliptic_ecdh.html b/docs/module-crypto_public_key_elliptic_ecdh.html
new file mode 100644
index 00000000..8c83d512
--- /dev/null
+++ b/docs/module-crypto_public_key_elliptic_ecdh.html
@@ -0,0 +1,6011 @@
+
+
+
+
+ JSDoc: Module: crypto/public_key/elliptic/ecdh
+
+
+
+
+
+
+
+
+
+
+
+
+
Module: crypto/public_key/elliptic/ecdh
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Key encryption and decryption for RFC 6637 ECDH
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ (async, static) decrypt(oid, kdfParams, V, C, Q, d, fingerprint) → {Promise.<Uint8Array>}
+
+
+
+
+
+
+
+
Decrypt and unwrap the value derived from session key
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ oid
+
+
+
+
+
+module:type/oid
+
+
+
+
+
+
+
+
+
+ Elliptic curve object identifier
+
+
+
+
+
+
+ kdfParams
+
+
+
+
+
+module:type/kdf_params
+
+
+
+
+
+
+
+
+
+ KDF params including cipher and algorithm to use
+
+
+
+
+
+
+ V
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Public part of ephemeral key
+
+
+
+
+
+
+ C
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Encrypted and wrapped value derived from session key
+
+
+
+
+
+
+ Q
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient public key
+
+
+
+
+
+
+ d
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient private key
+
+
+
+
+
+
+ fingerprint
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient fingerprint
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Value derived from session key.
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<Uint8Array>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) decrypt(algo, ephemeralPublicKey, wrappedKey,, A, k) → {Promise.<Uint8Array>}
+
+
+
+
+
+
+
+
Decrypt and unwrap the session key
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+module:enums.publicKey
+
+
+
+
+
+
+
+
+
+ Algorithm identifier
+
+
+
+
+
+
+ ephemeralPublicKey
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ (K_A)
+
+
+
+
+
+
+ wrappedKey,
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient public key (K_b), needed for KDF
+
+
+
+
+
+
+ k
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient secret key (b)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
decrypted session key data
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<Uint8Array>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) encrypt(oid, kdfParams, data, Q, fingerprint) → {Promise.<{publicKey: Uint8Array, wrappedKey: Uint8Array}>}
+
+
+
+
+
+
+
+
Encrypt and wrap a session key
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ oid
+
+
+
+
+
+module:type/oid
+
+
+
+
+
+
+
+
+
+ Elliptic curve object identifier
+
+
+
+
+
+
+ kdfParams
+
+
+
+
+
+module:type/kdf_params
+
+
+
+
+
+
+
+
+
+ KDF params including cipher and algorithm to use
+
+
+
+
+
+
+ data
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Unpadded session key data
+
+
+
+
+
+
+ Q
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient public key
+
+
+
+
+
+
+ fingerprint
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient fingerprint
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<{publicKey: Uint8Array, wrappedKey: Uint8Array}>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) encrypt(algo, data, recipientA) → {Promise.<{ephemeralPublicKey: Uint8Array, wrappedKey: Uint8Array}>}
+
+
+
+
+
+
+
+
Wrap and encrypt a session key
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+module:enums.publicKey
+
+
+
+
+
+
+
+
+
+ Algorithm identifier
+
+
+
+
+
+
+ data
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ session key data to be encrypted
+
+
+
+
+
+
+ recipientA
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient public key (K_B)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
ephemeral public key (K_A) and encrypted key
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<{ephemeralPublicKey: Uint8Array, wrappedKey: Uint8Array}>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) generate(algo) → {Promise.<{A: Uint8Array, k: Uint8Array}>}
+
+
+
+
+
+
+
+
Generate ECDH key for Montgomery curves
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+module:enums.publicKey
+
+
+
+
+
+
+
+
+
+ Algorithm identifier
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<{A: Uint8Array, k: Uint8Array}>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) validateParams(oid, Q, d) → {Promise.<Boolean>}
+
+
+
+
+
+
+
+
Validate ECDH parameters
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ oid
+
+
+
+
+
+module:type/oid
+
+
+
+
+
+
+
+
+
+ Elliptic curve object identifier
+
+
+
+
+
+
+ Q
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ ECDH public point
+
+
+
+
+
+
+ d
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ ECDH secret scalar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Whether params are valid.
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<Boolean>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) validateParams(algo, A, k) → {Promise.<Boolean>}
+
+
+
+
+
+
+
+
Validate ECDH parameters
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+module:enums.publicKey
+
+
+
+
+
+
+
+
+
+ Algorithm identifier
+
+
+
+
+
+
+ A
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ ECDH public point
+
+
+
+
+
+
+ k
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ ECDH secret scalar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Whether params are valid.
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<Boolean>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, inner) genPrivateEphemeralKey(curve, V, Q, d) → {Promise.<{secretKey: Uint8Array, sharedKey: Uint8Array}>}
+
+
+
+
+
+
+
+
Generate ECDHE secret from private key and public part of ephemeral key
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ curve
+
+
+
+
+
+CurveWithOID
+
+
+
+
+
+
+
+
+
+ Elliptic curve object
+
+
+
+
+
+
+ V
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Public part of ephemeral key
+
+
+
+
+
+
+ Q
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient public key
+
+
+
+
+
+
+ d
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient private key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<{secretKey: Uint8Array, sharedKey: Uint8Array}>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, inner) genPublicEphemeralKey(curve, Q) → {Promise.<{publicKey: Uint8Array, sharedKey: Uint8Array}>}
+
+
+
+
+
+
+
+
Generate ECDHE ephemeral key and secret from public key
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ curve
+
+
+
+
+
+CurveWithOID
+
+
+
+
+
+
+
+
+
+ Elliptic curve object
+
+
+
+
+
+
+ Q
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient public key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<{publicKey: Uint8Array, sharedKey: Uint8Array}>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, inner) nodePrivateEphemeralKey(curve, V, d) → {Promise.<{secretKey: Uint8Array, sharedKey: Uint8Array}>}
+
+
+
+
+
+
+
+
Generate ECDHE secret from private key and public part of ephemeral key using nodeCrypto
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ curve
+
+
+
+
+
+CurveWithOID
+
+
+
+
+
+
+
+
+
+ Elliptic curve object
+
+
+
+
+
+
+ V
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Public part of ephemeral key
+
+
+
+
+
+
+ d
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient private key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<{secretKey: Uint8Array, sharedKey: Uint8Array}>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, inner) nodePublicEphemeralKey(curve, Q) → {Promise.<{publicKey: Uint8Array, sharedKey: Uint8Array}>}
+
+
+
+
+
+
+
+
Generate ECDHE ephemeral key and secret from public key using nodeCrypto
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ curve
+
+
+
+
+
+CurveWithOID
+
+
+
+
+
+
+
+
+
+ Elliptic curve object
+
+
+
+
+
+
+ Q
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient public key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<{publicKey: Uint8Array, sharedKey: Uint8Array}>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, inner) webPrivateEphemeralKey(curve, V, Q, d) → {Promise.<{secretKey: Uint8Array, sharedKey: Uint8Array}>}
+
+
+
+
+
+
+
+
Generate ECDHE secret from private key and public part of ephemeral key using webCrypto
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ curve
+
+
+
+
+
+CurveWithOID
+
+
+
+
+
+
+
+
+
+ Elliptic curve object
+
+
+
+
+
+
+ V
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Public part of ephemeral key
+
+
+
+
+
+
+ Q
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient public key
+
+
+
+
+
+
+ d
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient private key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<{secretKey: Uint8Array, sharedKey: Uint8Array}>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, inner) webPublicEphemeralKey(curve, Q) → {Promise.<{publicKey: Uint8Array, sharedKey: Uint8Array}>}
+
+
+
+
+
+
+
+
Generate ECDHE ephemeral key and secret from public key using webCrypto
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ curve
+
+
+
+
+
+CurveWithOID
+
+
+
+
+
+
+
+
+
+ Elliptic curve object
+
+
+
+
+
+
+ Q
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient public key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<{publicKey: Uint8Array, sharedKey: Uint8Array}>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Key encryption and decryption for RFC 6637 ECDH
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ (async, static) decrypt(oid, kdfParams, V, C, Q, d, fingerprint) → {Promise.<Uint8Array>}
+
+
+
+
+
+
+
+
Decrypt and unwrap the value derived from session key
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ oid
+
+
+
+
+
+module:type/oid
+
+
+
+
+
+
+
+
+
+ Elliptic curve object identifier
+
+
+
+
+
+
+ kdfParams
+
+
+
+
+
+module:type/kdf_params
+
+
+
+
+
+
+
+
+
+ KDF params including cipher and algorithm to use
+
+
+
+
+
+
+ V
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Public part of ephemeral key
+
+
+
+
+
+
+ C
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Encrypted and wrapped value derived from session key
+
+
+
+
+
+
+ Q
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient public key
+
+
+
+
+
+
+ d
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient private key
+
+
+
+
+
+
+ fingerprint
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient fingerprint
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Value derived from session key.
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<Uint8Array>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) decrypt(algo, ephemeralPublicKey, wrappedKey,, A, k) → {Promise.<Uint8Array>}
+
+
+
+
+
+
+
+
Decrypt and unwrap the session key
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+module:enums.publicKey
+
+
+
+
+
+
+
+
+
+ Algorithm identifier
+
+
+
+
+
+
+ ephemeralPublicKey
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ (K_A)
+
+
+
+
+
+
+ wrappedKey,
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient public key (K_b), needed for KDF
+
+
+
+
+
+
+ k
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient secret key (b)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
decrypted session key data
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<Uint8Array>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) encrypt(oid, kdfParams, data, Q, fingerprint) → {Promise.<{publicKey: Uint8Array, wrappedKey: Uint8Array}>}
+
+
+
+
+
+
+
+
Encrypt and wrap a session key
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ oid
+
+
+
+
+
+module:type/oid
+
+
+
+
+
+
+
+
+
+ Elliptic curve object identifier
+
+
+
+
+
+
+ kdfParams
+
+
+
+
+
+module:type/kdf_params
+
+
+
+
+
+
+
+
+
+ KDF params including cipher and algorithm to use
+
+
+
+
+
+
+ data
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Unpadded session key data
+
+
+
+
+
+
+ Q
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient public key
+
+
+
+
+
+
+ fingerprint
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient fingerprint
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<{publicKey: Uint8Array, wrappedKey: Uint8Array}>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) encrypt(algo, data, recipientA) → {Promise.<{ephemeralPublicKey: Uint8Array, wrappedKey: Uint8Array}>}
+
+
+
+
+
+
+
+
Wrap and encrypt a session key
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+module:enums.publicKey
+
+
+
+
+
+
+
+
+
+ Algorithm identifier
+
+
+
+
+
+
+ data
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ session key data to be encrypted
+
+
+
+
+
+
+ recipientA
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient public key (K_B)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
ephemeral public key (K_A) and encrypted key
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<{ephemeralPublicKey: Uint8Array, wrappedKey: Uint8Array}>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) generate(algo) → {Promise.<{A: Uint8Array, k: Uint8Array}>}
+
+
+
+
+
+
+
+
Generate ECDH key for Montgomery curves
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+module:enums.publicKey
+
+
+
+
+
+
+
+
+
+ Algorithm identifier
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<{A: Uint8Array, k: Uint8Array}>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) validateParams(oid, Q, d) → {Promise.<Boolean>}
+
+
+
+
+
+
+
+
Validate ECDH parameters
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ oid
+
+
+
+
+
+module:type/oid
+
+
+
+
+
+
+
+
+
+ Elliptic curve object identifier
+
+
+
+
+
+
+ Q
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ ECDH public point
+
+
+
+
+
+
+ d
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ ECDH secret scalar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Whether params are valid.
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<Boolean>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) validateParams(algo, A, k) → {Promise.<Boolean>}
+
+
+
+
+
+
+
+
Validate ECDH parameters
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+module:enums.publicKey
+
+
+
+
+
+
+
+
+
+ Algorithm identifier
+
+
+
+
+
+
+ A
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ ECDH public point
+
+
+
+
+
+
+ k
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ ECDH secret scalar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Whether params are valid.
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<Boolean>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, inner) genPrivateEphemeralKey(curve, V, Q, d) → {Promise.<{secretKey: Uint8Array, sharedKey: Uint8Array}>}
+
+
+
+
+
+
+
+
Generate ECDHE secret from private key and public part of ephemeral key
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ curve
+
+
+
+
+
+CurveWithOID
+
+
+
+
+
+
+
+
+
+ Elliptic curve object
+
+
+
+
+
+
+ V
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Public part of ephemeral key
+
+
+
+
+
+
+ Q
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient public key
+
+
+
+
+
+
+ d
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient private key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<{secretKey: Uint8Array, sharedKey: Uint8Array}>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, inner) genPublicEphemeralKey(curve, Q) → {Promise.<{publicKey: Uint8Array, sharedKey: Uint8Array}>}
+
+
+
+
+
+
+
+
Generate ECDHE ephemeral key and secret from public key
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ curve
+
+
+
+
+
+CurveWithOID
+
+
+
+
+
+
+
+
+
+ Elliptic curve object
+
+
+
+
+
+
+ Q
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient public key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<{publicKey: Uint8Array, sharedKey: Uint8Array}>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, inner) nodePrivateEphemeralKey(curve, V, d) → {Promise.<{secretKey: Uint8Array, sharedKey: Uint8Array}>}
+
+
+
+
+
+
+
+
Generate ECDHE secret from private key and public part of ephemeral key using nodeCrypto
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ curve
+
+
+
+
+
+CurveWithOID
+
+
+
+
+
+
+
+
+
+ Elliptic curve object
+
+
+
+
+
+
+ V
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Public part of ephemeral key
+
+
+
+
+
+
+ d
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient private key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<{secretKey: Uint8Array, sharedKey: Uint8Array}>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, inner) nodePublicEphemeralKey(curve, Q) → {Promise.<{publicKey: Uint8Array, sharedKey: Uint8Array}>}
+
+
+
+
+
+
+
+
Generate ECDHE ephemeral key and secret from public key using nodeCrypto
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ curve
+
+
+
+
+
+CurveWithOID
+
+
+
+
+
+
+
+
+
+ Elliptic curve object
+
+
+
+
+
+
+ Q
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient public key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<{publicKey: Uint8Array, sharedKey: Uint8Array}>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, inner) webPrivateEphemeralKey(curve, V, Q, d) → {Promise.<{secretKey: Uint8Array, sharedKey: Uint8Array}>}
+
+
+
+
+
+
+
+
Generate ECDHE secret from private key and public part of ephemeral key using webCrypto
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ curve
+
+
+
+
+
+CurveWithOID
+
+
+
+
+
+
+
+
+
+ Elliptic curve object
+
+
+
+
+
+
+ V
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Public part of ephemeral key
+
+
+
+
+
+
+ Q
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient public key
+
+
+
+
+
+
+ d
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient private key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<{secretKey: Uint8Array, sharedKey: Uint8Array}>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, inner) webPublicEphemeralKey(curve, Q) → {Promise.<{publicKey: Uint8Array, sharedKey: Uint8Array}>}
+
+
+
+
+
+
+
+
Generate ECDHE ephemeral key and secret from public key using webCrypto
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ curve
+
+
+
+
+
+CurveWithOID
+
+
+
+
+
+
+
+
+
+ Elliptic curve object
+
+
+
+
+
+
+ Q
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Recipient public key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<{publicKey: Uint8Array, sharedKey: Uint8Array}>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Functions Modules Classes
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-crypto_public_key_elliptic_ecdsa.html b/docs/module-crypto_public_key_elliptic_ecdsa.html
new file mode 100644
index 00000000..ff155f0b
--- /dev/null
+++ b/docs/module-crypto_public_key_elliptic_ecdsa.html
@@ -0,0 +1,1017 @@
+
+
+
+
+ JSDoc: Module: crypto/public_key/elliptic/ecdsa
+
+
+
+
+
+
+
+
+
+
+
+
+
Module: crypto/public_key/elliptic/ecdsa
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Implementation of ECDSA following RFC6637 for Openpgpjs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ (async, static) sign(oid, hashAlgo, message, publicKey, privateKey, hashed) → {Promise.<{r: Uint8Array, s: Uint8Array}>}
+
+
+
+
+
+
+
+
Sign a message using the provided key
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ oid
+
+
+
+
+
+module:type/oid
+
+
+
+
+
+
+
+
+
+ Elliptic curve object identifier
+
+
+
+
+
+
+ hashAlgo
+
+
+
+
+
+module:enums.hash
+
+
+
+
+
+
+
+
+
+ Hash algorithm used to sign
+
+
+
+
+
+
+ message
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Message to sign
+
+
+
+
+
+
+ publicKey
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Public key
+
+
+
+
+
+
+ privateKey
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Private key used to sign the message
+
+
+
+
+
+
+ hashed
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ The hashed message
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Signature of the message
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<{r: Uint8Array, s: Uint8Array}>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) validateParams(oid, Q, d) → {Promise.<Boolean>}
+
+
+
+
+
+
+
+
Validate ECDSA parameters
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ oid
+
+
+
+
+
+module:type/oid
+
+
+
+
+
+
+
+
+
+ Elliptic curve object identifier
+
+
+
+
+
+
+ Q
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ ECDSA public point
+
+
+
+
+
+
+ d
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ ECDSA secret scalar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Whether params are valid.
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<Boolean>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) verify(oid, hashAlgo, signature, message, publicKey, hashed) → {Boolean}
+
+
+
+
+
+
+
+
Verifies if a signature is valid for a message
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ oid
+
+
+
+
+
+module:type/oid
+
+
+
+
+
+
+
+
+
+ Elliptic curve object identifier
+
+
+
+
+
+
+ hashAlgo
+
+
+
+
+
+module:enums.hash
+
+
+
+
+
+
+
+
+
+ Hash algorithm used in the signature
+
+
+
+
+
+
+ signature
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+ Signature to verify
+
+
+
+
+
+
+ message
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Message to verify
+
+
+
+
+
+
+ publicKey
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Public key used to verify the message
+
+
+
+
+
+
+ hashed
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ The hashed message
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, inner) jsVerify()
+
+
+
+
+
+
+
+
Fallback javascript implementation of ECDSA verification.
+To be used if no native implementation is available for the given curve/operation.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Functions Modules Classes
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-crypto_public_key_elliptic_eddsa.html b/docs/module-crypto_public_key_elliptic_eddsa.html
new file mode 100644
index 00000000..21bb2eb8
--- /dev/null
+++ b/docs/module-crypto_public_key_elliptic_eddsa.html
@@ -0,0 +1,1106 @@
+
+
+
+
+ JSDoc: Module: crypto/public_key/elliptic/eddsa
+
+
+
+
+
+
+
+
+
+
+
+
+
Module: crypto/public_key/elliptic/eddsa
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Implementation of EdDSA following RFC4880bis-03 for OpenPGP
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ (static) generate(algo) → {Promise.<{A: Uint8Array, seed: Uint8Array}>}
+
+
+
+
+
+
+
+
Generate (non-legacy) EdDSA key
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+module:enums.publicKey
+
+
+
+
+
+
+
+
+
+ Algorithm identifier
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<{A: Uint8Array, seed: Uint8Array}>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) sign(algo, hashAlgo, message, publicKey, privateKey, hashed) → {Promise.<{RS: Uint8Array}>}
+
+
+
+
+
+
+
+
Sign a message using the provided key
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+module:enums.publicKey
+
+
+
+
+
+
+
+
+
+ Algorithm identifier
+
+
+
+
+
+
+ hashAlgo
+
+
+
+
+
+module:enums.hash
+
+
+
+
+
+
+
+
+
+ Hash algorithm used to sign (must be sha256 or stronger)
+
+
+
+
+
+
+ message
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Message to sign
+
+
+
+
+
+
+ publicKey
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Public key
+
+
+
+
+
+
+ privateKey
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Private key used to sign the message
+
+
+
+
+
+
+ hashed
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ The hashed message
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Signature of the message
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<{RS: Uint8Array}>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) validateParams(algo, A, seed, oid) → {Promise.<Boolean>}
+
+
+
+
+
+
+
+
Validate (non-legacy) EdDSA parameters
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+module:enums.publicKey
+
+
+
+
+
+
+
+
+
+ Algorithm identifier
+
+
+
+
+
+
+ A
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ EdDSA public point
+
+
+
+
+
+
+ seed
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ EdDSA secret seed
+
+
+
+
+
+
+ oid
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ (legacy only) EdDSA OID
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Whether params are valid.
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<Boolean>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) verify(algo, hashAlgo, signature, m, publicKey, hashed) → {Boolean}
+
+
+
+
+
+
+
+
Verifies if a signature is valid for a message
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+module:enums.publicKey
+
+
+
+
+
+
+
+
+
+ Algorithm identifier
+
+
+
+
+
+
+ hashAlgo
+
+
+
+
+
+module:enums.hash
+
+
+
+
+
+
+
+
+
+ Hash algorithm used in the signature
+
+
+
+
+
+
+ signature
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+ Signature to verify the message
+
+
+
+
+
+
+ m
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Message to verify
+
+
+
+
+
+
+ publicKey
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Public key used to verify the message
+
+
+
+
+
+
+ hashed
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ The hashed message
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Functions Modules Classes
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-crypto_public_key_elliptic_eddsa_legacy.html b/docs/module-crypto_public_key_elliptic_eddsa_legacy.html
new file mode 100644
index 00000000..b9a68f12
--- /dev/null
+++ b/docs/module-crypto_public_key_elliptic_eddsa_legacy.html
@@ -0,0 +1,927 @@
+
+
+
+
+ JSDoc: Module: crypto/public_key/elliptic/eddsa_legacy
+
+
+
+
+
+
+
+
+
+
+
+
+
Module: crypto/public_key/elliptic/eddsa_legacy
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Implementation of legacy EdDSA following RFC4880bis-03 for OpenPGP.
+This key type has been deprecated by the crypto-refresh RFC.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ (async, static) sign(oid, hashAlgo, message, publicKey, privateKey, hashed) → {Promise.<{r: Uint8Array, s: Uint8Array}>}
+
+
+
+
+
+
+
+
Sign a message using the provided legacy EdDSA key
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ oid
+
+
+
+
+
+module:type/oid
+
+
+
+
+
+
+
+
+
+ Elliptic curve object identifier
+
+
+
+
+
+
+ hashAlgo
+
+
+
+
+
+module:enums.hash
+
+
+
+
+
+
+
+
+
+ Hash algorithm used to sign (must be sha256 or stronger)
+
+
+
+
+
+
+ message
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Message to sign
+
+
+
+
+
+
+ publicKey
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Public key
+
+
+
+
+
+
+ privateKey
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Private key used to sign the message
+
+
+
+
+
+
+ hashed
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ The hashed message
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Signature of the message
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<{r: Uint8Array, s: Uint8Array}>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) validateParams(oid, Q, k) → {Promise.<Boolean>}
+
+
+
+
+
+
+
+
Validate legacy EdDSA parameters
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ oid
+
+
+
+
+
+module:type/oid
+
+
+
+
+
+
+
+
+
+ Elliptic curve object identifier
+
+
+
+
+
+
+ Q
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ EdDSA public point
+
+
+
+
+
+
+ k
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ EdDSA secret seed
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Whether params are valid.
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<Boolean>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) verify(oid, hashAlgo, signature, m, publicKey, hashed) → {Boolean}
+
+
+
+
+
+
+
+
Verifies if a legacy EdDSA signature is valid for a message
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ oid
+
+
+
+
+
+module:type/oid
+
+
+
+
+
+
+
+
+
+ Elliptic curve object identifier
+
+
+
+
+
+
+ hashAlgo
+
+
+
+
+
+module:enums.hash
+
+
+
+
+
+
+
+
+
+ Hash algorithm used in the signature
+
+
+
+
+
+
+ signature
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+ Signature to verify the message
+
+
+
+
+
+
+ m
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Message to verify
+
+
+
+
+
+
+ publicKey
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Public key used to verify the message
+
+
+
+
+
+
+ hashed
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ The hashed message
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Functions Modules Classes
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-crypto_public_key_prime.html b/docs/module-crypto_public_key_prime.html
new file mode 100644
index 00000000..f26a9c24
--- /dev/null
+++ b/docs/module-crypto_public_key_prime.html
@@ -0,0 +1,954 @@
+
+
+
+
+ JSDoc: Module: crypto/public_key/prime
+
+
+
+
+
+
+
+
+
+
+
+
+
Module: crypto/public_key/prime
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Algorithms for probabilistic random prime generation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ (static) fermat(n, b) → {boolean}
+
+
+
+
+
+
+
+
Tests whether n is probably prime or not using Fermat's test with b = 2.
+Fails if b^(n-1) mod n != 1.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ n
+
+
+
+
+
+BigInteger
+
+
+
+
+
+
+
+
+
+ Number to test
+
+
+
+
+
+
+ b
+
+
+
+
+
+BigInteger
+
+
+
+
+
+
+
+
+
+ Optional Fermat test base
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) isProbablePrime(n, e, k) → {boolean}
+
+
+
+
+
+
+
+
Probabilistic primality testing
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ n
+
+
+
+
+
+BigInteger
+
+
+
+
+
+
+
+
+
+ Number to test
+
+
+
+
+
+
+ e
+
+
+
+
+
+BigInteger
+
+
+
+
+
+
+
+
+
+ Optional RSA exponent to check against the prime
+
+
+
+
+
+
+ k
+
+
+
+
+
+Integer
+
+
+
+
+
+
+
+
+
+ Optional number of iterations of Miller-Rabin test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) millerRabin(n, k, rand) → {boolean}
+
+
+
+
+
+
+
+
Tests whether n is probably prime or not using the Miller-Rabin test.
+See HAC Remark 4.28.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ n
+
+
+
+
+
+BigInteger
+
+
+
+
+
+
+
+
+
+ Number to test
+
+
+
+
+
+
+ k
+
+
+
+
+
+Integer
+
+
+
+
+
+
+
+
+
+ Optional number of iterations of Miller-Rabin test
+
+
+
+
+
+
+ rand
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+
+ Optional function to generate potential witnesses
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) randomProbablePrime(bits, e, k)
+
+
+
+
+
+
+
+
Generate a probably prime random number
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ bits
+
+
+
+
+
+Integer
+
+
+
+
+
+
+
+
+
+ Bit length of the prime
+
+
+
+
+
+
+ e
+
+
+
+
+
+BigInteger
+
+
+
+
+
+
+
+
+
+ Optional RSA exponent to check against the prime
+
+
+
+
+
+
+ k
+
+
+
+
+
+Integer
+
+
+
+
+
+
+
+
+
+ Optional number of iterations of Miller-Rabin test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Functions Modules Classes
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-crypto_public_key_rsa.html b/docs/module-crypto_public_key_rsa.html
new file mode 100644
index 00000000..7cc1eccf
--- /dev/null
+++ b/docs/module-crypto_public_key_rsa.html
@@ -0,0 +1,2279 @@
+
+
+
+
+ JSDoc: Module: crypto/public_key/rsa
+
+
+
+
+
+
+
+
+
+
+
+
+
Module: crypto/public_key/rsa
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ (async, static) decrypt(m, n, e, d, p, q, u, randomPayload) → {Promise.<String>}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ m
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Message
+
+
+
+
+
+
+ n
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ RSA public modulus
+
+
+
+
+
+
+ e
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ RSA public exponent
+
+
+
+
+
+
+ d
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ RSA private exponent
+
+
+
+
+
+
+ p
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ RSA private prime p
+
+
+
+
+
+
+ q
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ RSA private prime q
+
+
+
+
+
+
+ u
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ RSA private coefficient
+
+
+
+
+
+
+ randomPayload
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Data to return on decryption error, instead of throwing
+(needed for constant-time processing)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Throws:
+
+
+
+
+
+
+
on decryption error, unless randomPayload is given
+
+
+
+
+
+
+ Type
+
+
+
+Error
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<String>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) encrypt(data, n, e) → {Promise.<Uint8Array>}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Message
+
+
+
+
+
+
+ n
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ RSA public modulus
+
+
+
+
+
+
+ e
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ RSA public exponent
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<Uint8Array>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) generate(bits, e) → {Object}
+
+
+
+
+
+
+
+
Generate a new random private key B bits long with public exponent E.
+
When possible, webCrypto or nodeCrypto is used. Otherwise, primes are generated using
+40 rounds of the Miller-Rabin probabilistic random prime generation algorithm.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ bits
+
+
+
+
+
+Integer
+
+
+
+
+
+
+
+
+
+ RSA bit length
+
+
+
+
+
+
+ e
+
+
+
+
+
+Integer
+
+
+
+
+
+
+
+
+
+ RSA public exponent
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+ See:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
RSA public modulus, RSA public exponent, RSA private exponent,
+RSA private prime p, RSA private prime q, u = p ** -1 mod q
+
+
+
+
+
+
+ Type
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) sign(hashAlgo, data, n, e, d, p, q, u, hashed) → {Promise.<Uint8Array>}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ hashAlgo
+
+
+
+
+
+module:enums.hash
+
+
+
+
+
+
+
+
+
+ Hash algorithm
+
+
+
+
+
+
+ data
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Message
+
+
+
+
+
+
+ n
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ RSA public modulus
+
+
+
+
+
+
+ e
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ RSA public exponent
+
+
+
+
+
+
+ d
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ RSA private exponent
+
+
+
+
+
+
+ p
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ RSA private prime p
+
+
+
+
+
+
+ q
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ RSA private prime q
+
+
+
+
+
+
+ u
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ RSA private coefficient
+
+
+
+
+
+
+ hashed
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Hashed message
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<Uint8Array>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) validateParams(n, e, d, p, q, u) → {Promise.<Boolean>}
+
+
+
+
+
+
+
+
Validate RSA parameters
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ n
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ RSA public modulus
+
+
+
+
+
+
+ e
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ RSA public exponent
+
+
+
+
+
+
+ d
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ RSA private exponent
+
+
+
+
+
+
+ p
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ RSA private prime p
+
+
+
+
+
+
+ q
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ RSA private prime q
+
+
+
+
+
+
+ u
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ RSA inverse of p w.r.t. q
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Whether params are valid.
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<Boolean>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) verify(hashAlgo, data, s, n, e, hashed) → {Boolean}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ hashAlgo
+
+
+
+
+
+module:enums.hash
+
+
+
+
+
+
+
+
+
+ Hash algorithm
+
+
+
+
+
+
+ data
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Message
+
+
+
+
+
+
+ s
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Signature
+
+
+
+
+
+
+ n
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ RSA public modulus
+
+
+
+
+
+
+ e
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ RSA public exponent
+
+
+
+
+
+
+ hashed
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Hashed message
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+ Type
+
+
+
+Boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, inner) privateToJWK(hashAlgo, n, e, d, p, q, u)
+
+
+
+
+
+
+
+
Convert Openpgp private key params to jwk key according to
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ hashAlgo
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ n
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ e
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ d
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ p
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ q
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ u
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (inner) publicToJWK(hashAlgo, n, e)
+
+
+
+
+
+
+
+
Convert Openpgp key public params to jwk key according to
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ hashAlgo
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ n
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ e
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Functions Modules Classes
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-crypto_random.html b/docs/module-crypto_random.html
new file mode 100644
index 00000000..fa8b2c6c
--- /dev/null
+++ b/docs/module-crypto_random.html
@@ -0,0 +1,516 @@
+
+
+
+
+ JSDoc: Module: crypto/random
+
+
+
+
+
+
+
+
+
+
+
+
+
Module: crypto/random
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Provides tools for retrieving secure randomness from browsers or Node.js
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ (async, static) getRandomBigInteger(min, max) → {Promise.<module:BigInteger>}
+
+
+
+
+
+
+
+
Create a secure random BigInteger that is greater than or equal to min and less than max.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ min
+
+
+
+
+
+module:BigInteger
+
+
+
+
+
+
+
+
+
+ Lower bound, included
+
+
+
+
+
+
+ max
+
+
+
+
+
+module:BigInteger
+
+
+
+
+
+
+
+
+
+ Upper bound, excluded
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<module:BigInteger>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) getRandomBytes(length) → {Uint8Array}
+
+
+
+
+
+
+
+
Retrieve secure random byte array of the specified length
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ length
+
+
+
+
+
+Integer
+
+
+
+
+
+
+
+
+
+ Length in bytes to generate
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+ Type
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Functions Modules Classes
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-crypto_signature.html b/docs/module-crypto_signature.html
new file mode 100644
index 00000000..accef42e
--- /dev/null
+++ b/docs/module-crypto_signature.html
@@ -0,0 +1,917 @@
+
+
+
+
+ JSDoc: Module: crypto/signature
+
+
+
+
+
+
+
+
+
+
+
+
+
Module: crypto/signature
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Provides functions for asymmetric signing and signature verification
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ (async, static) parseSignatureParams(algo, signature) → {Promise.<Object>}
+
+
+
+
+
+
+
+
Parse signature in binary form to get the parameters.
+The returned values are only padded for EdDSA, since in the other cases their expected length
+depends on the key params, hence we delegate the padding to the signature verification function.
+See RFC 4880 9.1
+See RFC 4880 5.2.2.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+module:enums.publicKey
+
+
+
+
+
+
+
+
+
+ Public key algorithm
+
+
+
+
+
+
+ signature
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Data for which the signature was created
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
True if signature is valid.
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<Object>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) sign(algo, hashAlgo, publicKeyParams, privateKeyParams, data, hashed) → {Promise.<Object>}
+
+
+
+
+
+
+
+
Creates a signature on data using specified algorithms and private key parameters.
+See RFC 4880 9.1
+and RFC 4880 9.4
+for public key and hash algorithms.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+module:enums.publicKey
+
+
+
+
+
+
+
+
+
+ Public key algorithm
+
+
+
+
+
+
+ hashAlgo
+
+
+
+
+
+module:enums.hash
+
+
+
+
+
+
+
+
+
+ Hash algorithm
+
+
+
+
+
+
+ publicKeyParams
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+ Algorithm-specific public and private key parameters
+
+
+
+
+
+
+ privateKeyParams
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+ Algorithm-specific public and private key parameters
+
+
+
+
+
+
+ data
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Data to be signed
+
+
+
+
+
+
+ hashed
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ The hashed data
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Signature Object containing named signature parameters.
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<Object>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async, static) verify(algo, hashAlgo, signature, publicParams, data, hashed) → {Promise.<Boolean>}
+
+
+
+
+
+
+
+
Verifies the signature provided for data using specified algorithms and public key parameters.
+See RFC 4880 9.1
+and RFC 4880 9.4
+for public key and hash algorithms.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ algo
+
+
+
+
+
+module:enums.publicKey
+
+
+
+
+
+
+
+
+
+ Public key algorithm
+
+
+
+
+
+
+ hashAlgo
+
+
+
+
+
+module:enums.hash
+
+
+
+
+
+
+
+
+
+ Hash algorithm
+
+
+
+
+
+
+ signature
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+ Named algorithm-specific signature parameters
+
+
+
+
+
+
+ publicParams
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+ Algorithm-specific public key parameters
+
+
+
+
+
+
+ data
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ Data for which the signature was created
+
+
+
+
+
+
+ hashed
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ The hashed data
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
True if signature is valid.
+
+
+
+
+
+
+ Type
+
+
+
+Promise.<Boolean>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Functions Modules Classes
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-encoding_base64.html b/docs/module-encoding_base64.html
new file mode 100644
index 00000000..11035aa0
--- /dev/null
+++ b/docs/module-encoding_base64.html
@@ -0,0 +1,769 @@
+
+
+
+
+ JSDoc: Module: encoding/base64
+
+
+
+
+
+
+
+
+
+
+
+
+
Module: encoding/base64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ (static) b64ToUint8Array(base64) → {Uint8Array}
+
+
+
+
+
+
+
+
Convert a Base-64 encoded string an array of 8-bit integer
+
Note: accepts both Radix-64 and URL-safe strings
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ base64
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+ Base-64 encoded string to convert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
An array of 8-bit integers.
+
+
+
+
+
+
+ Type
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) decode(data) → {Uint8Array|ReadableStream.<Uint8Array>}
+
+
+
+
+
+
+
+
Convert radix-64 to binary array
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+String
+|
+
+ReadableStream.<String>
+
+
+
+
+
+
+
+
+
+ Radix-64 string to convert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Binary array version of input string.
+
+
+
+
+
+
+ Type
+
+
+
+Uint8Array
+|
+
+ReadableStream.<Uint8Array>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) encode(data) → {String|ReadableStream.<String>}
+
+
+
+
+
+
+
+
Convert binary array to radix-64
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+Uint8Array
+|
+
+ReadableStream.<Uint8Array>
+
+
+
+
+
+
+
+
+
+ Uint8Array to convert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Radix-64 version of input string.
+
+
+
+
+
+
+ Type
+
+
+
+String
+|
+
+ReadableStream.<String>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) uint8ArrayToB64(bytes, url) → {String}
+
+
+
+
+
+
+
+
Convert an array of 8-bit integer to a Base-64 encoded string
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ bytes
+
+
+
+
+
+Uint8Array
+
+
+
+
+
+
+
+
+
+ An array of 8-bit integers to convert
+
+
+
+
+
+
+ url
+
+
+
+
+
+bool
+
+
+
+
+
+
+
+
+
+ If true, output is URL-safe
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Base-64 encoded string.
+
+
+
+
+
+
+ Type
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Functions Modules Classes
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-enums.html b/docs/module-enums.html
index 848ff729..af3da952 100644
--- a/docs/module-enums.html
+++ b/docs/module-enums.html
@@ -148,6 +148,29 @@
+
+
+
+
+
+
+
+ gcm
+
+
+
+
+
+Integer
+
+
+
+
+
+
+
+
+
@@ -212,7 +235,7 @@
Source:
@@ -476,7 +499,7 @@
Source:
@@ -671,7 +694,7 @@
Source:
@@ -1924,7 +1947,7 @@
Source:
@@ -2068,6 +2091,29 @@ fingerprint format
+
+
+
+ seipdv2
+
+
+
+
+
+Integer
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -2105,7 +2151,7 @@ fingerprint format
Source:
@@ -2328,6 +2374,52 @@ fingerprint format
+
+
+
+
+
+
+
+ sha3_256
+
+
+
+
+
+Integer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ sha3_512
+
+
+
+
+
+Integer
+
+
+
+
+
+
+
+
+
@@ -2369,7 +2461,7 @@ fingerprint format
Source:
@@ -2635,7 +2727,7 @@ possession of more than one person.
Source:
@@ -2830,7 +2922,7 @@ possession of more than one person.
Source:
@@ -3306,6 +3398,29 @@ possession of more than one person.
+
+
+
+
+
+
+
+ padding
+
+
+
+
+
+Integer
+
+
+
+
+
+
+
+
+
@@ -3347,7 +3462,7 @@ possession of more than one person.
Source:
@@ -3599,52 +3714,6 @@ possession of more than one person.
-
-
- ed25519Legacy
-
-
-
-
-
-Integer
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- eddsa
-
-
-
-
-
-Integer
-
-
-
-
-
-
-
-
-
-
-
-
-
-
aedh
@@ -3819,7 +3888,7 @@ possession of more than one person.
Source:
@@ -4037,7 +4106,7 @@ possession of more than one person.
Source:
@@ -4168,6 +4237,29 @@ possession of more than one person.
+
+
+
+
+
+
+
+ argon2
+
+
+
+
+
+Integer
+
+
+
+
+
+
+
+
+
@@ -4232,7 +4324,7 @@ possession of more than one person.
Source:
@@ -4749,7 +4841,7 @@ document) that cannot include a target subpacket.
Source:
@@ -5048,7 +5140,7 @@ document) that cannot include a target subpacket.
- issuer
+ issuerKeyID
@@ -5409,6 +5501,29 @@ document) that cannot include a target subpacket.
+
+
+
+
+
+
+
+ preferredCipherSuites
+
+
+
+
+
+Integer
+
+
+
+
+
+
+
+
+
@@ -5450,7 +5565,7 @@ document) that cannot include a target subpacket.
Source:
@@ -5517,29 +5632,6 @@ document) that cannot include a target subpacket.
-
-
- plaintext
-
-
-
-
-
-Integer
-
-
-
-
-
-
-
-
-
-
-
-
-
-
idea
@@ -5760,7 +5852,7 @@ document) that cannot include a target subpacket.
Source:
@@ -5956,7 +6048,7 @@ document) that cannot include a target subpacket.
Source:
@@ -6110,7 +6202,7 @@ document) that cannot include a target subpacket.
Source:
@@ -6326,7 +6418,7 @@ document) that cannot include a target subpacket.
Source:
@@ -6423,13 +6515,13 @@ document) that cannot include a target subpacket.
- Functions Modules Classes
+ Functions Modules Classes
diff --git a/docs/module-key_Subkey-Subkey.html b/docs/module-key_Subkey-Subkey.html
index 5f486957..87f2ab7f 100644
--- a/docs/module-key_Subkey-Subkey.html
+++ b/docs/module-key_Subkey-Subkey.html
@@ -28,7 +28,8 @@