@@ -4878,13 +4878,13 @@ Module.ecc_opaque_ristretto255_sha512_3DH_Response = (
48784878
48794879// sign
48804880
4881- const ecc_sign_ed25519_SIZE = 64 ;
4881+ const ecc_sign_ed25519_SIGNATURESIZE = 64 ;
48824882/**
48834883 * Signature size.
48844884 *
48854885 * @type {number }
48864886 */
4887- Module . ecc_sign_ed25519_SIZE = ecc_sign_ed25519_SIZE ;
4887+ Module . ecc_sign_ed25519_SIGNATURESIZE = ecc_sign_ed25519_SIGNATURESIZE ;
48884888
48894889const ecc_sign_ed25519_SEEDSIZE = 32 ;
48904890/**
@@ -4935,62 +4935,62 @@ const ecc_sign_eth_bls_SIGNATURESIZE = 96;
49354935Module . ecc_sign_eth_bls_SIGNATURESIZE = ecc_sign_eth_bls_SIGNATURESIZE ;
49364936
49374937/**
4938- * Signs the message msg whose length is msg_len bytes, using the
4939- * secret key sk , and puts the signature into sig .
4938+ * Signs the ` message` whose length is `message_len` in bytes, using the
4939+ * secret key `sk` , and puts the signature into `signature` .
49404940 *
4941- * @param {Uint8Array } sig (output) the signature, size:ecc_sign_ed25519_SIZE
4942- * @param {Uint8Array } msg input message, size:msg_len
4943- * @param {number } msg_len the length of `msg `
4941+ * @param {Uint8Array } signature (output) the signature, size:ecc_sign_ed25519_SIGNATURESIZE
4942+ * @param {Uint8Array } message input message, size:message_len
4943+ * @param {number } message_len the length of `message `
49444944 * @param {Uint8Array } sk the secret key, size:ecc_sign_ed25519_SECRETKEYSIZE
49454945 */
4946- Module . ecc_sign_ed25519_sign = (
4947- sig ,
4948- msg ,
4949- msg_len ,
4946+ Module . ecc_sign_ed25519_Sign = (
4947+ signature ,
4948+ message ,
4949+ message_len ,
49504950 sk ,
49514951) => {
4952- const ptr_sig = mput ( sig , ecc_sign_ed25519_SIZE ) ;
4953- const ptr_msg = mput ( msg , msg_len ) ;
4952+ const ptr_signature = mput ( signature , ecc_sign_ed25519_SIGNATURESIZE ) ;
4953+ const ptr_message = mput ( message , message_len ) ;
49544954 const ptr_sk = mput ( sk , ecc_sign_ed25519_SECRETKEYSIZE ) ;
4955- _ecc_sign_ed25519_sign (
4956- ptr_sig ,
4957- ptr_msg ,
4958- msg_len ,
4955+ _ecc_sign_ed25519_Sign (
4956+ ptr_signature ,
4957+ ptr_message ,
4958+ message_len ,
49594959 ptr_sk ,
49604960 ) ;
4961- mget ( sig , ptr_sig , ecc_sign_ed25519_SIZE ) ;
4962- mfree ( ptr_sig , ecc_sign_ed25519_SIZE ) ;
4963- mfree ( ptr_msg , msg_len ) ;
4961+ mget ( signature , ptr_signature , ecc_sign_ed25519_SIGNATURESIZE ) ;
4962+ mfree ( ptr_signature , ecc_sign_ed25519_SIGNATURESIZE ) ;
4963+ mfree ( ptr_message , message_len ) ;
49644964 mfree ( ptr_sk , ecc_sign_ed25519_SECRETKEYSIZE ) ;
49654965}
49664966
49674967/**
4968- * Verifies that sig is a valid signature for the message msg whose length
4969- * is msg_len bytes, using the signer's public key pk .
4968+ * Verifies that `signature` is a valid signature for the ` message` whose length
4969+ * is `message_len` in bytes, using the signer's public key `pk` .
49704970 *
4971- * @param {Uint8Array } sig the signature, size:ecc_sign_ed25519_SIZE
4972- * @param {Uint8Array } msg input message, size:msg_len
4973- * @param {number } msg_len the length of `msg `
4971+ * @param {Uint8Array } signature the signature, size:ecc_sign_ed25519_SIGNATURESIZE
4972+ * @param {Uint8Array } message input message, size:message_len
4973+ * @param {number } message_len the length of `message `
49744974 * @param {Uint8Array } pk the public key, size:ecc_sign_ed25519_PUBLICKEYSIZE
49754975 * @return {number } -1 if the signature fails verification, or 0 on success
49764976 */
4977- Module . ecc_sign_ed25519_verify = (
4978- sig ,
4979- msg ,
4980- msg_len ,
4977+ Module . ecc_sign_ed25519_Verify = (
4978+ signature ,
4979+ message ,
4980+ message_len ,
49814981 pk ,
49824982) => {
4983- const ptr_sig = mput ( sig , ecc_sign_ed25519_SIZE ) ;
4984- const ptr_msg = mput ( msg , msg_len ) ;
4983+ const ptr_signature = mput ( signature , ecc_sign_ed25519_SIGNATURESIZE ) ;
4984+ const ptr_message = mput ( message , message_len ) ;
49854985 const ptr_pk = mput ( pk , ecc_sign_ed25519_PUBLICKEYSIZE ) ;
4986- const fun_ret = _ecc_sign_ed25519_verify (
4987- ptr_sig ,
4988- ptr_msg ,
4989- msg_len ,
4986+ const fun_ret = _ecc_sign_ed25519_Verify (
4987+ ptr_signature ,
4988+ ptr_message ,
4989+ message_len ,
49904990 ptr_pk ,
49914991 ) ;
4992- mfree ( ptr_sig , ecc_sign_ed25519_SIZE ) ;
4993- mfree ( ptr_msg , msg_len ) ;
4992+ mfree ( ptr_signature , ecc_sign_ed25519_SIGNATURESIZE ) ;
4993+ mfree ( ptr_message , message_len ) ;
49944994 mfree ( ptr_pk , ecc_sign_ed25519_PUBLICKEYSIZE ) ;
49954995 return fun_ret ;
49964996}
@@ -5001,13 +5001,13 @@ Module.ecc_sign_ed25519_verify = (
50015001 * @param {Uint8Array } pk (output) public key, size:ecc_sign_ed25519_PUBLICKEYSIZE
50025002 * @param {Uint8Array } sk (output) private key, size:ecc_sign_ed25519_SECRETKEYSIZE
50035003 */
5004- Module . ecc_sign_ed25519_keypair = (
5004+ Module . ecc_sign_ed25519_KeyPair = (
50055005 pk ,
50065006 sk ,
50075007) => {
50085008 const ptr_pk = mput ( pk , ecc_sign_ed25519_PUBLICKEYSIZE ) ;
50095009 const ptr_sk = mput ( sk , ecc_sign_ed25519_SECRETKEYSIZE ) ;
5010- _ecc_sign_ed25519_keypair (
5010+ _ecc_sign_ed25519_KeyPair (
50115011 ptr_pk ,
50125012 ptr_sk ,
50135013 ) ;
@@ -5019,21 +5019,21 @@ Module.ecc_sign_ed25519_keypair = (
50195019
50205020/**
50215021 * Generates a random key pair of public and private keys derived
5022- * from a seed.
5022+ * from a ` seed` .
50235023 *
50245024 * @param {Uint8Array } pk (output) public key, size:ecc_sign_ed25519_PUBLICKEYSIZE
50255025 * @param {Uint8Array } sk (output) private key, size:ecc_sign_ed25519_SECRETKEYSIZE
50265026 * @param {Uint8Array } seed seed to generate the keys, size:ecc_sign_ed25519_SEEDSIZE
50275027 */
5028- Module . ecc_sign_ed25519_seed_keypair = (
5028+ Module . ecc_sign_ed25519_SeedKeyPair = (
50295029 pk ,
50305030 sk ,
50315031 seed ,
50325032) => {
50335033 const ptr_pk = mput ( pk , ecc_sign_ed25519_PUBLICKEYSIZE ) ;
50345034 const ptr_sk = mput ( sk , ecc_sign_ed25519_SECRETKEYSIZE ) ;
50355035 const ptr_seed = mput ( seed , ecc_sign_ed25519_SEEDSIZE ) ;
5036- _ecc_sign_ed25519_seed_keypair (
5036+ _ecc_sign_ed25519_SeedKeyPair (
50375037 ptr_pk ,
50385038 ptr_sk ,
50395039 ptr_seed ,
@@ -5046,18 +5046,18 @@ Module.ecc_sign_ed25519_seed_keypair = (
50465046}
50475047
50485048/**
5049- * Extracts the seed from the secret key sk and copies it into seed.
5049+ * Extracts the seed from the secret key `sk` and copies it into ` seed` .
50505050 *
50515051 * @param {Uint8Array } seed (output) the seed used to generate the secret key, size:ecc_sign_ed25519_SEEDSIZE
50525052 * @param {Uint8Array } sk the secret key, size:ecc_sign_ed25519_SECRETKEYSIZE
50535053 */
5054- Module . ecc_sign_ed25519_sk_to_seed = (
5054+ Module . ecc_sign_ed25519_SkToSeed = (
50555055 seed ,
50565056 sk ,
50575057) => {
50585058 const ptr_seed = mput ( seed , ecc_sign_ed25519_SEEDSIZE ) ;
50595059 const ptr_sk = mput ( sk , ecc_sign_ed25519_SECRETKEYSIZE ) ;
5060- _ecc_sign_ed25519_sk_to_seed (
5060+ _ecc_sign_ed25519_SkToSeed (
50615061 ptr_seed ,
50625062 ptr_sk ,
50635063 ) ;
@@ -5067,18 +5067,18 @@ Module.ecc_sign_ed25519_sk_to_seed = (
50675067}
50685068
50695069/**
5070- * Extracts the public key from the secret key sk and copies it into pk .
5070+ * Extracts the public key from the secret key `sk` and copies it into `pk` .
50715071 *
50725072 * @param {Uint8Array } pk (output) the public key, size:ecc_sign_ed25519_PUBLICKEYSIZE
50735073 * @param {Uint8Array } sk the secret key, size:ecc_sign_ed25519_SECRETKEYSIZE
50745074 */
5075- Module . ecc_sign_ed25519_sk_to_pk = (
5075+ Module . ecc_sign_ed25519_SkToPk = (
50765076 pk ,
50775077 sk ,
50785078) => {
50795079 const ptr_pk = mput ( pk , ecc_sign_ed25519_PUBLICKEYSIZE ) ;
50805080 const ptr_sk = mput ( sk , ecc_sign_ed25519_SECRETKEYSIZE ) ;
5081- _ecc_sign_ed25519_sk_to_pk (
5081+ _ecc_sign_ed25519_SkToPk (
50825082 ptr_pk ,
50835083 ptr_sk ,
50845084 ) ;
0 commit comments