diff --git a/docs/AEADEncryptedDataPacket.html b/docs/AEADEncryptedDataPacket.html index 4eb62b15..088bb2aa 100644 --- a/docs/AEADEncryptedDataPacket.html +++ b/docs/AEADEncryptedDataPacket.html @@ -98,7 +98,7 @@ AEAD Protected Data Packet

Source:
@@ -200,7 +200,7 @@ AEAD Protected Data Packet

Source:
@@ -270,7 +270,7 @@ AEAD Protected Data Packet

Source:
@@ -475,7 +475,7 @@ AEAD Protected Data Packet

Source:
@@ -717,7 +717,7 @@ AEAD Protected Data Packet

Source:
@@ -888,7 +888,7 @@ AEAD Protected Data Packet

Source:
@@ -1007,7 +1007,7 @@ AEAD Protected Data Packet

Source:
@@ -1078,13 +1078,13 @@ AEAD Protected Data Packet


diff --git a/docs/Argon2S2K.html b/docs/Argon2S2K.html deleted file mode 100644 index d966a333..00000000 --- a/docs/Argon2S2K.html +++ /dev/null @@ -1,986 +0,0 @@ - - - - - JSDoc: Class: Argon2S2K - - - - - - - - - - -
- -

Class: Argon2S2K

- - - - - - -
- -
- -

Argon2S2K(configopt)

- - -
- -
-
- - - - - - -

new Argon2S2K(configopt)

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
config - - -Object - - - - - - <optional>
- - - - - -

Full configuration, defaults to openpgp.config

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - -

Members

- - - -

encodedM :Integer

- - - - -
-

exponent indicating memory size

-
- - - -
Type:
-
    -
  • - -Integer - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

p :Integer

- - - - -
-

degree of parallelism (lanes)

-
- - - -
Type:
-
    -
  • - -Integer - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

salt :Uint8Array

- - - - -
-

16 bytes of salt

-
- - - -
Type:
-
    -
  • - -Uint8Array - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

t :Integer

- - - - -
-

number of passes

-
- - - -
Type:
-
    -
  • - -Integer - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - -

Methods

- - - - - - - -

(async) produceKey(passphrase) → {Promise.<Uint8Array>}

- - - - - - -
-

Produces a key using the specified passphrase and the defined -hashAlgorithm

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
passphrase - - -String - - - -

Passphrase containing user input

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
Throws:
- - - -
- - -Argon2OutOfMemoryError -| - -Errors - - - -
- - - - - -
Returns:
- - -
-

Produced key with a length corresponding to keySize

-
- - - -
-
- Type -
-
- -Promise.<Uint8Array> - - -
-
- - - - - - - - - - - - - -

read(bytes) → {Integer}

- - - - - - -
-

Parsing function for argon2 string-to-key specifier.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
bytes - - -Uint8Array - - - -

Payload of argon2 string-to-key specifier

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

Actual length of the object.

-
- - - -
-
- Type -
-
- -Integer - - -
-
- - - - - - - - - - - - - -

write() → {Uint8Array}

- - - - - - -
-

Serializes s2k information

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

Binary representation of s2k.

-
- - - -
-
- Type -
-
- -Uint8Array - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/CleartextMessage.html b/docs/CleartextMessage.html index 179a88db..cb174726 100644 --- a/docs/CleartextMessage.html +++ b/docs/CleartextMessage.html @@ -168,7 +168,7 @@ See https://tools.ietf.o
Source:
@@ -346,7 +346,7 @@ See https://tools.ietf.o
Source:
@@ -407,7 +407,7 @@ See https://tools.ietf.o -

getSigningKeyIDs() → {Array.<module:type/keyid~KeyID>}

+

getSigningKeyIDs() → {Array.<module:type/keyid~KeyID>}

@@ -461,7 +461,7 @@ See https://tools.ietf.o
Source:
@@ -501,7 +501,7 @@ See https://tools.ietf.o
-Array.<module:type/keyid~KeyID> +Array.<module:type/keyid~KeyID>
@@ -573,7 +573,7 @@ See https://tools.ietf.o
Source:
@@ -794,7 +794,7 @@ See https://tools.ietf.o -Array.<module:type/keyid~KeyID> +Array.<module:type/keyid~KeyID> @@ -1046,7 +1046,7 @@ See https://tools.ietf.o
Source:
@@ -1104,7 +1104,7 @@ See https://tools.ietf.o -

(async) verify(keys, dateopt, configopt) → {Promise.<Array.<{keyID: module:type/keyid~KeyID, signature: Promise.<Signature>, verified: Promise.<true>}>>}

+

(async) verify(keys, dateopt, configopt) → {Promise.<Array.<{keyID: module:type/keyid~KeyID, signature: Promise.<Signature>, verified: Promise.<true>}>>}

@@ -1283,7 +1283,7 @@ See https://tools.ietf.o
Source:
@@ -1323,7 +1323,7 @@ See https://tools.ietf.o
-Promise.<Array.<{keyID: module:type/keyid~KeyID, signature: Promise.<Signature>, verified: Promise.<true>}>> +Promise.<Array.<{keyID: module:type/keyid~KeyID, signature: Promise.<Signature>, verified: Promise.<true>}>>
@@ -1351,13 +1351,13 @@ See https://tools.ietf.o
diff --git a/docs/CompressedDataPacket.html b/docs/CompressedDataPacket.html index 35baed3d..5c89e44e 100644 --- a/docs/CompressedDataPacket.html +++ b/docs/CompressedDataPacket.html @@ -160,7 +160,7 @@ a Signature or One-Pass Signature packet, and contains a literal data packet.

Source:
@@ -266,7 +266,7 @@ a Signature or One-Pass Signature packet, and contains a literal data packet.

Source:
@@ -343,7 +343,7 @@ a Signature or One-Pass Signature packet, and contains a literal data packet.

Source:
@@ -417,7 +417,7 @@ a Signature or One-Pass Signature packet, and contains a literal data packet.

Source:
@@ -499,7 +499,7 @@ a Signature or One-Pass Signature packet, and contains a literal data packet.

Source:
@@ -651,7 +651,7 @@ read by read_packet

Source:
@@ -836,7 +836,7 @@ read by read_packet

Source:
@@ -926,7 +926,7 @@ read by read_packet

Source:
@@ -997,13 +997,13 @@ read by read_packet


diff --git a/docs/Key.html b/docs/Key.html index 6548b40a..dd1e80a5 100644 --- a/docs/Key.html +++ b/docs/Key.html @@ -96,7 +96,7 @@ Can contain additional subkeys, signatures, user ids, user attributes.

Source:
@@ -333,7 +333,7 @@ if it is a valid revocation signature.

Source:
@@ -514,7 +514,7 @@ if it is a valid revocation signature.

Source:
@@ -626,7 +626,7 @@ if it is a valid revocation signature.

Source:
@@ -738,7 +738,7 @@ if it is a valid revocation signature.

Source:
@@ -844,7 +844,7 @@ if it is a valid revocation signature.

-module:type/keyid~KeyID +module:type/keyid~KeyID @@ -1006,7 +1006,7 @@ if it is a valid revocation signature.

Source:
@@ -1225,7 +1225,7 @@ Returns Infinity if the key doesn't expire, or null if
Source:
@@ -1333,7 +1333,7 @@ Returns Infinity if the key doesn't expire, or null if
Source:
@@ -1391,7 +1391,7 @@ Returns Infinity if the key doesn't expire, or null if -

getKeyID() → {module:type/keyid~KeyID}

+

getKeyID() → {module:type/keyid~KeyID}

@@ -1445,7 +1445,7 @@ Returns Infinity if the key doesn't expire, or null if
Source:
@@ -1485,7 +1485,7 @@ Returns Infinity if the key doesn't expire, or null if
-module:type/keyid~KeyID +module:type/keyid~KeyID
@@ -1503,7 +1503,7 @@ Returns Infinity if the key doesn't expire, or null if -

getKeyIDs() → {Array.<module:type/keyid~KeyID>}

+

getKeyIDs() → {Array.<module:type/keyid~KeyID>}

@@ -1557,7 +1557,7 @@ Returns Infinity if the key doesn't expire, or null if
Source:
@@ -1593,7 +1593,7 @@ Returns Infinity if the key doesn't expire, or null if
-Array.<module:type/keyid~KeyID> +Array.<module:type/keyid~KeyID>
@@ -1735,7 +1735,7 @@ If no keyID is given, returns all keys, starting with the primary key.

Source:
@@ -1977,7 +1977,7 @@ algorithm preferences, and so on.

Source:
@@ -2220,7 +2220,7 @@ algorithm preferences, and so on.

Source:
@@ -2425,7 +2425,7 @@ algorithm preferences, and so on.

Source:
@@ -2537,7 +2537,7 @@ algorithm preferences, and so on.

-module:type/keyid~KeyID +module:type/keyid~KeyID @@ -2717,7 +2717,7 @@ algorithm preferences, and so on.

Source:
@@ -2911,7 +2911,7 @@ If no keyID is given, returns all subkeys.

Source:
@@ -3023,7 +3023,7 @@ If no keyID is given, returns all subkeys.

Source:
@@ -3135,7 +3135,7 @@ If no keyID is given, returns all subkeys.

Source:
@@ -3412,7 +3412,7 @@ If no keyID is given, returns all subkeys.

Source:
@@ -3596,7 +3596,7 @@ If no keyID is given, returns all subkeys.

Source:
@@ -3811,7 +3811,7 @@ If no keyID is given, returns all subkeys.

Source:
@@ -4081,7 +4081,7 @@ If no keyID is given, returns all subkeys.

Source:
@@ -4193,7 +4193,7 @@ If no keyID is given, returns all subkeys.

Source:
@@ -4434,7 +4434,7 @@ a private key is returned.

Source:
@@ -4492,7 +4492,7 @@ a private key is returned.

-

(async) verifyAllUsers(verificationKeysopt, dateopt, configopt) → {Promise.<Array.<{userID: String, keyID: module:type/keyid~KeyID, valid: (Boolean|null)}>>}

+

(async) verifyAllUsers(verificationKeysopt, dateopt, configopt) → {Promise.<Array.<{userID: String, keyID: module:type/keyid~KeyID, valid: (Boolean|null)}>>}

@@ -4677,7 +4677,7 @@ a private key is returned.

Source:
@@ -4718,7 +4718,7 @@ Signature validity is null if the verification keys do not correspond to the cer
-Promise.<Array.<{userID: String, keyID: module:type/keyid~KeyID, valid: (Boolean|null)}>> +Promise.<Array.<{userID: String, keyID: module:type/keyid~KeyID, valid: (Boolean|null)}>>
@@ -4918,7 +4918,7 @@ and valid self signature. Throws if the primary key is invalid.

Source:
@@ -4983,7 +4983,7 @@ and valid self signature. Throws if the primary key is invalid.

-

(async) verifyPrimaryUser(verificationKeysopt, dateopt, userIDopt, configopt) → {Promise.<Array.<{keyID: module:type/keyid~KeyID, valid: (Boolean|null)}>>}

+

(async) verifyPrimaryUser(verificationKeysopt, dateopt, userIDopt, configopt) → {Promise.<Array.<{keyID: module:type/keyid~KeyID, valid: (Boolean|null)}>>}

@@ -5201,7 +5201,7 @@ and valid self signature. Throws if the primary key is invalid.

Source:
@@ -5242,7 +5242,7 @@ Signature validity is null if the verification keys do not correspond to the cer
-Promise.<Array.<{keyID: module:type/keyid~KeyID, valid: (Boolean|null)}>> +Promise.<Array.<{keyID: module:type/keyid~KeyID, valid: (Boolean|null)}>>
@@ -5314,7 +5314,7 @@ Signature validity is null if the verification keys do not correspond to the cer
Source:
@@ -5382,13 +5382,13 @@ Signature validity is null if the verification keys do not correspond to the cer
diff --git a/docs/LiteralDataPacket.html b/docs/LiteralDataPacket.html index 8af9131a..9c98088a 100644 --- a/docs/LiteralDataPacket.html +++ b/docs/LiteralDataPacket.html @@ -147,7 +147,7 @@ further interpreted.

Source:
@@ -326,7 +326,7 @@ further interpreted.

Source:
@@ -441,7 +441,7 @@ further interpreted.

Source:
@@ -623,7 +623,7 @@ with normalized end of line to \n

Source:
@@ -790,7 +790,7 @@ with normalized end of line to \n

Source:
@@ -977,7 +977,7 @@ with normalized end of line to \n

Source:
@@ -1116,7 +1116,7 @@ with normalized end of line to \n

Source:
@@ -1302,7 +1302,7 @@ will be normalized to \r\n and by default text is converted to UTF8

Source:
@@ -1392,7 +1392,7 @@ will be normalized to \r\n and by default text is converted to UTF8

Source:
@@ -1507,7 +1507,7 @@ will be normalized to \r\n and by default text is converted to UTF8

Source:
@@ -1575,13 +1575,13 @@ will be normalized to \r\n and by default text is converted to UTF8


diff --git a/docs/MarkerPacket.html b/docs/MarkerPacket.html index 30e82bae..ceb3d3db 100644 --- a/docs/MarkerPacket.html +++ b/docs/MarkerPacket.html @@ -106,7 +106,7 @@ software is necessary to process the message.

Source:
@@ -265,7 +265,7 @@ software is necessary to process the message.

Source:
@@ -333,13 +333,13 @@ software is necessary to process the message.


diff --git a/docs/Message.html b/docs/Message.html index 91a75dd5..a05cb8e8 100644 --- a/docs/Message.html +++ b/docs/Message.html @@ -146,7 +146,7 @@ See https://tools.iet
Source:
@@ -209,788 +209,6 @@ See https://tools.iet -

(async, static) encryptSessionKey(sessionKey, algorithmName, aeadAlgorithmNameopt, encryptionKeysopt, passwordsopt, wildcardopt, encryptionKeyIDsopt, dateopt, userIDsopt, configopt) → {Promise.<Message>}

- - - - - - -
-

Encrypt a session key either with public keys, passwords, or both at once.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
sessionKey - - -Uint8Array - - - - - - - - - - - -

session key for encryption

algorithmName - - -String - - - - - - - - - - - -

session key algorithm

aeadAlgorithmName - - -String - - - - - - <optional>
- - - - - -
- -

AEAD algorithm, e.g. 'eax' or 'ocb'

encryptionKeys - - -Array.<PublicKey> - - - - - - <optional>
- - - - - -
- -

Public key(s) for message encryption

passwords - - -Array.<String> - - - - - - <optional>
- - - - - -
- -

For message encryption

wildcard - - -Boolean - - - - - - <optional>
- - - - - -
- - false - -

Use a key ID of 0 instead of the public key IDs

encryptionKeyIDs - - -Array.<module:type/keyid~KeyID> - - - - - - <optional>
- - - - - -
- -

Array of key IDs to use for encryption. Each encryptionKeyIDs[i] corresponds to encryptionKeys[i]

date - - -Date - - - - - - <optional>
- - - - - -
- -

Override the date

userIDs - - -Array - - - - - - <optional>
- - - - - -
- -

User IDs to encrypt for, e.g. [{ name:'Robert Receiver', email:'robert@openpgp.org' }]

config - - -Object - - - - - - <optional>
- - - - - -
- -

Full configuration, defaults to openpgp.config

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

New message with encrypted content.

-
- - - -
-
- Type -
-
- -Promise.<Message> - - -
-
- - - - - - - - - - - - - -

(async, static) generateSessionKey(encryptionKeysopt, dateopt, userIDsopt, configopt) → {Promise.<{data: Uint8Array, algorithm: String, aeadAlgorithm: (undefined|String)}>}

- - - - - - -
-

Generate a new session key object, taking the algorithm preferences of the passed encryption keys into account, if any.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
encryptionKeys - - -Array.<PublicKey> - - - - - - <optional>
- - - - - -

Public key(s) to select algorithm preferences for

date - - -Date - - - - - - <optional>
- - - - - -

Date to select algorithm preferences at

userIDs - - -Array.<Object> - - - - - - <optional>
- - - - - -

User IDs to select algorithm preferences for

config - - -Object - - - - - - <optional>
- - - - - -

Full configuration, defaults to openpgp.config

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

Object with session key data and algorithms.

-
- - - -
-
- Type -
-
- -Promise.<{data: Uint8Array, algorithm: String, aeadAlgorithm: (undefined|String)}> - - -
-
- - - - - - - - - - - - -

(async) appendSignature(detachedSignature, configopt)

@@ -1140,7 +358,7 @@ See https://tools.iet
Source:
@@ -1291,7 +509,7 @@ See https://tools.iet
Source:
@@ -1495,7 +713,7 @@ See https://tools.iet
Source:
@@ -1800,7 +1018,7 @@ See https://tools.iet
Source:
@@ -2105,7 +1323,7 @@ See https://tools.iet
Source:
@@ -2367,7 +1585,7 @@ See https://tools.iet -Array.<module:type/keyid~KeyID> +Array.<module:type/keyid~KeyID> @@ -2545,7 +1763,7 @@ See https://tools.iet
Source:
@@ -2603,7 +1821,7 @@ See https://tools.iet -

getEncryptionKeyIDs() → {Array.<module:type/keyid~KeyID>}

+

getEncryptionKeyIDs() → {Array.<module:type/keyid~KeyID>}

@@ -2657,7 +1875,7 @@ See https://tools.iet
Source:
@@ -2697,7 +1915,7 @@ See https://tools.iet
-Array.<module:type/keyid~KeyID> +Array.<module:type/keyid~KeyID>
@@ -2769,7 +1987,7 @@ See https://tools.iet
Source:
@@ -2884,7 +2102,7 @@ See https://tools.iet
Source:
@@ -2945,7 +2163,7 @@ See https://tools.iet -

getSigningKeyIDs() → {Array.<module:type/keyid~KeyID>}

+

getSigningKeyIDs() → {Array.<module:type/keyid~KeyID>}

@@ -2999,7 +2217,7 @@ See https://tools.iet
Source:
@@ -3039,7 +2257,7 @@ See https://tools.iet
-Array.<module:type/keyid~KeyID> +Array.<module:type/keyid~KeyID>
@@ -3111,7 +2329,7 @@ See https://tools.iet
Source:
@@ -3335,7 +2553,7 @@ See https://tools.iet -Array.<module:type/keyid~KeyID> +Array.<module:type/keyid~KeyID> @@ -3587,7 +2805,7 @@ See https://tools.iet
Source:
@@ -3808,7 +3026,7 @@ See https://tools.iet -Array.<module:type/keyid~KeyID> +Array.<module:type/keyid~KeyID> @@ -4060,7 +3278,7 @@ See https://tools.iet
Source:
@@ -4172,7 +3390,7 @@ See https://tools.iet
Source:
@@ -4230,7 +3448,7 @@ See https://tools.iet -

(async) verify(verificationKeys, dateopt, configopt) → {Promise.<Array.<{keyID: module:type/keyid~KeyID, signature: Promise.<Signature>, verified: Promise.<true>}>>}

+

(async) verify(verificationKeys, dateopt, configopt) → {Promise.<Array.<{keyID: module:type/keyid~KeyID, signature: Promise.<Signature>, verified: Promise.<true>}>>}

@@ -4409,7 +3627,7 @@ See https://tools.iet
Source:
@@ -4449,7 +3667,7 @@ See https://tools.iet
-Promise.<Array.<{keyID: module:type/keyid~KeyID, signature: Promise.<Signature>, verified: Promise.<true>}>> +Promise.<Array.<{keyID: module:type/keyid~KeyID, signature: Promise.<Signature>, verified: Promise.<true>}>>
@@ -4467,7 +3685,7 @@ See https://tools.iet -

(async) verifyDetached(verificationKeys, signature, date, configopt) → {Promise.<Array.<{keyID: module:type/keyid~KeyID, signature: Promise.<Signature>, verified: Promise.<true>}>>}

+

(async) verifyDetached(verificationKeys, signature, date, configopt) → {Promise.<Array.<{keyID: module:type/keyid~KeyID, signature: Promise.<Signature>, verified: Promise.<true>}>>}

@@ -4675,7 +3893,7 @@ See https://tools.iet
Source:
@@ -4715,7 +3933,7 @@ See https://tools.iet
-Promise.<Array.<{keyID: module:type/keyid~KeyID, signature: Promise.<Signature>, verified: Promise.<true>}>> +Promise.<Array.<{keyID: module:type/keyid~KeyID, signature: Promise.<Signature>, verified: Promise.<true>}>>
@@ -4787,7 +4005,7 @@ See https://tools.iet
Source:
@@ -4840,6 +4058,788 @@ See https://tools.iet + + + + + +

(async, static) encryptSessionKey(sessionKey, algorithmName, aeadAlgorithmNameopt, encryptionKeysopt, passwordsopt, wildcardopt, encryptionKeyIDsopt, dateopt, userIDsopt, configopt) → {Promise.<Message>}

+ + + + + + +
+

Encrypt a session key either with public keys, passwords, or both at once.

+
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
sessionKey + + +Uint8Array + + + + + + + + + + + +

session key for encryption

algorithmName + + +String + + + + + + + + + + + +

session key algorithm

aeadAlgorithmName + + +String + + + + + + <optional>
+ + + + + +
+ +

AEAD algorithm, e.g. 'eax' or 'ocb'

encryptionKeys + + +Array.<PublicKey> + + + + + + <optional>
+ + + + + +
+ +

Public key(s) for message encryption

passwords + + +Array.<String> + + + + + + <optional>
+ + + + + +
+ +

For message encryption

wildcard + + +Boolean + + + + + + <optional>
+ + + + + +
+ + false + +

Use a key ID of 0 instead of the public key IDs

encryptionKeyIDs + + +Array.<module:type/keyid~KeyID> + + + + + + <optional>
+ + + + + +
+ +

Array of key IDs to use for encryption. Each encryptionKeyIDs[i] corresponds to encryptionKeys[i]

date + + +Date + + + + + + <optional>
+ + + + + +
+ +

Override the date

userIDs + + +Array + + + + + + <optional>
+ + + + + +
+ +

User IDs to encrypt for, e.g. [{ name:'Robert Receiver', email:'robert@openpgp.org' }]

config + + +Object + + + + + + <optional>
+ + + + + +
+ +

Full configuration, defaults to openpgp.config

+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+

New message with encrypted content.

+
+ + + +
+
+ Type +
+
+ +Promise.<Message> + + +
+
+ + + + + + + + + + + + + +

(async, static) generateSessionKey(encryptionKeysopt, dateopt, userIDsopt, configopt) → {Promise.<{data: Uint8Array, algorithm: String, aeadAlgorithm: (undefined|String)}>}

+ + + + + + +
+

Generate a new session key object, taking the algorithm preferences of the passed encryption keys into account, if any.

+
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
encryptionKeys + + +Array.<PublicKey> + + + + + + <optional>
+ + + + + +

Public key(s) to select algorithm preferences for

date + + +Date + + + + + + <optional>
+ + + + + +

Date to select algorithm preferences at

userIDs + + +Array.<Object> + + + + + + <optional>
+ + + + + +

User IDs to select algorithm preferences for

config + + +Object + + + + + + <optional>
+ + + + + +

Full configuration, defaults to openpgp.config

+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+

Object with session key data and algorithms.

+
+ + + +
+
+ Type +
+
+ +Promise.<{data: Uint8Array, algorithm: String, aeadAlgorithm: (undefined|String)}> + + +
+
+ + + + + + + + @@ -4855,13 +4855,13 @@ See https://tools.iet
diff --git a/docs/OnePassSignaturePacket.html b/docs/OnePassSignaturePacket.html index b302077d..d403a21e 100644 --- a/docs/OnePassSignaturePacket.html +++ b/docs/OnePassSignaturePacket.html @@ -101,7 +101,7 @@ can compute the entire signed message in one pass.

Source:
@@ -199,7 +199,7 @@ that describes another signature to be applied to the same message data.

Source:
@@ -273,7 +273,7 @@ that describes another signature to be applied to the same message data.

Source:
@@ -344,7 +344,7 @@ that describes another signature to be applied to the same message data.

Source:
@@ -408,7 +408,7 @@ that describes another signature to be applied to the same message data.

Source:
@@ -482,7 +482,7 @@ that describes another signature to be applied to the same message data.

Source:
@@ -553,7 +553,7 @@ that describes another signature to be applied to the same message data.

Source:
@@ -629,7 +629,7 @@ Signature types are described in
Source:
@@ -693,7 +693,7 @@ Signature types are described in
Source:
@@ -824,7 +824,7 @@ Signature types are described in
Source:
@@ -936,7 +936,7 @@ Signature types are described in
Source:
@@ -1004,13 +1004,13 @@ Signature types are described in
diff --git a/docs/PacketList.html b/docs/PacketList.html index 32a0ee3e..85966f43 100644 --- a/docs/PacketList.html +++ b/docs/PacketList.html @@ -97,7 +97,7 @@ are stored as numerical indices.

Source:
@@ -164,349 +164,6 @@ are stored as numerical indices.

-

(async, static) fromBinary(bytes, allowedPackets, configopt, grammarValidatoropt, delayErrorsopt) → {PacketList}

- - - - - - -
-

Parses the given binary data and returns a list of packets. -Equivalent to calling read on an empty PacketList instance.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
bytes - - -Uint8Array -| - -ReadableStream.<Uint8Array> - - - - - - - - - - - -

binary data to parse

allowedPackets - - -Object - - - - - - - - - - - -

mapping where keys are allowed packet tags, pointing to their Packet class

config - - -Object - - - - - - <optional>
- - - - - -
- -

full configuration, defaults to openpgp.config

grammarValidator - - -function - - - - - - <optional>
- - - - - -
- - null - -
delayErrors - - -Boolean - - - - - - <optional>
- - - - - -
- - false - -

delay errors until the input stream has been read completely

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
Throws:
- - - -
- -

on parsing errors

- -
- - - - - -
Returns:
- - -
-

parsed list of packets

-
- - - -
-
- Type -
-
- -PacketList - - -
-
- - - - - - - - - - - - -

filterByTag(…tags) → {PacketList}

@@ -622,7 +279,7 @@ Equivalent to calling read on an empty PacketList instance.

Source:
@@ -779,7 +436,7 @@ Equivalent to calling read on an empty PacketList instance.

Source:
@@ -951,7 +608,7 @@ Equivalent to calling read on an empty PacketList instance.

Source:
@@ -1281,7 +938,7 @@ Equivalent to calling read on an empty PacketList instance.

Source:
@@ -1384,7 +1041,7 @@ class instance.

Source:
@@ -1437,6 +1094,349 @@ class instance.

+ + + + + +

(async, static) fromBinary(bytes, allowedPackets, configopt, grammarValidatoropt, delayErrorsopt) → {Promise.<PacketList>}

+ + + + + + +
+

Parses the given binary data and returns a list of packets. +Equivalent to calling read on an empty PacketList instance.

+
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
bytes + + +Uint8Array +| + +ReadableStream.<Uint8Array> + + + + + + + + + + + +

binary data to parse

allowedPackets + + +Object + + + + + + + + + + + +

mapping where keys are allowed packet tags, pointing to their Packet class

config + + +Object + + + + + + <optional>
+ + + + + +
+ +

full configuration, defaults to openpgp.config

grammarValidator + + +function + + + + + + <optional>
+ + + + + +
+ + null + +
delayErrors + + +Boolean + + + + + + <optional>
+ + + + + +
+ + false + +

delay errors until the input stream has been read completely

+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
Throws:
+ + + +
+ +

on parsing errors

+ +
+ + + + + +
Returns:
+ + +
+

parsed list of packets

+
+ + + +
+
+ Type +
+
+ +Promise.<PacketList> + + +
+
+ + + + + + + + @@ -1452,13 +1452,13 @@ class instance.


diff --git a/docs/PaddingPacket.html b/docs/PaddingPacket.html index 5bd37d82..183cbf3f 100644 --- a/docs/PaddingPacket.html +++ b/docs/PaddingPacket.html @@ -97,7 +97,7 @@ Padding Packet

Source:
@@ -256,7 +256,7 @@ Padding Packet

Source:
@@ -427,7 +427,7 @@ Padding Packet

Source:
@@ -517,7 +517,7 @@ Padding Packet

Source:
@@ -585,13 +585,13 @@ Padding Packet


diff --git a/docs/PrivateKey.html b/docs/PrivateKey.html index 087898e1..10d22614 100644 --- a/docs/PrivateKey.html +++ b/docs/PrivateKey.html @@ -144,7 +144,7 @@
Source:
@@ -453,7 +453,7 @@ Note: Curve448 and Curve25519 are not widely supported yet.

Source:
@@ -622,7 +622,7 @@ Note: Curve448 and Curve25519 are not widely supported yet.

Source:
@@ -734,7 +734,7 @@ Note: Curve448 and Curve25519 are not widely supported yet.

Source:
@@ -823,7 +823,7 @@ This is useful to retrieve keys for session key decryption

-module:type/keyid~KeyID +module:type/keyid~KeyID @@ -979,7 +979,7 @@ This is useful to retrieve keys for session key decryption

Source:
@@ -1121,7 +1121,7 @@ A dummy key is considered encrypted.

Source:
@@ -1211,7 +1211,7 @@ A dummy key is considered encrypted.

Source:
@@ -1514,7 +1514,7 @@ A dummy key is considered encrypted.

Source:
@@ -1626,7 +1626,7 @@ A dummy key is considered encrypted.

Source:
@@ -1803,7 +1803,7 @@ If only gnu-dummy keys are found, we cannot properly validate so we throw an err
Source:
@@ -1878,13 +1878,13 @@ If only gnu-dummy keys are found, we cannot properly validate so we throw an err
diff --git a/docs/PublicKey.html b/docs/PublicKey.html index 9926ea0a..ead846aa 100644 --- a/docs/PublicKey.html +++ b/docs/PublicKey.html @@ -144,7 +144,7 @@
Source:
@@ -315,7 +315,7 @@
Source:
@@ -427,7 +427,7 @@
Source:
@@ -535,7 +535,7 @@
Source:
@@ -603,13 +603,13 @@
diff --git a/docs/PublicKeyEncryptedSessionKeyPacket.html b/docs/PublicKeyEncryptedSessionKeyPacket.html index 4d1eb606..2e69962f 100644 --- a/docs/PublicKeyEncryptedSessionKeyPacket.html +++ b/docs/PublicKeyEncryptedSessionKeyPacket.html @@ -107,7 +107,7 @@ decrypt the message.

Source:
@@ -209,7 +209,80 @@ decrypt the message.

Source:
+ + + + + + + + + + + + + + + + +

publicKeyAlgorithm :enums.publicKey|null

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -283,7 +356,7 @@ decrypt the message.

Source:
@@ -458,7 +531,7 @@ This is needed for constant-time processing. Expected object of the form: { sess
Source:
@@ -626,7 +699,7 @@ This is needed for constant-time processing. Expected object of the form: { sess
Source:
@@ -794,7 +867,7 @@ This is needed for constant-time processing. Expected object of the form: { sess
Source:
@@ -884,7 +957,7 @@ This is needed for constant-time processing. Expected object of the form: { sess
Source:
@@ -952,13 +1025,13 @@ This is needed for constant-time processing. Expected object of the form: { sess
diff --git a/docs/PublicKeyPacket.html b/docs/PublicKeyPacket.html index b62f95f4..d4d8ca85 100644 --- a/docs/PublicKeyPacket.html +++ b/docs/PublicKeyPacket.html @@ -195,7 +195,7 @@ key (sometimes called an OpenPGP certificate).

Source:
@@ -301,7 +301,7 @@ key (sometimes called an OpenPGP certificate).

Source:
@@ -375,7 +375,7 @@ key (sometimes called an OpenPGP certificate).

Source:
@@ -449,7 +449,7 @@ key (sometimes called an OpenPGP certificate).

Source:
@@ -523,7 +523,7 @@ key (sometimes called an OpenPGP certificate).

Source:
@@ -541,7 +541,7 @@ key (sometimes called an OpenPGP certificate).

-

keyID :module:type/keyid~KeyID

+

keyID :module:type/keyid~KeyID

@@ -556,7 +556,7 @@ key (sometimes called an OpenPGP certificate).

+ + + + + + + + +

reasonForRevocationString :String|null

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -341,7 +414,7 @@ block of text, and a signature that is a certification of a User ID.

Source:
@@ -423,7 +496,7 @@ block of text, and a signature that is a certification of a User ID.

Source:
@@ -599,7 +672,7 @@ block of text, and a signature that is a certification of a User ID.

Source:
@@ -760,7 +833,7 @@ block of text, and a signature that is a certification of a User ID.

Source:
@@ -1048,7 +1121,7 @@ block of text, and a signature that is a certification of a User ID.

Source:
@@ -1427,7 +1500,7 @@ block of text, and a signature that is a certification of a User ID.

Source:
@@ -1546,7 +1619,7 @@ block of text, and a signature that is a certification of a User ID.

Source:
@@ -1654,7 +1727,7 @@ block of text, and a signature that is a certification of a User ID.

Source:
@@ -1765,7 +1838,7 @@ block of text, and a signature that is a certification of a User ID.

Source:
@@ -1833,13 +1906,13 @@ block of text, and a signature that is a certification of a User ID.


diff --git a/docs/SymEncryptedIntegrityProtectedDataPacket.html b/docs/SymEncryptedIntegrityProtectedDataPacket.html index 2883a641..31241de1 100644 --- a/docs/SymEncryptedIntegrityProtectedDataPacket.html +++ b/docs/SymEncryptedIntegrityProtectedDataPacket.html @@ -101,7 +101,7 @@ packet.

Source:
@@ -203,7 +203,7 @@ packet.

Source:
@@ -273,7 +273,7 @@ packet.

Source:
@@ -478,7 +478,7 @@ packet.

Source:
@@ -738,7 +738,7 @@ packet.

Source:
@@ -831,13 +831,13 @@ packet.


diff --git a/docs/SymEncryptedSessionKeyPacket.html b/docs/SymEncryptedSessionKeyPacket.html index 1658831d..c2b8ce5f 100644 --- a/docs/SymEncryptedSessionKeyPacket.html +++ b/docs/SymEncryptedSessionKeyPacket.html @@ -165,7 +165,7 @@ the Symmetric-Key Encrypted Session Key packet.

Source:
@@ -271,7 +271,7 @@ the Symmetric-Key Encrypted Session Key packet.

Source:
@@ -345,7 +345,7 @@ the Symmetric-Key Encrypted Session Key packet.

Source:
@@ -419,7 +419,7 @@ the Symmetric-Key Encrypted Session Key packet.

Source:
@@ -550,7 +550,7 @@ the Symmetric-Key Encrypted Session Key packet.

Source:
@@ -761,7 +761,7 @@ the Symmetric-Key Encrypted Session Key packet.

Source:
@@ -929,7 +929,7 @@ the Symmetric-Key Encrypted Session Key packet.

Source:
@@ -1019,7 +1019,7 @@ the Symmetric-Key Encrypted Session Key packet.

Source:
@@ -1087,13 +1087,13 @@ the Symmetric-Key Encrypted Session Key packet.


diff --git a/docs/SymmetricallyEncryptedDataPacket.html b/docs/SymmetricallyEncryptedDataPacket.html index 9423f199..bb651d7c 100644 --- a/docs/SymmetricallyEncryptedDataPacket.html +++ b/docs/SymmetricallyEncryptedDataPacket.html @@ -101,7 +101,7 @@ that form whole OpenPGP messages).

Source:
@@ -197,7 +197,7 @@ that form whole OpenPGP messages).

Source:
@@ -271,7 +271,7 @@ that form whole OpenPGP messages).

Source:
@@ -477,7 +477,7 @@ See RFC 4880 9.2 f
Source:
@@ -720,7 +720,7 @@ See RFC 4880 9.2 f
Source:
@@ -795,13 +795,13 @@ See RFC 4880 9.2 f
diff --git a/docs/TrustPacket.html b/docs/TrustPacket.html index 5e5579f3..2beadd6e 100644 --- a/docs/TrustPacket.html +++ b/docs/TrustPacket.html @@ -105,7 +105,7 @@ other than local keyring files.

Source:
@@ -216,7 +216,7 @@ Currently not implemented as we ignore trust packets

Source:
@@ -262,13 +262,13 @@ Currently not implemented as we ignore trust packets


diff --git a/docs/UserAttributePacket.html b/docs/UserAttributePacket.html index 48bad660..ea3a89fd 100644 --- a/docs/UserAttributePacket.html +++ b/docs/UserAttributePacket.html @@ -107,7 +107,7 @@ an implementation may use any method desired.

Source:
@@ -266,7 +266,7 @@ an implementation may use any method desired.

Source:
@@ -427,7 +427,7 @@ an implementation may use any method desired.

Source:
@@ -517,7 +517,7 @@ an implementation may use any method desired.

Source:
@@ -585,13 +585,13 @@ an implementation may use any method desired.


diff --git a/docs/UserIDPacket.html b/docs/UserIDPacket.html index 91ef83f7..74340f8d 100644 --- a/docs/UserIDPacket.html +++ b/docs/UserIDPacket.html @@ -100,7 +100,7 @@ specifies the length of the User ID.

Source:
@@ -207,7 +207,7 @@ John Doe john@example.com

Source:
@@ -235,163 +235,6 @@ John Doe john@example.com

-

(static) fromObject(userID) → {UserIDPacket}

- - - - - - -
-

Create UserIDPacket instance from object

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
userID - - -Object - - - -

Object specifying userID name, email and comment

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -UserIDPacket - - -
-
- - - - - - - - - - - - -

read(input)

@@ -495,7 +338,7 @@ John Doe john@example.com

Source:
@@ -585,7 +428,7 @@ John Doe john@example.com

Source:
@@ -638,6 +481,163 @@ John Doe john@example.com

+ + + + + +

(static) fromObject(userID) → {UserIDPacket}

+ + + + + + +
+

Create UserIDPacket instance from object

+
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
userID + + +Object + + + +

Object specifying userID name, email and comment

+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +UserIDPacket + + +
+
+ + + + + + + + @@ -653,13 +653,13 @@ John Doe john@example.com


diff --git a/docs/global.html b/docs/global.html index 7c9c6cb6..971a5c48 100644 --- a/docs/global.html +++ b/docs/global.html @@ -419,7 +419,7 @@
Source:
@@ -632,7 +632,7 @@
Source:
@@ -662,179 +662,6 @@ - - - - - - -

createKey(packetlist) → {Key}

- - - - - - -
-

Creates a PublicKey or PrivateKey depending on the packetlist in input

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
packetlist - - -PacketList - - - -

packets to parse

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
Throws:
- - - -
- -

if no key packet was found

- -
- - - - - -
Returns:
- - -
-

parsed key

-
- - - -
-
- Type -
-
- -Key - - -
-
- - - - - - - @@ -1180,7 +1007,7 @@
Source:
@@ -1761,7 +1588,7 @@ One of decryptionKeys, sessionkeys or passwords<
Source:
@@ -2064,7 +1891,7 @@ This method does not change the original key.

Source:
@@ -2423,7 +2250,7 @@ One of decryptionKeys or passwords must be specified.<
Source:
@@ -2904,10 +2731,10 @@ must be specified. If signing keys are specified, those will be used to sign the -KeyID +KeyID | -Array.<KeyID> +Array.<KeyID> @@ -2946,10 +2773,10 @@ must be specified. If signing keys are specified, those will be used to sign the -KeyID +KeyID | -Array.<KeyID> +Array.<KeyID> @@ -3227,7 +3054,7 @@ must be specified. If signing keys are specified, those will be used to sign the
Source:
@@ -3515,7 +3342,7 @@ This method does not change the original key.

Source:
@@ -3938,10 +3765,10 @@ At least one of encryptionKeys or passwords must be sp -KeyID +KeyID | -Array.<KeyID> +Array.<KeyID> @@ -4135,7 +3962,7 @@ At least one of encryptionKeys or passwords must be sp
Source:
@@ -4193,224 +4020,6 @@ At least one of encryptionKeys or passwords must be sp -

formatObject(object, format, config) → {String|Uint8Array|Object}

- - - - - - -
-

Convert the object to the given format

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
object - - -Key -| - -Message - - - -
format - - -'armored' -| - -'binary' -| - -'object' - - - -
config - - -Object - - - -

Full configuration

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -String -| - -Uint8Array -| - -Object - - -
-
- - - - - - - - - - - - -

(async) generateKey(options) → {Promise.<Object>}

@@ -4952,7 +4561,7 @@ default to main key options, except for sign parameter that default
Source:
@@ -5302,7 +4911,7 @@ default to main key options, except for sign parameter that default
Source:
@@ -5360,1489 +4969,6 @@ default to main key options, except for sign parameter that default -

getCipherBlockSize(algo)

- - - - - - -
-

Get block size for given cipher algo

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
algo - - -module:enums.symmetric - - - -

alrogithm identifier

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

getCipherKeySize(algo)

- - - - - - -
-

Get key size for given cipher algo

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
algo - - -module:enums.symmetric - - - -

alrogithm identifier

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

getCipherParams(algo)

- - - - - - -
-

Get block and key size for given cipher algo

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
algo - - -module:enums.symmetric - - - -

alrogithm identifier

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

getCompressionStreamInstantiators(compressionFormat) → {Object}

- - - - - - -
-

Get Compression Stream API instatiators if the constructors are implemented. -NB: the return instatiator functions will throw when called if the provided compressionFormat is not supported -(supported formats cannot be determined in advance).

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
compressionFormat - - -'deflate-raw' -| - -'deflate' -| - -'gzip' -| - -string - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Object - - -
-
- - - - - - - - - - - - - -

newPacketFromTag(tag, allowedPackets) → {Object}

- - - - - - -
-

Instantiate a new packet given its tag

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
tag - - -module:enums.packet - - - -

Property value from module:enums.packet

allowedPackets - - -Object - - - -

mapping where keys are allowed packet tags, pointing to their Packet class

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
Throws:
- - - -
-
-
-

for disallowed or unknown packets

-
-
-
-
-
-
- Type -
-
- -Error -| - -UnsupportedError - - -
-
-
-
-
- - - - - -
Returns:
- - -
-

New packet object with type based on tag

-
- - - -
-
- Type -
-
- -Object - - -
-
- - - - - - - - - - - - - -

newS2KFromConfig() → {Object}

- - - - - - -
-

Instantiate a new S2K instance based on the config settings

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
Throws:
- - - -
-
-
-

for unknown or unsupported types

-
-
-
-
-
-
- Type -
-
- -Error - - -
-
-
-
-
- - - - - -
Returns:
- - -
-

New s2k object

-
- - - -
-
- Type -
-
- -Object - - -
-
- - - - - - - - - - - - - -

newS2KFromType(type) → {Object}

- - - - - - -
-

Instantiate a new S2K instance of the given type

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
type - - -module:enums.s2k - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
Throws:
- - - -
-
-
-

for unknown or unsupported types

-
-
-
-
-
-
- Type -
-
- -Error - - -
-
-
-
-
- - - - - -
Returns:
- - -
-

New s2k object

-
- - - -
-
- Type -
-
- -Object - - -
-
- - - - - - - - - - - - - -

(async) produceEncryptionKey(keyVersion, s2k, passphrase, cipherAlgo, aeadModeopt, serializedPacketTagopt, isLegacyAEADopt)

- - - - - - -
-

Derive encryption key

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
keyVersion - - -Number - - - - - - - - - -

key derivation differs for v5 keys

s2k - - -module:type/s2k - - - - - - - - - -
passphrase - - -String - - - - - - - - - -
cipherAlgo - - -module:enums.symmetric - - - - - - - - - -
aeadMode - - -module:enums.aead - - - - - - <optional>
- - - - - -

for AEAD-encrypted keys only (excluding v5)

serializedPacketTag - - -Uint8Array - - - - - - <optional>
- - - - - -

for AEAD-encrypted keys only (excluding v5)

isLegacyAEAD - - -Boolean - - - - - - <optional>
- - - - - -

for AEAD-encrypted keys from RFC4880bis (v4 and v5 only)

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

encryption key

-
- - - - - - - - - - - - - - -

(async) readCleartextMessage(options) → {Promise.<CleartextMessage>}

@@ -7038,7 +5164,7 @@ NB: the return instatiator functions will throw when called if the provided Source:
@@ -7096,582 +5222,6 @@ NB: the return instatiator functions will throw when called if the provided (async) readKey(options) → {Promise.<Key>} - - - - - - -
-

Reads an (optionally armored) OpenPGP key and returns a key object

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
options - - -Object - - - - -
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
armoredKey - - -String - - - - - - <optional>
- - - - - -

Armored key to be parsed

binaryKey - - -Uint8Array - - - - - - <optional>
- - - - - -

Binary key to be parsed

config - - -Object - - - - - - <optional>
- - - - - -

Custom configuration settings to overwrite those in config

- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

Key object.

-
- - - -
-
- Type -
-
- -Promise.<Key> - - -
-
- - - - - - - - - - - - - -

(async) readKeys(options) → {Promise.<Array.<Key>>}

- - - - - - -
-

Reads an (optionally armored) OpenPGP key block and returns a list of key objects

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
options - - -Object - - - - -
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
armoredKeys - - -String - - - - - - <optional>
- - - - - -

Armored keys to be parsed

binaryKeys - - -Uint8Array - - - - - - <optional>
- - - - - -

Binary keys to be parsed

config - - -Object - - - - - - <optional>
- - - - - -

Custom configuration settings to overwrite those in config

- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

Key objects.

-
- - - -
-
- Type -
-
- -Promise.<Array.<Key>> - - -
-
- - - - - - - - - - - - -

(async) readMessage(options) → {Promise.<Message>}

@@ -7966,582 +5516,6 @@ NB: the return instatiator functions will throw when called if the provided (async) readPrivateKey(options) → {Promise.<PrivateKey>} - - - - - - -
-

Reads an (optionally armored) OpenPGP private key and returns a PrivateKey object

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
options - - -Object - - - - -
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
armoredKey - - -String - - - - - - <optional>
- - - - - -

Armored key to be parsed

binaryKey - - -Uint8Array - - - - - - <optional>
- - - - - -

Binary key to be parsed

config - - -Object - - - - - - <optional>
- - - - - -

Custom configuration settings to overwrite those in config

- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

Key object.

-
- - - -
-
- Type -
-
- -Promise.<PrivateKey> - - -
-
- - - - - - - - - - - - - -

(async) readPrivateKeys(options) → {Promise.<Array.<PrivateKey>>}

- - - - - - -
-

Reads an (optionally armored) OpenPGP private key block and returns a list of PrivateKey objects

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
options - - -Object - - - - -
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
armoredKeys - - -String - - - - - - <optional>
- - - - - -

Armored keys to be parsed

binaryKeys - - -Uint8Array - - - - - - <optional>
- - - - - -

Binary keys to be parsed

config - - -Object - - - - - - <optional>
- - - - - -

Custom configuration settings to overwrite those in config

- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

Key objects.

-
- - - -
-
- Type -
-
- -Promise.<Array.<PrivateKey>> - - -
-
- - - - - - - - - - - - -

(async) readSignature(options) → {Promise.<Signature>}

@@ -8772,7 +5746,7 @@ NB: the return instatiator functions will throw when called if the provided Source:
@@ -9234,7 +6208,7 @@ to set the same date as the key creation time to ensure that old message signatu
Source:
@@ -9763,7 +6737,7 @@ If a revocation certificate is passed, the reasonForRevocation parameter will be
Source:
@@ -9823,215 +6797,6 @@ If a revocation certificate is passed, the reasonForRevocation parameter will be -

(async) runAEAD(fn, key, data) → {Promise.<(Uint8Array|ReadableStream.<Uint8Array>)>}

- - - - - - -
-

En/decrypt the payload.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
fn - - -encrypt -| - -decrypt - - - -

Whether to encrypt or decrypt

key - - -Uint8Array - - - -

The session key used to en/decrypt the payload

data - - -Uint8Array -| - -ReadableStream.<Uint8Array> - - - -

The data to en/decrypt

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Promise.<(Uint8Array|ReadableStream.<Uint8Array>)> - - -
-
- - - - - - - - - - - - -

(async) sign(options) → {Promise.<MaybeStream.<(String|Uint8Array)>>}

@@ -10326,10 +7091,10 @@ If a revocation certificate is passed, the reasonForRevocation parameter will be -KeyID +KeyID | -Array.<KeyID> +Array.<KeyID> @@ -10607,7 +7372,7 @@ If a revocation certificate is passed, the reasonForRevocation parameter will be
Source:
@@ -10769,7 +7534,7 @@ the encoded bytes

Source:
@@ -11231,7 +7996,7 @@ an attribute "data" containing a stream of bytes and "type"
Source:
@@ -11298,417 +8063,6 @@ where `signatures` contains a separate entry for each signature packet found in - - - - - -

(async) wrapKeyObject(secretKeyPacket, secretSubkeyPackets, options, config) → {PrivateKey}

- - - - - - -
-

Construct PrivateKey object from the given key packets, add certification signatures and set passphrase protection -The new key includes a revocation certificate that must be removed before returning the key, otherwise the key is considered revoked.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
secretKeyPacket - - -SecretKeyPacket - - - -
secretSubkeyPackets - - -SecretSubkeyPacket - - - -
options - - -Object - - - -
config - - -Object - - - -

Full configuration

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -PrivateKey - - -
-
- - - - - - - - - - - - - -

zlib(compressionStreamInstantiator, ZlibStreamedConstructor) → {ReadableStream.<Uint8Array>}

- - - - - - -
-

Zlib processor relying on Compression Stream API if available, or falling back to fflate otherwise.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
compressionStreamInstantiator - - -function - - - -
ZlibStreamedConstructor - - -FunctionConstructor - - - -

fflate constructor

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

compressed or decompressed data

-
- - - -
-
- Type -
-
- -ReadableStream.<Uint8Array> - - -
-
- - - - - - - - @@ -11724,13 +8078,13 @@ The new key includes a revocation certificate that must be removed before return
diff --git a/docs/index.html b/docs/index.html index 043a6eea..49a5ec84 100644 --- a/docs/index.html +++ b/docs/index.html @@ -714,13 +714,13 @@ and a subkey for encryption using Curve25519.


diff --git a/docs/module-config.html b/docs/module-config.html index f19b407f..c37ebfee 100644 --- a/docs/module-config.html +++ b/docs/module-config.html @@ -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:
@@ -489,7 +489,7 @@ Note: not all OpenPGP implementations are compatible with this option.
Source:
@@ -614,7 +614,7 @@ where key flags were ignored when selecting a key for encryption.

Source:
@@ -733,7 +733,7 @@ and have self-signature's creation date that does not match the primary key crea
Source:
@@ -854,7 +854,7 @@ This is an insecure setting:

Source:
@@ -979,7 +979,7 @@ and deferring checking their integrity until the decrypted stream has been read
Source:
@@ -1091,7 +1091,7 @@ and deferring checking their integrity until the decrypted stream has been read
Source:
@@ -1213,7 +1213,7 @@ See also constantTimePKCS1DecryptionSupportedSymmetricAlgorithms.Source:
@@ -1331,7 +1331,7 @@ However, the more algorithms are added, the slower the decryption procedure beco
Source:
@@ -1451,7 +1451,7 @@ hence parsing them might be necessary in some cases.

Source:
@@ -1564,7 +1564,7 @@ defined in https://www.rfc-editor.org/rfc/rfc9580.html#name-openpgp-messages .Source:
@@ -1676,7 +1676,7 @@ defined in https://www.rfc-editor.org/rfc/rfc9580.html#name-openpgp-messages .Source:
@@ -1788,7 +1788,7 @@ defined in https://www.rfc-editor.org/rfc/rfc9580.html#name-openpgp-messages .Source:
@@ -1905,7 +1905,7 @@ validation error when the notation is marked as critical.

Source:
@@ -2021,7 +2021,7 @@ validation error when the notation is marked as critical.

Source:
@@ -2138,7 +2138,7 @@ The default is 2047 since due to a bug, previous versions of OpenPGP.js could ge
Source:
@@ -2255,7 +2255,7 @@ The default is 2047 since due to a bug, previous versions of OpenPGP.js could ge
Source:
@@ -2372,7 +2372,7 @@ Only has an effect when aeadProtect is set to true.

Source:
@@ -2484,7 +2484,7 @@ Only has an effect when aeadProtect is set to true.

Source:
@@ -2596,7 +2596,7 @@ Only has an effect when aeadProtect is set to true.

Source:
@@ -2708,7 +2708,7 @@ Only has an effect when aeadProtect is set to true.

Source:
@@ -2824,7 +2824,7 @@ Only has an effect when aeadProtect is set to true.

Source:
@@ -2940,7 +2940,7 @@ Only has an effect when aeadProtect is set to true.

Source:
@@ -3056,7 +3056,7 @@ Only has an effect when aeadProtect is set to true.

Source:
@@ -3172,7 +3172,7 @@ Only has an effect when aeadProtect is set to true.

Source:
@@ -3196,7 +3196,7 @@ Only has an effect when aeadProtect is set to true.

-

draft-crypto-refresh 3.7.1.4: +

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"), @@ -3387,7 +3387,7 @@ For more details on the choice of parameters, see https://tools.ietf.org/html/rf

Source:
@@ -3411,7 +3411,7 @@ For more details on the choice of parameters, see https://tools.ietf.org/html/rf
-

RFC4880 3.7.1.3: +

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).

@@ -3506,7 +3506,7 @@ Note: this is the exponent value, not the final number of iterations (refer to s
Source:
@@ -3628,7 +3628,7 @@ Note: Argon2 is the strongest option but not all OpenPGP implementations are com
Source:
@@ -3740,7 +3740,7 @@ Note: Argon2 is the strongest option but not all OpenPGP implementations are com
Source:
@@ -3852,7 +3852,7 @@ Note: Argon2 is the strongest option but not all OpenPGP implementations are com
Source:
@@ -3969,7 +3969,7 @@ When false, certain standard curves will not be supported (depending on the plat
Source:
@@ -4087,7 +4087,7 @@ Note: not all OpenPGP implementations are compatible with this option.
Source:
@@ -4199,7 +4199,7 @@ Note: not all OpenPGP implementations are compatible with this option.
Source:
@@ -4233,13 +4233,13 @@ Note: not all OpenPGP implementations are compatible with this option.

diff --git a/docs/module-crypto.html b/docs/module-crypto.html deleted file mode 100644 index 009b3b5e..00000000 --- a/docs/module-crypto.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - JSDoc: Module: crypto - - - - - - - - - - -
- -

Module: crypto

- - - - - - -
- -
- - - - - -
- - - -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-crypto_aes_kw.html b/docs/module-crypto_aes_kw.html deleted file mode 100644 index 92df3adb..00000000 --- a/docs/module-crypto_aes_kw.html +++ /dev/null @@ -1,604 +0,0 @@ - - - - - JSDoc: Module: crypto/aes_kw - - - - - - - - - - -
- -

Module: crypto/aes_kw

- - - - - - -
- -
- - - - - -
- -
-
- - -

Implementation of RFC 3394 AES Key Wrap & Key Unwrap funcions

- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - -
See:
-
- -
- - - -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - -

Methods

- - - - - - - -

(static) unwrap(algo, key, wrappedData) → {Uint8Array}

- - - - - - -
-

AES key unwrap

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
algo - - -enums.symmetric.aes128 -| - -enums.symmetric.aes256 -| - -enums.symmetric.aes192 - - - -

AES algo

key - - -Uint8Array - - - -

wrapping key

wrappedData - - -Uint8Array - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

unwrapped data

-
- - - -
-
- Type -
-
- -Uint8Array - - -
-
- - - - - - - - - - - - - -

(static) wrap(algo, key, dataToWrap) → {Uint8Array}

- - - - - - -
-

AES key wrap

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
algo - - -enums.symmetric.aes128 -| - -enums.symmetric.aes256 -| - -enums.symmetric.aes192 - - - -

AES algo

key - - -Uint8Array - - - -

wrapping key

dataToWrap - - -Uint8Array - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

wrapped key

-
- - - -
-
- Type -
-
- -Uint8Array - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-crypto_cipherMode.html b/docs/module-crypto_cipherMode.html deleted file mode 100644 index 0de52d5b..00000000 --- a/docs/module-crypto_cipherMode.html +++ /dev/null @@ -1,400 +0,0 @@ - - - - - JSDoc: Module: crypto/cipherMode - - - - - - - - - - -
- -

Module: crypto/cipherMode

- - - - - - -
- -
- - - - - -
- -
-
- - -

Cipher modes

- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - -

Methods

- - - - - - - -

(static) getAEADMode(algo, acceptExperimentalGCMopt) → {Object}

- - - - - - -
-

Get implementation of the given AEAD mode

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
algo - - -enums.aead - - - - - - - - - -
acceptExperimentalGCM - - -Boolean - - - - - - <optional>
- - - - - -

whether to allow the non-standard, legacy experimentalGCM algo

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
Throws:
- - - -
-
-
-

on invalid algo

-
-
-
-
-
-
- Type -
-
- -Error - - -
-
-
-
-
- - - - - -
Returns:
- - - - -
-
- Type -
-
- -Object - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-crypto_cmac.html b/docs/module-crypto_cmac.html deleted file mode 100644 index 0d624628..00000000 --- a/docs/module-crypto_cmac.html +++ /dev/null @@ -1,413 +0,0 @@ - - - - - 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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
data - - -Uint8Array - - - -
padding - - -Uint8Array - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-crypto_crypto.html b/docs/module-crypto_crypto.html deleted file mode 100644 index aacac5e3..00000000 --- a/docs/module-crypto_crypto.html +++ /dev/null @@ -1,2655 +0,0 @@ - - - - - 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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
algo - - -module:enums.symmetric - - - -

Symmetric encryption algorithm

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

Random bytes as a string to be used as a key.

-
- - - -
-
- Type -
-
- -Uint8Array - - -
-
- - - - - - - - - - - - - -

(static) getCurvePayloadSize(algo, oidopt)

- - - - - - -
-

Get encoded secret size for a given elliptic algo

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
algo - - -module:enums.publicKey - - - - - - - - - -

alrogithm identifier

oid - - -module:type/oid - - - - - - <optional>
- - - - - -

curve OID if needed by algo

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(static) parseEncSessionKeyParams(algo, bytes) → {Object}

- - - - - - -
-

Returns the types comprising the encrypted session key of an algorithm

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
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:
- - -
-

Decrypted data.

-
- - - -
-
- 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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
keyAlgo - - -module:enums.publicKey - - - -

Public key algorithm

symmetricAlgo - - -module:enums.symmetric -| - -null - - - -

Cipher algorithm (v3 only)

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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
oid - - -module:type/oid - - - -

EC object identifier

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
Throws:
- - - -
-
-
-

if curve is not supported

-
-
-
-
-
-
- Type -
-
- -UnsupportedError - - -
-
-
-
-
- - - - - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-crypto_hash.html b/docs/module-crypto_hash.html deleted file mode 100644 index a4d5623b..00000000 --- a/docs/module-crypto_hash.html +++ /dev/null @@ -1,525 +0,0 @@ - - - - - JSDoc: Module: crypto/hash - - - - - - - - - - -
- -

Module: crypto/hash

- - - - - - -
- -
- - - - - -
- -
-
- - -

Provides an interface to hashing functions available in Node.js or external libraries.

- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - -
See:
-
- -
- - - -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - -

Methods

- - - - - - - -

(static) computeDigest(algo, data) → {Promise.<Uint8Array>}

- - - - - - -
-

Create a hash on the specified data using the specified algorithm

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
algo - - -module:enums.hash - - - -

Hash algorithm type (see RFC 4880 9.4)

data - - -Uint8Array - - - -

Data to be hashed

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

Hash value.

-
- - - -
-
- Type -
-
- -Promise.<Uint8Array> - - -
-
- - - - - - - - - - - - - -

(static) getHashByteLength(algo) → {Integer}

- - - - - - -
-

Returns the hash size in bytes of the specified hash algorithm type

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
algo - - -module:enums.hash - - - -

Hash algorithm type (See RFC 4880 9.4)

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

Size in bytes of the resulting hash.

-
- - - -
-
- Type -
-
- -Integer - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-crypto_hkdf.html b/docs/module-crypto_hkdf.html deleted file mode 100644 index 107aa58b..00000000 --- a/docs/module-crypto_hkdf.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - JSDoc: Module: crypto/hkdf - - - - - - - - - - -
- -

Module: crypto/hkdf

- - - - - - -
- -
- - - - - -
- -
-
- - -

This module implements HKDF using either the WebCrypto API or Node.js' crypto API.

- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-crypto_mode_cfb.html b/docs/module-crypto_mode_cfb.html deleted file mode 100644 index 07f80255..00000000 --- a/docs/module-crypto_mode_cfb.html +++ /dev/null @@ -1,710 +0,0 @@ - - - - - JSDoc: Module: crypto/mode/cfb - - - - - - - - - - -
- -

Module: crypto/mode/cfb

- - - - - - -
- -
- - - -
- -
-
- - - - - -
- - - - - - - - - - - - - - - - -

Methods

- - - - - - - -

(static) decrypt(algo, key, ciphertext, iv)

- - - - - - -
-

CFB decryption

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
algo - - -enums.symmetric - - - -

block cipher algorithm

key - - -Uint8Array - - - -
ciphertext - - -MaybeStream.<Uint8Array> - - - -
iv - - -Uint8Array - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

MaybeStream

-
- - - - - - - - - - - - - - - -

(static) encrypt(algo, key, plaintext, iv, config)

- - - - - - -
-

CFB encryption

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
algo - - -enums.symmetric - - - -

block cipher algorithm

key - - -Uint8Array - - - -
plaintext - - -MaybeStream.<Uint8Array> - - - -
iv - - -Uint8Array - - - -
config - - -Object - - - -

full configuration, defaults to openpgp.config

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

MaybeStream

-
- - - - - - - - - - - - - - - -

(async, static) getPrefixRandom(algo) → {Promise.<Uint8Array>}

- - - - - - -
-

Generates a random byte prefix for the specified algorithm -See RFC 4880 9.2 for algorithms.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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> - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-crypto_mode_eax.html b/docs/module-crypto_mode_eax.html deleted file mode 100644 index c6c5c4f4..00000000 --- a/docs/module-crypto_mode_eax.html +++ /dev/null @@ -1,748 +0,0 @@ - - - - - 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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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> - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-crypto_mode_gcm.html b/docs/module-crypto_mode_gcm.html deleted file mode 100644 index 8ae9627d..00000000 --- a/docs/module-crypto_mode_gcm.html +++ /dev/null @@ -1,334 +0,0 @@ - - - - - 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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
cipher - - -enums.symmetric - - - -

The symmetric cipher algorithm to use

key - - -Uint8Array - - - -

The encryption key

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-crypto_mode_ocb.html b/docs/module-crypto_mode_ocb.html deleted file mode 100644 index c24521b6..00000000 --- a/docs/module-crypto_mode_ocb.html +++ /dev/null @@ -1,747 +0,0 @@ - - - - - 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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
cipher - - -enums.symmetric - - - -

The symmetric cipher algorithm to use

key - - -Uint8Array - - - -

The encryption key

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-crypto_pkcs1.html b/docs/module-crypto_pkcs1.html deleted file mode 100644 index 1b2351c3..00000000 --- a/docs/module-crypto_pkcs1.html +++ /dev/null @@ -1,882 +0,0 @@ - - - - - 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

- - - -

(inner, constant) hash_headers

- - - - -
-

ASN1 object identifiers for hashes

-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - -
See:
-
- -
- - - -
- - - - - - - - - - -

Methods

- - - - - - - -

(static) emeDecode(encoded, randomPayload) → {Uint8Array}

- - - - - - -
-

Decode a EME-PKCS1-v1_5 padded message

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - -
-

Encoded message.

-
- - - -
-
- Type -
-
- -Uint8Array - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-crypto_public_key.html b/docs/module-crypto_public_key.html deleted file mode 100644 index 8fbf447a..00000000 --- a/docs/module-crypto_public_key.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - JSDoc: Module: crypto/public_key - - - - - - - - - - -
- -

Module: crypto/public_key

- - - - - - -
- -
- - - - - -
- -
-
- - -

Asymmetric cryptography functions

- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-crypto_public_key_dsa.html b/docs/module-crypto_public_key_dsa.html deleted file mode 100644 index 6e0b658d..00000000 --- a/docs/module-crypto_public_key_dsa.html +++ /dev/null @@ -1,1084 +0,0 @@ - - - - - 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}>}

- - - - - - -
-

DSA Sign function

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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}

- - - - - - -
-

DSA Verify function

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
hashAlgo - - -Integer - - - -
r - - -Uint8Array - - - -
s - - -Uint8Array - - - -
hashed - - -Uint8Array - - - -
g - - -Uint8Array - - - -
p - - -Uint8Array - - - -
q - - -Uint8Array - - - -
y - - -Uint8Array - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -boolean - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-crypto_public_key_elgamal.html b/docs/module-crypto_public_key_elgamal.html deleted file mode 100644 index 55a59018..00000000 --- a/docs/module-crypto_public_key_elgamal.html +++ /dev/null @@ -1,981 +0,0 @@ - - - - - JSDoc: Module: crypto/public_key/elgamal - - - - - - - - - - -
- -

Module: crypto/public_key/elgamal

- - - - - - -
- -
- - - - - -
- -
-
- - -

ElGamal implementation

- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - -
-

Unpadded message.

-
- - - -
-
- 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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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> - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-crypto_public_key_elliptic.html b/docs/module-crypto_public_key_elliptic.html deleted file mode 100644 index 6877f96b..00000000 --- a/docs/module-crypto_public_key_elliptic.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - JSDoc: Module: crypto/public_key/elliptic - - - - - - - - - - -
- -

Module: crypto/public_key/elliptic

- - - - - - -
- -
- - - - - -
- -
-
- - -

Functions to access Elliptic Curve Cryptography

- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - -
See:
-
- -
- - - -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ 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 deleted file mode 100644 index 15140c4b..00000000 --- a/docs/module-crypto_public_key_elliptic_curve.html +++ /dev/null @@ -1,1240 +0,0 @@ - - - - - JSDoc: Module: crypto/public_key/elliptic/curve - - - - - - - - - - -
- -

Module: crypto/public_key/elliptic/curve

- - - - - - -
- -
- - - - - -
- -
-
- - -

Wrapper of an instance of an Elliptic Curve

- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - -

Methods

- - - - - - - -

(inner) checkPublicPointEnconding()

- - - - - - -
-

Check whether the public point has a valid encoding. -NB: this function does not check e.g. whether the point belongs to the curve.

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(inner) getPreferredHashAlgo(oid) → {enums.hash}

- - - - - - -
-

Get preferred hash algo to use with the given curve

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
oid - - -module:type/oid - - - -

curve oid

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

hash algorithm

-
- - - -
-
- Type -
-
- -enums.hash - - -
-
- - - - - - - - - - - - - -

(inner) jwkToRawPublic(jwk) → {Uint8Array}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
jwk - - -JsonWebKey - - - -

key for conversion

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

Raw public key.

-
- - - -
-
- Type -
-
- -Uint8Array - - -
-
- - - - - - - - - - - - - -

(inner) privateToJWK(payloadSize, name, publicKey, privateKey) → {JsonWebKey}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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> - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ 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 deleted file mode 100644 index 0e7b980a..00000000 --- a/docs/module-crypto_public_key_elliptic_ecdh.html +++ /dev/null @@ -1,6517 +0,0 @@ - - - - - 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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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, already truncated depending on the key version

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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, already truncated depending on the key version

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
algo - - -module:enums.publicKey - - - -

Algorithm identifier

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Promise.<{A: Uint8Array, k: Uint8Array}> - - -
-
- - - - - - - - - - - - - -

(async, static) generateEphemeralEncryptionMaterial() → {Promise.<{ephemeralPublicKey: Uint8Array, sharedSecret: Uint8Array}>}

- - - - - - -
-

Generate shared secret and ephemeral public key for encryption

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

ephemeral public key (K_A) and shared secret

-
- - - -
-
- Type -
-
- -Promise.<{ephemeralPublicKey: Uint8Array, sharedSecret: Uint8Array}> - - -
-
- - - - - - - - - - - - - -

(async, static) validateParams(oid, Q, d) → {Promise.<Boolean>}

- - - - - - -
-

Validate ECDH parameters

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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> - - -
-
- - - - - - - - - - - - - -

(inner) assertNonZeroArray(sharedSecret)

- - - - - - -
-

x25519 and x448 produce an all-zero value when given as input a point with small order. -This does not lead to a security issue in the context of ECDH, but it is still unexpected, -hence we throw.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
sharedSecret - - -Uint8Array - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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, already truncated depending on the key version

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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, already truncated depending on the key version

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
algo - - -module:enums.publicKey - - - -

Algorithm identifier

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Promise.<{A: Uint8Array, k: Uint8Array}> - - -
-
- - - - - - - - - - - - - -

(async, static) generateEphemeralEncryptionMaterial() → {Promise.<{ephemeralPublicKey: Uint8Array, sharedSecret: Uint8Array}>}

- - - - - - -
-

Generate shared secret and ephemeral public key for encryption

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

ephemeral public key (K_A) and shared secret

-
- - - -
-
- Type -
-
- -Promise.<{ephemeralPublicKey: Uint8Array, sharedSecret: Uint8Array}> - - -
-
- - - - - - - - - - - - - -

(async, static) validateParams(oid, Q, d) → {Promise.<Boolean>}

- - - - - - -
-

Validate ECDH parameters

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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> - - -
-
- - - - - - - - - - - - - -

(inner) assertNonZeroArray(sharedSecret)

- - - - - - -
-

x25519 and x448 produce an all-zero value when given as input a point with small order. -This does not lead to a security issue in the context of ECDH, but it is still unexpected, -hence we throw.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
sharedSecret - - -Uint8Array - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
curve - - -CurveWithOID - - - -

Elliptic curve object

Q - - -Uint8Array - - - -

Recipient public key

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Promise.<{publicKey: Uint8Array, sharedKey: Uint8Array}> - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ 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 deleted file mode 100644 index 2ad06562..00000000 --- a/docs/module-crypto_public_key_elliptic_ecdsa.html +++ /dev/null @@ -1,1017 +0,0 @@ - - - - - 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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ 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 deleted file mode 100644 index f553ab7b..00000000 --- a/docs/module-crypto_public_key_elliptic_eddsa.html +++ /dev/null @@ -1,1106 +0,0 @@ - - - - - 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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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 - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ 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 deleted file mode 100644 index 21e8f0f9..00000000 --- a/docs/module-crypto_public_key_elliptic_eddsa_legacy.html +++ /dev/null @@ -1,927 +0,0 @@ - - - - - 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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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 - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-crypto_public_key_rsa.html b/docs/module-crypto_public_key_rsa.html deleted file mode 100644 index 44ae2714..00000000 --- a/docs/module-crypto_public_key_rsa.html +++ /dev/null @@ -1,2369 +0,0 @@ - - - - - JSDoc: Module: crypto/public_key/rsa - - - - - - - - - - -
- -

Module: crypto/public_key/rsa

- - - - - - -
- -
- - - - - -
- -
-
- - -

RSA implementation

- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - -

Methods

- - - - - - - -

(async, static) decrypt(m, n, e, d, p, q, u, randomPayload) → {Promise.<String>}

- - - - - - -
-

Decrypt RSA message

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - -
-

RSA Plaintext.

-
- - - -
-
- Type -
-
- -Promise.<String> - - -
-
- - - - - - - - - - - - - -

(async, static) encrypt(data, n, e) → {Promise.<Uint8Array>}

- - - - - - -
-

Encrypt message

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
data - - -Uint8Array - - - -

Message

n - - -Uint8Array - - - -

RSA public modulus

e - - -Uint8Array - - - -

RSA public exponent

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

RSA Ciphertext.

-
- - - -
-
- 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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
bits - - -Integer - - - -

RSA bit length

e - - -Integer - - - -

RSA public exponent

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - -
See:
-
-
    -
  • module:crypto/public_key/prime
  • -
-
- - - -
- - - - - - - - - - - - - - - -
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>}

- - - - - - -
-

Create signature

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - -
-

RSA Signature.

-
- - - -
-
- Type -
-
- -Promise.<Uint8Array> - - -
-
- - - - - - - - - - - - - -

(async, static) validateParams(n, e, d, p, q, u) → {Promise.<Boolean>}

- - - - - - -
-

Validate RSA parameters

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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}

- - - - - - -
-

Verify signature

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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 - - -
-
- - - - - - - - - - - - - -

(inner) jwkToPrivate()

- - - - - - -
-

Convert JWK private key to OpenPGP private key params

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(async, inner) privateToJWK(hashAlgo, n, e, d, p, q, u)

- - - - - - -
-

Convert Openpgp private key params to jwk key according to

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
hashAlgo - - -String - - - -
n - - -Uint8Array - - - -
e - - -Uint8Array - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-crypto_random.html b/docs/module-crypto_random.html deleted file mode 100644 index 939b1428..00000000 --- a/docs/module-crypto_random.html +++ /dev/null @@ -1,516 +0,0 @@ - - - - - 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) → {bigint}

- - - - - - -
-

Create a secure random BigInt that is greater than or equal to min and less than max.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
min - - -bigint - - - -

Lower bound, included

max - - -bigint - - - -

Upper bound, excluded

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

Random BigInt.

-
- - - -
-
- Type -
-
- -bigint - - -
-
- - - - - - - - - - - - - -

(static) getRandomBytes(length) → {Uint8Array}

- - - - - - -
-

Retrieve secure random byte array of the specified length

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
length - - -Integer - - - -

Length in bytes to generate

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

Random byte array.

-
- - - -
-
- Type -
-
- -Uint8Array - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-crypto_signature.html b/docs/module-crypto_signature.html deleted file mode 100644 index 2c7bb926..00000000 --- a/docs/module-crypto_signature.html +++ /dev/null @@ -1,917 +0,0 @@ - - - - - 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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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> - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-encoding_base64.html b/docs/module-encoding_base64.html deleted file mode 100644 index 7ab70659..00000000 --- a/docs/module-encoding_base64.html +++ /dev/null @@ -1,769 +0,0 @@ - - - - - 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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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 - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-enums.html b/docs/module-enums.html index 0027e4db..3bc456da 100644 --- a/docs/module-enums.html +++ b/docs/module-enums.html @@ -235,7 +235,7 @@
Source:
@@ -499,7 +499,7 @@
Source:
@@ -694,7 +694,7 @@
Source:
@@ -1119,7 +1119,7 @@
Source:
@@ -1323,7 +1323,7 @@ fingerprint format

Source:
@@ -1633,7 +1633,7 @@ fingerprint format

Source:
@@ -1899,7 +1899,7 @@ possession of more than one person.

Source:
@@ -2094,7 +2094,7 @@ possession of more than one person.

Source:
@@ -2634,7 +2634,7 @@ possession of more than one person.

Source:
@@ -3060,7 +3060,7 @@ possession of more than one person.

Source:
@@ -3278,7 +3278,7 @@ possession of more than one person.

Source:
@@ -3496,7 +3496,7 @@ possession of more than one person.

Source:
@@ -4013,7 +4013,7 @@ document) that cannot include a target subpacket.

Source:
@@ -4737,7 +4737,7 @@ document) that cannot include a target subpacket.

Source:
@@ -5024,7 +5024,7 @@ document) that cannot include a target subpacket.

Source:
@@ -5220,7 +5220,7 @@ document) that cannot include a target subpacket.

Source:
@@ -5374,7 +5374,7 @@ document) that cannot include a target subpacket.

Source:
@@ -5590,7 +5590,7 @@ document) that cannot include a target subpacket.

Source:
@@ -5687,13 +5687,13 @@ document) that cannot include a target subpacket.


diff --git a/docs/module-key_Subkey-Subkey.html b/docs/module-key_Subkey-Subkey.html index c8db3740..6b043171 100644 --- a/docs/module-key_Subkey-Subkey.html +++ b/docs/module-key_Subkey-Subkey.html @@ -28,8 +28,7 @@
-

- key/Subkey~Subkey(subkeyPacket, mainKey)

+

Subkey(subkeyPacket, mainKey)

Class that represents a subkey packet and the relevant signatures.

@@ -171,7 +170,7 @@
Source:
@@ -281,7 +280,7 @@
Source:
@@ -394,7 +393,7 @@
Source:
@@ -511,7 +510,7 @@
Source:
@@ -628,7 +627,7 @@
Source:
@@ -741,7 +740,7 @@
Source:
@@ -942,7 +941,7 @@ Returns null if the subkey is invalid.

Source:
@@ -1055,7 +1054,7 @@ Returns null if the subkey is invalid.

Source:
@@ -1172,7 +1171,7 @@ Returns null if the subkey is invalid.

Source:
@@ -1230,7 +1229,7 @@ Returns null if the subkey is invalid.

-

getKeyID() → {module:type/keyid~KeyID}

+

getKeyID() → {module:type/keyid~KeyID}

@@ -1289,7 +1288,7 @@ Returns null if the subkey is invalid.

Source:
@@ -1329,7 +1328,7 @@ Returns null if the subkey is invalid.

-module:type/keyid~KeyID +module:type/keyid~KeyID
@@ -1347,7 +1346,7 @@ Returns null if the subkey is invalid.

-

getKeyID() → {module:type/keyid~KeyID}

+

getKeyID() → {module:type/keyid~KeyID}

@@ -1406,7 +1405,7 @@ Returns null if the subkey is invalid.

Source:
@@ -1446,7 +1445,7 @@ Returns null if the subkey is invalid.

-module:type/keyid~KeyID +module:type/keyid~KeyID
@@ -1523,7 +1522,7 @@ Returns null if the subkey is invalid.

Source:
@@ -1640,7 +1639,7 @@ Returns null if the subkey is invalid.

Source:
@@ -1757,7 +1756,7 @@ Returns null if the subkey is invalid.

Source:
@@ -1873,7 +1872,7 @@ Returns null if the subkey is invalid.

Source:
@@ -2149,7 +2148,7 @@ Returns null if the subkey is invalid.

Source:
@@ -2487,7 +2486,7 @@ Returns null if the subkey is invalid.

Source:
@@ -2599,7 +2598,7 @@ Returns null if the subkey is invalid.

Source:
@@ -2832,7 +2831,7 @@ Returns null if the subkey is invalid.

Source:
@@ -3044,7 +3043,7 @@ and valid binding signature.

Source:
@@ -3137,13 +3136,13 @@ and valid binding signature.


diff --git a/docs/module-key_Subkey.html b/docs/module-key_Subkey.html deleted file mode 100644 index b8ab38a6..00000000 --- a/docs/module-key_Subkey.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - JSDoc: Module: key/Subkey - - - - - - - - - - -
- -

Module: key/Subkey

- - - - - - -
- -
- - - -
- -
-
- - - - - -
- - - - - - -

Classes

- -
-
Subkey
-
-
- - - - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-key_User-User.html b/docs/module-key_User-User.html index cc139ef9..2c62d3cd 100644 --- a/docs/module-key_User-User.html +++ b/docs/module-key_User-User.html @@ -28,8 +28,7 @@
-

- key/User~User(userPacket, mainKey)

+

User(userPacket, mainKey)

Class that represents an user ID or attribute packet and the relevant signatures.

@@ -171,7 +170,7 @@
Source:
@@ -404,7 +403,7 @@
Source:
@@ -516,7 +515,7 @@
Source:
@@ -789,7 +788,7 @@
Source:
@@ -1127,7 +1126,7 @@
Source:
@@ -1239,7 +1238,7 @@
Source:
@@ -1442,7 +1441,7 @@
Source:
@@ -1623,7 +1622,7 @@ and validity of self signature.

Source:
@@ -1710,7 +1709,7 @@ and validity of self signature.

-

(async) verifyAllCertifications(verificationKeys, dateopt, config) → {Promise.<Array.<{keyID: module:type/keyid~KeyID, valid: (Boolean|null)}>>}

+

(async) verifyAllCertifications(verificationKeys, dateopt, config) → {Promise.<Array.<{keyID: module:type/keyid~KeyID, valid: (Boolean|null)}>>}

@@ -1887,7 +1886,7 @@ and validity of self signature.

Source:
@@ -1928,7 +1927,7 @@ Signature validity is null if the verification keys do not correspond to the cer
-Promise.<Array.<{keyID: module:type/keyid~KeyID, valid: (Boolean|null)}>> +Promise.<Array.<{keyID: module:type/keyid~KeyID, valid: (Boolean|null)}>>
@@ -2154,7 +2153,7 @@ Signature validity is null if the verification keys do not correspond to the cer
Source:
@@ -2234,13 +2233,13 @@ Signature validity is null if the verification keys do not correspond to the cer
diff --git a/docs/module-key_User.html b/docs/module-key_User.html deleted file mode 100644 index a7911945..00000000 --- a/docs/module-key_User.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - JSDoc: Module: key/User - - - - - - - - - - -
- -

Module: key/User

- - - - - - -
- -
- - - -
- -
-
- - - - - -
- - - - - - -

Classes

- -
-
User
-
-
- - - - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-key_helper.html b/docs/module-key_helper.html deleted file mode 100644 index bbceb7b7..00000000 --- a/docs/module-key_helper.html +++ /dev/null @@ -1,2891 +0,0 @@ - - - - - JSDoc: Module: key/helper - - - - - - - - - - -
- -

Module: key/helper

- - - - - - -
- -
- - - - - -
- -
-
- - -

Provides helpers methods for key module

- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - -

Methods

- - - - - - - -

(static) checkKeyRequirements(keyPacket, config)

- - - - - - -
-

Check key against blacklisted algorithms and minimum strength requirements.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
keyPacket - - -SecretKeyPacket -| - -PublicKeyPacket -| - -SecretSubkeyPacket -| - -PublicSubkeyPacket - - - -
config - - -Config - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
Throws:
- - - -
-
-
-

if the key packet does not meet the requirements

-
-
-
-
-
-
- Type -
-
- -Error - - -
-
-
-
-
- - - - - - - - - - - - - - - - -

(static) createBindingSignature(subkey, primaryKey, options, config)

- - - - - - -
-

Create Binding signature to the key according to the https://tools.ietf.org/html/rfc4880#section-5.2.1

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
subkey - - -SecretSubkeyPacket - - - -

Subkey key packet

primaryKey - - -SecretKeyPacket - - - -

Primary key packet

options - - -Object - - - -
config - - -Object - - - -

Full configuration

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(static) createSignaturePacket(dataToSign, recipientKeys, signingKeyPacket, signaturePropertiesopt, dateopt, userIDopt, notationsopt, detachedopt, config) → {Promise.<SignaturePacket>}

- - - - - - -
-

Create signature packet

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
dataToSign - - -Object - - - - - - - - - -

Contains packets to be signed

recipientKeys - - -Array.<Key> - - - - - - - - - -

keys to get preferences from

signingKeyPacket - - -SecretKeyPacket -| - -SecretSubkeyPacket - - - - - - - - - -

secret key packet for signing

signatureProperties - - -Object - - - - - - <optional>
- - - - - -

Properties to write on the signature packet before signing

date - - -Date - - - - - - <optional>
- - - - - -

Override the creationtime of the signature

userID - - -Object - - - - - - <optional>
- - - - - -

User ID

notations - - -Array - - - - - - <optional>
- - - - - -

Notation Data to add to the signature, e.g. [{ name: 'test@example.org', value: new TextEncoder().encode('test'), humanReadable: true, critical: false }]

detached - - -Object - - - - - - <optional>
- - - - - -

Whether to create a detached signature packet

config - - -Object - - - - - - - - - -

full configuration

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

Signature packet.

-
- - - -
-
- Type -
-
- -Promise.<SignaturePacket> - - -
-
- - - - - - - - - - - - - -

(static) getKeyExpirationTime(keyPacket, signature) → {Date|Infinity}

- - - - - - -
-

Returns key expiration time based on the given certification signature. -The expiration time of the signature is ignored.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
keyPacket - - -PublicSubkeyPacket -| - -PublicKeyPacket - - - -

key to check

signature - - -SignaturePacket - - - -

signature to process

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

expiration time or infinity if the key does not expire

-
- - - -
-
- Type -
-
- -Date -| - -Infinity - - -
-
- - - - - - - - - - - - - -

(async, static) getLatestValidSignature(signatures, publicKey, signatureType, date, config) → {Promise.<SignaturePacket>}

- - - - - - -
-

Returns the valid and non-expired signature that has the latest creation date, while ignoring signatures created in the future.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
signatures - - -Array.<SignaturePacket> - - - -

List of signatures

publicKey - - -PublicKeyPacket -| - -PublicSubkeyPacket - - - -

Public key packet to verify the signature

signatureType - - -module:enums.signature - - - -

Signature type to determine how to hash the data (NB: for userID signatures, -enums.signatures.certGeneric should be given regardless of the actual trust level)

date - - -Date - - - -

Use the given date instead of the current time

config - - -Object - - - -

full configuration

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

The latest valid signature.

-
- - - -
-
- Type -
-
- -Promise.<SignaturePacket> - - -
-
- - - - - - - - - - - - - -

(async, static) getPreferredCipherSuite(keysopt, dateopt, userIDsopt, configopt) → {Promise.<{symmetricAlgo: module:enums.symmetric, aeadAlgo: (module:enums.aead|undefined)}>}

- - - - - - -
-

Returns the preferred symmetric and AEAD algorithm (if any) for a set of keys

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
keys - - -Array.<Key> - - - - - - <optional>
- - - - - -

Set of keys

date - - -Date - - - - - - <optional>
- - - - - -

Use the given date for verification instead of the current time

userIDs - - -Array - - - - - - <optional>
- - - - - -

User IDs

config - - -Object - - - - - - <optional>
- - - - - -

Full configuration, defaults to openpgp.config

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

Object containing the preferred symmetric algorithm, and the preferred AEAD algorithm, or undefined if CFB is preferred

-
- - - -
-
- Type -
-
- -Promise.<{symmetricAlgo: module:enums.symmetric, aeadAlgo: (module:enums.aead|undefined)}> - - -
-
- - - - - - - - - - - - - -

(async, static) getPreferredCompressionAlgo(keysopt, dateopt, userIDsopt, configopt) → {Promise.<module:enums.compression>}

- - - - - - -
-

Returns the preferred compression algorithm for a set of keys

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
keys - - -Array.<Key> - - - - - - <optional>
- - - - - -

Set of keys

date - - -Date - - - - - - <optional>
- - - - - -

Use the given date for verification instead of the current time

userIDs - - -Array - - - - - - <optional>
- - - - - -

User IDs

config - - -Object - - - - - - <optional>
- - - - - -

Full configuration, defaults to openpgp.config

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

Preferred compression algorithm

-
- - - -
-
- Type -
-
- -Promise.<module:enums.compression> - - -
-
- - - - - - - - - - - - - -

(async, static) getPreferredHashAlgo(targetKeysopt, signingKeyPacket, dateopt, targetUserIDopt, config) → {Promise.<enums.hash>}

- - - - - - -
-

Returns the preferred signature hash algorithm for a set of keys.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
targetKeys - - -Array.<Key> - - - - - - <optional>
- - - - - -

The keys to get preferences from

signingKeyPacket - - -SecretKeyPacket -| - -SecretSubkeyPacket - - - - - - - - - -

key packet used for signing

date - - -Date - - - - - - <optional>
- - - - - -

Use the given date for verification instead of the current time

targetUserID - - -Object - - - - - - <optional>
- - - - - -

User IDs corresponding to targetKeys to get preferences from

config - - -Object - - - - - - - - - -

full configuration

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Promise.<enums.hash> - - -
-
- - - - - - - - - - - - - -

(async, static) isDataRevoked(primaryKey, dataToVerify, revocations, signature, key,, date, config) → {Promise.<Boolean>}

- - - - - - -
-

Checks if a given certificate or binding signature is revoked

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
primaryKey - - -SecretKeyPacket -| - -PublicKeyPacket - - - -

The primary key packet

dataToVerify - - -Object - - - -

The data to check

revocations - - -Array.<SignaturePacket> - - - -

The revocation signatures to check

signature - - -SignaturePacket - - - -

The certificate or signature to check

key, - - -PublicSubkeyPacket -| - -SecretSubkeyPacket -| - -PublicKeyPacket -| - -SecretKeyPacket - - - -

optional The key packet to verify the signature, instead of the primary key

date - - -Date - - - -

Use the given date instead of the current time

config - - -Object - - - -

Full configuration

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

True if the signature revokes the data.

-
- - - -
-
- Type -
-
- -Promise.<Boolean> - - -
-
- - - - - - - - - - - - - -

(static) mergeSignatures(source, dest, attr, dateopt, checkFnopt)

- - - - - - -
-

Merges signatures from source[attr] to dest[attr]

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
source - - -Object - - - - - - - - - -
dest - - -Object - - - - - - - - - -
attr - - -String - - - - - - - - - -
date - - -Date - - - - - - <optional>
- - - - - -

date to use for signature expiration check, instead of the current time

checkFn - - -function - - - - - - <optional>
- - - - - -

signature only merged if true

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-packet_packet.html b/docs/module-packet_packet.html deleted file mode 100644 index 20ab48bf..00000000 --- a/docs/module-packet_packet.html +++ /dev/null @@ -1,866 +0,0 @@ - - - - - JSDoc: Module: packet/packet - - - - - - - - - - -
- -

Module: packet/packet

- - - - - - -
- -
- - - - - -
- -
-
- - -

Functions for reading and writing packets

- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - -

Methods

- - - - - - - -

(static) readPacket(input, callback) → {Boolean}

- - - - - - -
-

Generic static Packet Parser function

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
input - - -Uint8Array -| - -ReadableStream.<Uint8Array> - - - -

Input stream as string

callback - - -function - - - -

Function to call with the parsed packet

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

Returns false if the stream was empty and parsing is done, and true otherwise.

-
- - - -
-
- Type -
-
- -Boolean - - -
-
- - - - - - - - - - - - - -

(static) supportsStreaming(tag) → {Boolean}

- - - - - - -
-

Whether the packet type supports partial lengths per RFC4880

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
tag - - -Integer - - - -

Tag type

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

String of the header.

-
- - - -
-
- Type -
-
- -Boolean - - -
-
- - - - - - - - - - - - - -

(static) writeHeader(tag_type, length) → {String}

- - - - - - -
-

Writes a packet header version 4 with the given tag_type and length to a -string

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
tag_type - - -Integer - - - -

Tag type

length - - -Integer - - - -

Length of the payload

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

String of the header.

-
- - - -
-
- Type -
-
- -String - - -
-
- - - - - - - - - - - - - -

(static) writeSimpleLength(length) → {Uint8Array}

- - - - - - -
-

Encodes a given integer of length to the openpgp length specifier to a -string

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
length - - -Integer - - - -

The length to encode

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

String with openpgp length representation.

-
- - - -
-
- Type -
-
- -Uint8Array - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-type_ecdh_symkey.html b/docs/module-type_ecdh_symkey.html deleted file mode 100644 index 647f74ae..00000000 --- a/docs/module-type_ecdh_symkey.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - JSDoc: Module: type/ecdh_symkey - - - - - - - - - - -
- -

Module: type/ecdh_symkey

- - - - - - -
- -
- - - - - -
- -
-
- - -

Encoded symmetric key for ECDH (incl. legacy x25519)

- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-type_kdf_params-KDFParams.html b/docs/module-type_kdf_params-KDFParams.html deleted file mode 100644 index 007cbde4..00000000 --- a/docs/module-type_kdf_params-KDFParams.html +++ /dev/null @@ -1,517 +0,0 @@ - - - - - JSDoc: Class: KDFParams - - - - - - - - - - -
- -

Class: KDFParams

- - - - - - -
- -
- -

KDFParams(hash, cipher)

- - -
- -
-
- - - - - - -

new KDFParams(hash, cipher)

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
hash - - -enums.hash - - - -

Hash algorithm

cipher - - -enums.symmetric - - - -

Symmetric algorithm

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - -

Methods

- - - - - - - -

read(input) → {Number}

- - - - - - -
-

Read KDFParams from an Uint8Array

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
input - - -Uint8Array - - - -

Where to read the KDFParams from

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

Number of read bytes.

-
- - - -
-
- Type -
-
- -Number - - -
-
- - - - - - - - - - - - - -

write() → {Uint8Array}

- - - - - - -
-

Write KDFParams to an Uint8Array

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

Array with the KDFParams value

-
- - - -
-
- Type -
-
- -Uint8Array - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-type_keyid-KeyID.html b/docs/module-type_keyid-KeyID.html deleted file mode 100644 index 3ba2f49a..00000000 --- a/docs/module-type_keyid-KeyID.html +++ /dev/null @@ -1,943 +0,0 @@ - - - - - JSDoc: Class: KeyID - - - - - - - - - - -
- -

Class: KeyID

- - - - - - -
- -
- -

- type/keyid~KeyID()

- -

Implementation of type key id

-

RFC4880 3.3: -A Key ID is an eight-octet scalar that identifies a key. -Implementations SHOULD NOT assume that Key IDs are unique. The -section "Enhanced Key Formats" below describes how Key IDs are -formed.

- - -
- -
-
- - - - -

Constructor

- - - -

new KeyID()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - -

Methods

- - - - - - - -

equals(keyID, matchWildcard)

- - - - - - -
-

Checks equality of Key ID's

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDefaultDescription
keyID - - -KeyID - - - - - -
matchWildcard - - -Boolean - - - - - - false - -

Indicates whether to check if either keyID is a wildcard

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

isNull() → {Boolean}

- - - - - - -
-

Checks to see if the Key ID is unset

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

True if the Key ID is null.

-
- - - -
-
- Type -
-
- -Boolean - - -
-
- - - - - - - - - - - - - -

isWildcard() → {Boolean}

- - - - - - -
-

Checks to see if the Key ID is a "wildcard" Key ID (all zeros)

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

True if this is a wildcard Key ID.

-
- - - -
-
- Type -
-
- -Boolean - - -
-
- - - - - - - - - - - - - -

read(bytes)

- - - - - - -
-

Parsing method for a key id

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
bytes - - -Uint8Array - - - -

Input to read the key id from

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

toHex() → {String}

- - - - - - -
-

Returns the Key ID represented as a hexadecimal string

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

Key ID as a hexadecimal string.

-
- - - -
-
- Type -
-
- -String - - -
-
- - - - - - - - - - - - - -

write() → {Uint8Array}

- - - - - - -
-

Serializes the Key ID

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

Key ID as a Uint8Array.

-
- - - -
-
- Type -
-
- -Uint8Array - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-type_keyid.html b/docs/module-type_keyid.html deleted file mode 100644 index 8baa8935..00000000 --- a/docs/module-type_keyid.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - JSDoc: Module: type/keyid - - - - - - - - - - -
- -

Module: type/keyid

- - - - - - -
- -
- - - -
- -
-
- - - - - -
- - - - - - -

Classes

- -
-
KeyID
-
-
- - - - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-type_oid.html b/docs/module-type_oid.html deleted file mode 100644 index 9c0bbb2e..00000000 --- a/docs/module-type_oid.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - JSDoc: Module: type/oid - - - - - - - - - - -
- -

Module: type/oid

- - - - - - -
- -
- - - - - -
- -
-
- - -

Wrapper to an OID value

-

RFC6637, section 11: -The sequence of octets in the third column is the result of applying -the Distinguished Encoding Rules (DER) to the ASN.1 Object Identifier -with subsequent truncation. The truncation removes the two fields of -encoded Object Identifier. The first omitted field is one octet -representing the Object Identifier tag, and the second omitted field -is the length of the Object Identifier body. For example, the -complete ASN.1 DER encoding for the NIST P-256 curve OID is "06 08 2A -86 48 CE 3D 03 01 07", from which the first entry in the table above -is constructed by omitting the first two octets. Only the truncated -sequence of octets is the valid representation of a curve OID.

- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-type_s2k-GenericS2K.html b/docs/module-type_s2k-GenericS2K.html deleted file mode 100644 index 0ebc0172..00000000 --- a/docs/module-type_s2k-GenericS2K.html +++ /dev/null @@ -1,969 +0,0 @@ - - - - - JSDoc: Class: GenericS2K - - - - - - - - - - -
- -

Class: GenericS2K

- - - - - - -
- -
- -

- type/s2k~GenericS2K(configopt)

- - -
- -
-
- - - - - - -

new GenericS2K(configopt)

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
config - - -Object - - - - - - <optional>
- - - - - -

Full configuration, defaults to openpgp.config

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - -

Members

- - - -

algorithm :module:enums.hash|0

- - - - -
-

Hash function identifier, or 0 for gnu-dummy keys

-
- - - -
Type:
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

c :Integer

- - - - - - -
Type:
-
    -
  • - -Integer - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

salt :Uint8Array

- - - - -
-

Eight bytes of salt in a binary string.

-
- - - -
Type:
-
    -
  • - -Uint8Array - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

type :String

- - - - -
-

enums.s2k identifier or 'gnu-dummy'

-
- - - -
Type:
-
    -
  • - -String - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - -

Methods

- - - - - - - -

(async) produceKey(passphrase) → {Promise.<Uint8Array>}

- - - - - - -
-

Produces a key using the specified passphrase and the defined -hashAlgorithm

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
passphrase - - -String - - - -

Passphrase containing user input

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

Produced key with a length corresponding to. -hashAlgorithm hash length

-
- - - -
-
- Type -
-
- -Promise.<Uint8Array> - - -
-
- - - - - - - - - - - - - -

read(bytes) → {Integer}

- - - - - - -
-

Parsing function for a string-to-key specifier (RFC 4880 3.7).

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
bytes - - -Uint8Array - - - -

Payload of string-to-key specifier

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

Actual length of the object.

-
- - - -
-
- Type -
-
- -Integer - - -
-
- - - - - - - - - - - - - -

write() → {Uint8Array}

- - - - - - -
-

Serializes s2k information

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

Binary representation of s2k.

-
- - - -
-
- Type -
-
- -Uint8Array - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-type_s2k.html b/docs/module-type_s2k.html deleted file mode 100644 index 53bb92bf..00000000 --- a/docs/module-type_s2k.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - JSDoc: Module: type/s2k - - - - - - - - - - -
- -

Module: type/s2k

- - - - - - -
- -
- - - - - -
- -
-
- - -

Implementation of the String-to-key specifier

-

RFC4880 3.7: -String-to-key (S2K) specifiers are used to convert passphrase strings -into symmetric-key encryption/decryption keys. They are used in two -places, currently: to encrypt the secret part of private keys in the -private keyring, and to convert passphrases to encryption keys for -symmetrically encrypted messages.

- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - -

Classes

- -
-
GenericS2K
-
-
- - - - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-type_x25519x448_symkey.html b/docs/module-type_x25519x448_symkey.html deleted file mode 100644 index 5e42c243..00000000 --- a/docs/module-type_x25519x448_symkey.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - JSDoc: Module: type/x25519x448_symkey - - - - - - - - - - -
- -

Module: type/x25519x448_symkey

- - - - - - -
- -
- - - - - -
- -
-
- - -

Encoded symmetric key for x25519 and x448 -The payload format varies for v3 and v6 PKESK: -the former includes an algorithm byte preceeding the encrypted session key.

- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-util.html b/docs/module-util.html deleted file mode 100644 index 607bf6f1..00000000 --- a/docs/module-util.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - JSDoc: Module: util - - - - - - - - - - -
- -

Module: util

- - - - - - -
- -
- - - - - -
- -
-
- - -

This object contains utility functions

- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index aff4c519..6df9573b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@noble/ciphers": "^1.3.0", "@noble/curves": "^1.9.7", "@noble/hashes": "^1.8.0", - "@openpgp/jsdoc": "^3.6.11", + "@openpgp/jsdoc": "^4.0.4", "@openpgp/seek-bzip": "^1.0.5-git", "@openpgp/tweetnacl": "^1.0.4-2", "@openpgp/web-stream-tools": "~0.2.0", @@ -1258,6 +1258,19 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@jsdoc/salty": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.9.tgz", + "integrity": "sha512-yYxMVH7Dqw6nO0d5NIV8OQWnitU8k6vXH8NtgqAfIa/IUqRMxRv/NUJJ08VEKbAakwxlgBl5PJdrU0dMPStsnw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "lodash": "^4.17.21" + }, + "engines": { + "node": ">=v12.0.0" + } + }, "node_modules/@napi-rs/wasm-runtime": { "version": "0.2.12", "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.12.tgz", @@ -1352,26 +1365,26 @@ } }, "node_modules/@openpgp/jsdoc": { - "version": "3.6.11", - "resolved": "https://registry.npmjs.org/@openpgp/jsdoc/-/jsdoc-3.6.11.tgz", - "integrity": "sha512-mwvKQrW9raTU4CM3Oa93deRPh3TknFL0PUaGJWXwk3Inqf5nT8x4Z867ctqKYPekqw9FdDGyTaGb4rkbyPl9fA==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@openpgp/jsdoc/-/jsdoc-4.0.4.tgz", + "integrity": "sha512-AUhEcKImrc9vzr7NpJ8anhSH8qOdWlzCZbVOpRtqgqMPq4khfW7SDhm/NuqR+tOB9dg2/Cqwwu8Vs/OaoH3Mmw==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@babel/parser": "^7.9.4", - "@types/markdown-it": "^12.2.3", + "@babel/parser": "^7.20.15", + "@jsdoc/salty": "^0.2.1", + "@types/markdown-it": "^14.1.1", "bluebird": "^3.7.2", "catharsis": "^0.9.0", "escape-string-regexp": "^2.0.0", "js2xmlparser": "^4.0.2", "klaw": "^3.0.0", - "markdown-it": "^12.3.2", - "markdown-it-anchor": "^8.4.1", + "markdown-it": "^14.1.0", + "markdown-it-anchor": "^8.6.7", "marked": "^4.0.10", "mkdirp": "^1.0.4", "requizzle": "^0.2.3", "strip-json-comments": "^3.1.0", - "taffydb": "2.6.2", "underscore": "~1.13.2" }, "bin": { @@ -2308,21 +2321,21 @@ } }, "node_modules/@types/linkify-it": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.5.tgz", - "integrity": "sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==", "dev": true, "license": "MIT" }, "node_modules/@types/markdown-it": { - "version": "12.2.3", - "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-12.2.3.tgz", - "integrity": "sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ==", + "version": "14.1.2", + "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-14.1.2.tgz", + "integrity": "sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==", "dev": true, "license": "MIT", "dependencies": { - "@types/linkify-it": "*", - "@types/mdurl": "*" + "@types/linkify-it": "^5", + "@types/mdurl": "^2" } }, "node_modules/@types/mdurl": { @@ -5499,19 +5512,6 @@ "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" } }, - "node_modules/dom-serializer/node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, "node_modules/domelementtype": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", @@ -5753,11 +5753,14 @@ } }, "node_modules/entities": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", - "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", "dev": true, "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, "funding": { "url": "https://github.com/fb55/entities?sponsor=1" } @@ -7755,19 +7758,6 @@ "entities": "^4.5.0" } }, - "node_modules/htmlparser2/node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, "node_modules/http-assert": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/http-assert/-/http-assert-1.5.0.tgz", @@ -9168,13 +9158,13 @@ "license": "MIT" }, "node_modules/linkify-it": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", - "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", "dev": true, "license": "MIT", "dependencies": { - "uc.micro": "^1.0.1" + "uc.micro": "^2.0.0" } }, "node_modules/locate-app": { @@ -9412,20 +9402,21 @@ "dev": true }, "node_modules/markdown-it": { - "version": "12.3.2", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz", - "integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==", + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", + "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", "dev": true, "license": "MIT", "dependencies": { "argparse": "^2.0.1", - "entities": "~2.1.0", - "linkify-it": "^3.0.1", - "mdurl": "^1.0.1", - "uc.micro": "^1.0.5" + "entities": "^4.4.0", + "linkify-it": "^5.0.0", + "mdurl": "^2.0.0", + "punycode.js": "^2.3.1", + "uc.micro": "^2.1.0" }, "bin": { - "markdown-it": "bin/markdown-it.js" + "markdown-it": "bin/markdown-it.mjs" } }, "node_modules/markdown-it-anchor": { @@ -9470,9 +9461,9 @@ } }, "node_modules/mdurl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", - "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", "dev": true, "license": "MIT" }, @@ -10961,6 +10952,16 @@ "node": ">=6" } }, + "node_modules/punycode.js": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", + "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/puppeteer-core": { "version": "24.25.0", "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-24.25.0.tgz", @@ -12698,12 +12699,6 @@ "node": ">=12.17" } }, - "node_modules/taffydb": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz", - "integrity": "sha512-y3JaeRSplks6NYQuCOj3ZFMO3j60rTwbuKCvZxsAraGYH2epusatvZ0baZYA01WsGqJBq/Dl6vOrMUJqyMj8kA==", - "dev": true - }, "node_modules/tar-fs": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.1.1.tgz", @@ -13201,9 +13196,9 @@ } }, "node_modules/uc.micro": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", - "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", + "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", "dev": true, "license": "MIT" }, diff --git a/package.json b/package.json index a40983c8..f6bdb7dc 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "@noble/ciphers": "^1.3.0", "@noble/curves": "^1.9.7", "@noble/hashes": "^1.8.0", - "@openpgp/jsdoc": "^3.6.11", + "@openpgp/jsdoc": "^4.0.4", "@openpgp/seek-bzip": "^1.0.5-git", "@openpgp/tweetnacl": "^1.0.4-2", "@openpgp/web-stream-tools": "~0.2.0",