diff --git a/src/crypto/public_key/elliptic/ecdsa.js b/src/crypto/public_key/elliptic/ecdsa.js index 0493c55d..4b73166e 100644 --- a/src/crypto/public_key/elliptic/ecdsa.js +++ b/src/crypto/public_key/elliptic/ecdsa.js @@ -18,6 +18,7 @@ // Implementation of ECDSA following RFC6637 for Openpgpjs /** + * @requires crypto/hash * @requires crypto/public_key/jsbn * @requires crypto/public_key/elliptic/curves * @module crypto/public_key/elliptic/ecdsa diff --git a/src/crypto/public_key/elliptic/eddsa.js b/src/crypto/public_key/elliptic/eddsa.js index cccb23dd..58a9512d 100644 --- a/src/crypto/public_key/elliptic/eddsa.js +++ b/src/crypto/public_key/elliptic/eddsa.js @@ -1,4 +1,11 @@ -// Implementation of EdDSA for OpenPGP +// Implementation of EdDSA following RFC4880bis-02 for OpenPGP + +/** + * @requires crypto/hash + * @requires crypto/public_key/jsbn + * @requires crypto/public_key/elliptic/curves + * @module crypto/public_key/elliptic/eddsa + */ 'use strict'; diff --git a/src/crypto/public_key/elliptic/key.js b/src/crypto/public_key/elliptic/key.js index 22131762..026beaae 100644 --- a/src/crypto/public_key/elliptic/key.js +++ b/src/crypto/public_key/elliptic/key.js @@ -18,8 +18,15 @@ // Wrapper for a KeyPair of an Elliptic Curve /** + * @requires bn.js + * @requires asn1.js + * @requires jwk-to-pem + * @requires crypto/public_key/elliptic/curves * @requires crypto/hash * @requires util + * @requires enums + * @requires config + * @requires encoding/base64 * @module crypto/public_key/elliptic/key */ diff --git a/src/openpgp.js b/src/openpgp.js index 006e2ce3..7540ee0e 100644 --- a/src/openpgp.js +++ b/src/openpgp.js @@ -92,7 +92,8 @@ export function destroyWorker() { * Generates a new OpenPGP key pair. Supports RSA and ECC keys. Primary and subkey will be of same type. * @param {Array} userIds array of user IDs e.g. [{ name:'Phil Zimmermann', email:'phil@openpgp.org' }] * @param {String} passphrase (optional) The passphrase used to encrypt the resulting private key - * @param {Number} numBits (optional) number of bits for the key creation. (should be 2048 or 4096) + * @param {Number} numBits (optional) number of bits for RSA keys: 2048 or 4096. + * @param {String} curve (optional) elliptic curve for ECC keys: curve25519, p256, p384, p521, or secp256k1 * @param {Boolean} unlocked (optional) If the returned secret part of the generated key is unlocked * @param {Number} keyExpirationTime (optional) The number of seconds after the key creation time that the key expires * @return {Promise} The generated key object in the form: