Skip to content

Commit 1819a02

Browse files
committed
update comments
[skip ci]
1 parent e20e204 commit 1819a02

3 files changed

Lines changed: 14 additions & 12 deletions

File tree

src/headers/tomcrypt_pk.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,7 @@ int dh_shared_secret(dh_key *private_key, dh_key *public_key,
232232

233233
void dh_free(dh_key *key);
234234

235-
int dh_export_key(void *out, unsigned long *outlen,
236-
int type, dh_key *key);
235+
int dh_export_key(void *out, unsigned long *outlen, int type, dh_key *key);
237236

238237
#ifdef LTC_SOURCE
239238
/* internal helper functions */

src/pk/dh/dh_set.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,13 @@ int dh_set_pg_groupsize(int groupsize, dh_key *key)
7878
}
7979

8080
/**
81-
Import DH key parts pub and priv from raw numbers
81+
Import DH public or private key part from raw numbers
8282
83-
@param pub DH's pub (public key) (can be NULL if priv is valid)
84-
@param publen DH's pub's length
85-
@param priv DH's priv (private key) (can be NULL if pub is valid)
86-
@param privlen DH's priv's length
83+
NB: The p & g parts must be set beforehand
84+
85+
@param in The key-part to import, either public or private.
86+
@param inlen The key-part's length
87+
@param type Which type of key (PK_PRIVATE or PK_PUBLIC)
8788
@param key [out] the destination for the imported key
8889
@return CRYPT_OK if successful
8990
*/

src/pk/dsa/dsa_set.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,13 @@ int dsa_set_pqg(const unsigned char *p, unsigned long plen,
5858
}
5959

6060
/**
61-
Import DSA public or private key from raw numbers
62-
@param pub DSA's y (public key) in binary representation
63-
@param publen The length of pub
64-
@param priv DSA's x (private key) in binary representation (can be NULL when importing public key)
65-
@param privlen The length of priv
61+
Import DSA public or private key-part from raw numbers
62+
63+
NB: The p, q & g parts must be set beforehand
64+
65+
@param in The key-part to import, either public or private.
66+
@param inlen The key-part's length
67+
@param type Which type of key (PK_PRIVATE or PK_PUBLIC)
6668
@param key [out] the destination for the imported key
6769
@return CRYPT_OK if successful.
6870
*/

0 commit comments

Comments
 (0)