diff options
author | Karel Miko <karel.miko@gmail.com> | 2017-03-01 09:55:32 +0100 |
---|---|---|
committer | Karel Miko <karel.miko@gmail.com> | 2017-03-01 09:55:32 +0100 |
commit | d3fa6a47b9ccce5db77efa50e4765660a53d9896 (patch) | |
tree | 83b845a485834c42d4b9577ad519bf3a646443e5 /src/ltc/pk | |
parent | 724daf3cafb53342959844364c93a04be52bf387 (diff) |
ltc sync
Diffstat (limited to 'src/ltc/pk')
-rw-r--r-- | src/ltc/pk/asn1/der/sequence/der_decode_sequence_ex.c | 16 | ||||
-rw-r--r-- | src/ltc/pk/dh/dh_static.h | 4 | ||||
-rw-r--r-- | src/ltc/pk/ecc/ecc_ansi_x963_export.c | 2 | ||||
-rw-r--r-- | src/ltc/pk/ecc/ecc_ansi_x963_import.c | 8 | ||||
-rw-r--r-- | src/ltc/pk/ecc/ecc_decrypt_key.c | 10 | ||||
-rw-r--r-- | src/ltc/pk/ecc/ecc_encrypt_key.c | 16 | ||||
-rw-r--r-- | src/ltc/pk/ecc/ecc_export.c | 4 | ||||
-rw-r--r-- | src/ltc/pk/ecc/ecc_free.c | 2 | ||||
-rw-r--r-- | src/ltc/pk/ecc/ecc_get_size.c | 4 | ||||
-rw-r--r-- | src/ltc/pk/ecc/ecc_import.c | 6 | ||||
-rw-r--r-- | src/ltc/pk/ecc/ecc_make_key.c | 4 | ||||
-rw-r--r-- | src/ltc/pk/ecc/ecc_shared_secret.c | 2 | ||||
-rw-r--r-- | src/ltc/pk/ecc/ecc_sign_hash.c | 26 | ||||
-rw-r--r-- | src/ltc/pk/ecc/ecc_sizes.c | 2 | ||||
-rw-r--r-- | src/ltc/pk/ecc/ecc_verify_hash.c | 12 | ||||
-rw-r--r-- | src/ltc/pk/ecc/ltc_ecc_is_valid_idx.c | 4 | ||||
-rw-r--r-- | src/ltc/pk/ecc/ltc_ecc_map.c | 4 | ||||
-rw-r--r-- | src/ltc/pk/ecc/ltc_ecc_mul2add.c | 14 | ||||
-rw-r--r-- | src/ltc/pk/ecc/ltc_ecc_points.c | 4 | ||||
-rw-r--r-- | src/ltc/pk/pkcs1/pkcs_1_mgf1.c | 2 |
20 files changed, 73 insertions, 73 deletions
diff --git a/src/ltc/pk/asn1/der/sequence/der_decode_sequence_ex.c b/src/ltc/pk/asn1/der/sequence/der_decode_sequence_ex.c index 03c7e787..fb39c30d 100644 --- a/src/ltc/pk/asn1/der/sequence/der_decode_sequence_ex.c +++ b/src/ltc/pk/asn1/der/sequence/der_decode_sequence_ex.c @@ -71,19 +71,19 @@ int der_decode_sequence_ex(const unsigned char *in, unsigned long inlen, while (y--) { blksize = (blksize << 8) | (unsigned long)in[x++]; } - } + } - /* would this blksize overflow? */ - if (x + blksize > inlen) { - return CRYPT_INVALID_PACKET; - } + /* would this blksize overflow? */ + if (x + blksize > inlen) { + return CRYPT_INVALID_PACKET; + } /* mark all as unused */ for (i = 0; i < (int)outlen; i++) { list[i].used = 0; } - /* ok read data */ + /* ok read data */ inlen = blksize; for (i = 0; i < (int)outlen; i++) { z = 0; @@ -119,8 +119,8 @@ int der_decode_sequence_ex(const unsigned char *in, unsigned long inlen, } if ((err = der_length_boolean(&z)) != CRYPT_OK) { goto LBL_ERR; - } - break; + } + break; case LTC_ASN1_INTEGER: z = inlen; diff --git a/src/ltc/pk/dh/dh_static.h b/src/ltc/pk/dh/dh_static.h index ebc9a380..e8f64ab5 100644 --- a/src/ltc/pk/dh/dh_static.h +++ b/src/ltc/pk/dh/dh_static.h @@ -71,7 +71,7 @@ #define SUPPLIED_PRIME 255 -static void packet_store_header (unsigned char *dst, int section, int subsection) +static LTC_INLINE void packet_store_header (unsigned char *dst, int section, int subsection) { LTC_ARGCHKVD(dst != NULL); @@ -85,7 +85,7 @@ static void packet_store_header (unsigned char *dst, int section, int subsection } -static int packet_valid_header (unsigned char *src, int section, int subsection) +static LTC_INLINE int packet_valid_header (unsigned char *src, int section, int subsection) { unsigned long ver; diff --git a/src/ltc/pk/ecc/ecc_ansi_x963_export.c b/src/ltc/pk/ecc/ecc_ansi_x963_export.c index 3b14721b..fec560bb 100644 --- a/src/ltc/pk/ecc/ecc_ansi_x963_export.c +++ b/src/ltc/pk/ecc/ecc_ansi_x963_export.c @@ -17,7 +17,7 @@ /** @file ecc_ansi_x963_export.c ECC Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MECC diff --git a/src/ltc/pk/ecc/ecc_ansi_x963_import.c b/src/ltc/pk/ecc/ecc_ansi_x963_import.c index ae9e581b..081cf641 100644 --- a/src/ltc/pk/ecc/ecc_ansi_x963_import.c +++ b/src/ltc/pk/ecc/ecc_ansi_x963_import.c @@ -17,11 +17,11 @@ /** @file ecc_ansi_x963_import.c ECC Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MECC -/** Import an ANSI X9.63 format public key +/** Import an ANSI X9.63 format public key @param in The input data to read @param inlen The length of the input data @param key [out] destination to store imported key \ @@ -34,10 +34,10 @@ int ecc_ansi_x963_import(const unsigned char *in, unsigned long inlen, ecc_key * int ecc_ansi_x963_import_ex(const unsigned char *in, unsigned long inlen, ecc_key *key, ltc_ecc_set_type *dp) { int x, err; - + LTC_ARGCHK(in != NULL); LTC_ARGCHK(key != NULL); - + /* must be odd */ if ((inlen & 1) == 0) { return CRYPT_INVALID_ARG; diff --git a/src/ltc/pk/ecc/ecc_decrypt_key.c b/src/ltc/pk/ecc/ecc_decrypt_key.c index 6246c782..6e1d34d7 100644 --- a/src/ltc/pk/ecc/ecc_decrypt_key.c +++ b/src/ltc/pk/ecc/ecc_decrypt_key.c @@ -17,7 +17,7 @@ /** @file ecc_decrypt_key.c ECC Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MECC @@ -31,7 +31,7 @@ @return CRYPT_OK if successful */ int ecc_decrypt_key(const unsigned char *in, unsigned long inlen, - unsigned char *out, unsigned long *outlen, + unsigned char *out, unsigned long *outlen, ecc_key *key) { unsigned char *ecc_shared, *skey, *pub_expt; @@ -49,15 +49,15 @@ int ecc_decrypt_key(const unsigned char *in, unsigned long inlen, if (key->type != PK_PRIVATE) { return CRYPT_PK_NOT_PRIVATE; } - + /* decode to find out hash */ LTC_SET_ASN1(decode, 0, LTC_ASN1_OBJECT_IDENTIFIER, hashOID, sizeof(hashOID)/sizeof(hashOID[0])); - + if ((err = der_decode_sequence(in, inlen, decode, 1)) != CRYPT_OK) { return err; } - hash = find_hash_oid(hashOID, decode[0].size); + hash = find_hash_oid(hashOID, decode[0].size); if (hash_is_valid(hash) != CRYPT_OK) { return CRYPT_INVALID_PACKET; } diff --git a/src/ltc/pk/ecc/ecc_encrypt_key.c b/src/ltc/pk/ecc/ecc_encrypt_key.c index 8380acfa..2b94401c 100644 --- a/src/ltc/pk/ecc/ecc_encrypt_key.c +++ b/src/ltc/pk/ecc/ecc_encrypt_key.c @@ -17,25 +17,25 @@ /** @file ecc_encrypt_key.c ECC Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MECC /** - Encrypt a symmetric key with ECC + Encrypt a symmetric key with ECC @param in The symmetric key you want to encrypt @param inlen The length of the key to encrypt (octets) @param out [out] The destination for the ciphertext @param outlen [in/out] The max size and resulting size of the ciphertext @param prng An active PRNG state - @param wprng The index of the PRNG you wish to use - @param hash The index of the hash you want to use + @param wprng The index of the PRNG you wish to use + @param hash The index of the hash you want to use @param key The ECC key you want to encrypt to @return CRYPT_OK if successful */ int ecc_encrypt_key(const unsigned char *in, unsigned long inlen, - unsigned char *out, unsigned long *outlen, - prng_state *prng, int wprng, int hash, + unsigned char *out, unsigned long *outlen, + prng_state *prng, int wprng, int hash, ecc_key *key) { unsigned char *pub_expt, *ecc_shared, *skey; @@ -88,7 +88,7 @@ int ecc_encrypt_key(const unsigned char *in, unsigned long inlen, ecc_free(&pubkey); goto LBL_ERR; } - + /* make random key */ x = ECC_BUF_SIZE; if ((err = ecc_shared_secret(&pubkey, key, ecc_shared, &x)) != CRYPT_OK) { @@ -100,7 +100,7 @@ int ecc_encrypt_key(const unsigned char *in, unsigned long inlen, if ((err = hash_memory(hash, ecc_shared, x, skey, &y)) != CRYPT_OK) { goto LBL_ERR; } - + /* Encrypt key */ for (x = 0; x < inlen; x++) { skey[x] ^= in[x]; diff --git a/src/ltc/pk/ecc/ecc_export.c b/src/ltc/pk/ecc/ecc_export.c index f41ac4cc..49bb583d 100644 --- a/src/ltc/pk/ecc/ecc_export.c +++ b/src/ltc/pk/ecc/ecc_export.c @@ -17,7 +17,7 @@ /** @file ecc_export.c ECC Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MECC @@ -38,7 +38,7 @@ int ecc_export(unsigned char *out, unsigned long *outlen, int type, ecc_key *key LTC_ARGCHK(out != NULL); LTC_ARGCHK(outlen != NULL); LTC_ARGCHK(key != NULL); - + /* type valid? */ if (key->type != PK_PRIVATE && type == PK_PRIVATE) { return CRYPT_PK_TYPE_MISMATCH; diff --git a/src/ltc/pk/ecc/ecc_free.c b/src/ltc/pk/ecc/ecc_free.c index 510d1691..358c7fe2 100644 --- a/src/ltc/pk/ecc/ecc_free.c +++ b/src/ltc/pk/ecc/ecc_free.c @@ -17,7 +17,7 @@ /** @file ecc_free.c ECC Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MECC diff --git a/src/ltc/pk/ecc/ecc_get_size.c b/src/ltc/pk/ecc/ecc_get_size.c index 72a27ebd..6f24c4e6 100644 --- a/src/ltc/pk/ecc/ecc_get_size.c +++ b/src/ltc/pk/ecc/ecc_get_size.c @@ -17,13 +17,13 @@ /** @file ecc_get_size.c ECC Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MECC /** Get the size of an ECC key - @param key The key to get the size of + @param key The key to get the size of @return The size (octets) of the key or INT_MAX on error */ int ecc_get_size(ecc_key *key) diff --git a/src/ltc/pk/ecc/ecc_import.c b/src/ltc/pk/ecc/ecc_import.c index c58a8f6d..95cb7e28 100644 --- a/src/ltc/pk/ecc/ecc_import.c +++ b/src/ltc/pk/ecc/ecc_import.c @@ -17,7 +17,7 @@ /** @file ecc_import.c ECC Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MECC @@ -57,7 +57,7 @@ int ecc_import_ex(const unsigned char *in, unsigned long inlen, ecc_key *key, co } /* find out what type of key it is */ - if ((err = der_decode_sequence_multi(in, inlen, + if ((err = der_decode_sequence_multi(in, inlen, LTC_ASN1_BIT_STRING, 1UL, &flags, LTC_ASN1_EOL, 0UL, NULL)) != CRYPT_OK) { goto done; @@ -107,7 +107,7 @@ int ecc_import_ex(const unsigned char *in, unsigned long inlen, ecc_key *key, co } /* set z */ if ((err = mp_set(key->pubkey.z, 1)) != CRYPT_OK) { goto done; } - + /* is it a point on the curve? */ if ((err = ltc_ecc_is_point(key->dp, key->pubkey.x, key->pubkey.y)) != CRYPT_OK) { goto done; diff --git a/src/ltc/pk/ecc/ecc_make_key.c b/src/ltc/pk/ecc/ecc_make_key.c index 48dbb502..a1568187 100644 --- a/src/ltc/pk/ecc/ecc_make_key.c +++ b/src/ltc/pk/ecc/ecc_make_key.c @@ -17,12 +17,12 @@ /** @file ecc_make_key.c ECC Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MECC /** - Make a new ECC key + Make a new ECC key @param prng An active PRNG state @param wprng The index of the PRNG you wish to use @param keysize The keysize for the new key (in octets from 20 to 65 bytes) diff --git a/src/ltc/pk/ecc/ecc_shared_secret.c b/src/ltc/pk/ecc/ecc_shared_secret.c index 031acc56..df22f5c3 100644 --- a/src/ltc/pk/ecc/ecc_shared_secret.c +++ b/src/ltc/pk/ecc/ecc_shared_secret.c @@ -17,7 +17,7 @@ /** @file ecc_shared_secret.c ECC Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MECC diff --git a/src/ltc/pk/ecc/ecc_sign_hash.c b/src/ltc/pk/ecc/ecc_sign_hash.c index f643f7bd..e4a135f4 100644 --- a/src/ltc/pk/ecc/ecc_sign_hash.c +++ b/src/ltc/pk/ecc/ecc_sign_hash.c @@ -17,12 +17,12 @@ /** @file ecc_sign_hash.c ECC Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MECC -int ecc_sign_hash_ex(const unsigned char *in, unsigned long inlen, - unsigned char *out, unsigned long *outlen, +int ecc_sign_hash_ex(const unsigned char *in, unsigned long inlen, + unsigned char *out, unsigned long *outlen, prng_state *prng, int wprng, ecc_key *key, int sigformat) { ecc_key pubkey; @@ -40,18 +40,18 @@ int ecc_sign_hash_ex(const unsigned char *in, unsigned long inlen, if (key->type != PK_PRIVATE) { return CRYPT_PK_NOT_PRIVATE; } - + /* is the IDX valid ? */ if (ltc_ecc_is_valid_idx(key->idx) != 1) { return CRYPT_PK_INVALID_TYPE; } - + if ((err = prng_is_valid(wprng)) != CRYPT_OK) { return err; } /* init the bignums */ - if ((err = mp_init_multi(&r, &s, &p, &e, NULL)) != CRYPT_OK) { + if ((err = mp_init_multi(&r, &s, &p, &e, NULL)) != CRYPT_OK) { return err; } if ((err = mp_read_radix(p, (char *)key->dp->order, 16)) != CRYPT_OK) { goto errnokey; } @@ -86,7 +86,7 @@ int ecc_sign_hash_ex(const unsigned char *in, unsigned long inlen, if (mp_iszero(r) == LTC_MP_YES) { ecc_free(&pubkey); - } else { + } else { /* find s = (e + xr)/k */ if ((err = mp_invmod(pubkey.k, p, pubkey.k)) != CRYPT_OK) { goto error; } /* k = 1/k */ if ((err = mp_mulmod(key->k, r, p, s)) != CRYPT_OK) { goto error; } /* s = xr */ @@ -103,7 +103,7 @@ int ecc_sign_hash_ex(const unsigned char *in, unsigned long inlen, if (sigformat == 1) { /* RFC7518 format */ if (*outlen < 2*pbytes) { err = CRYPT_MEM; goto errnokey; } - zeromem(out, 2*pbytes); + zeromem(out, 2*pbytes); i = mp_unsigned_bin_size(r); if ((err = mp_to_unsigned_bin(r, out + (pbytes - i))) != CRYPT_OK) goto errnokey; i = mp_unsigned_bin_size(s); @@ -123,7 +123,7 @@ error: ecc_free(&pubkey); errnokey: mp_clear_multi(r, s, p, e, NULL); - return err; + return err; } /** @@ -137,8 +137,8 @@ errnokey: @param key A private ECC key @return CRYPT_OK if successful */ -int ecc_sign_hash(const unsigned char *in, unsigned long inlen, - unsigned char *out, unsigned long *outlen, +int ecc_sign_hash(const unsigned char *in, unsigned long inlen, + unsigned char *out, unsigned long *outlen, prng_state *prng, int wprng, ecc_key *key) { return ecc_sign_hash_ex(in, inlen, out, outlen, prng, wprng, key, 0); @@ -155,8 +155,8 @@ int ecc_sign_hash(const unsigned char *in, unsigned long inlen, @param key A private ECC key @return CRYPT_OK if successful */ -int ecc_sign_hash_rfc7518(const unsigned char *in, unsigned long inlen, - unsigned char *out, unsigned long *outlen, +int ecc_sign_hash_rfc7518(const unsigned char *in, unsigned long inlen, + unsigned char *out, unsigned long *outlen, prng_state *prng, int wprng, ecc_key *key) { return ecc_sign_hash_ex(in, inlen, out, outlen, prng, wprng, key, 1); diff --git a/src/ltc/pk/ecc/ecc_sizes.c b/src/ltc/pk/ecc/ecc_sizes.c index 8ea7f241..3dbe37a5 100644 --- a/src/ltc/pk/ecc/ecc_sizes.c +++ b/src/ltc/pk/ecc/ecc_sizes.c @@ -17,7 +17,7 @@ /** @file ecc_sizes.c ECC Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MECC diff --git a/src/ltc/pk/ecc/ecc_verify_hash.c b/src/ltc/pk/ecc/ecc_verify_hash.c index 1c9c67fa..6e5c7241 100644 --- a/src/ltc/pk/ecc/ecc_verify_hash.c +++ b/src/ltc/pk/ecc/ecc_verify_hash.c @@ -17,14 +17,14 @@ /** @file ecc_verify_hash.c ECC Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MECC -/* verify +/* verify * * w = s^-1 mod n - * u1 = xw + * u1 = xw * u2 = rw * X = u1*G + u2*Q * v = X_x1 mod n @@ -32,7 +32,7 @@ */ int ecc_verify_hash_ex(const unsigned char *sig, unsigned long siglen, - const unsigned char *hash, unsigned long hashlen, + const unsigned char *hash, unsigned long hashlen, int *stat, ecc_key *key, int sigformat) { ecc_point *mG, *mQ; @@ -190,7 +190,7 @@ error: @return CRYPT_OK if successful (even if the signature is not valid) */ int ecc_verify_hash(const unsigned char *sig, unsigned long siglen, - const unsigned char *hash, unsigned long hashlen, + const unsigned char *hash, unsigned long hashlen, int *stat, ecc_key *key) { return ecc_verify_hash_ex(sig, siglen, hash, hashlen, stat, key, 0); @@ -207,7 +207,7 @@ int ecc_verify_hash(const unsigned char *sig, unsigned long siglen, @return CRYPT_OK if successful (even if the signature is not valid) */ int ecc_verify_hash_rfc7518(const unsigned char *sig, unsigned long siglen, - const unsigned char *hash, unsigned long hashlen, + const unsigned char *hash, unsigned long hashlen, int *stat, ecc_key *key) { return ecc_verify_hash_ex(sig, siglen, hash, hashlen, stat, key, 1); diff --git a/src/ltc/pk/ecc/ltc_ecc_is_valid_idx.c b/src/ltc/pk/ecc/ltc_ecc_is_valid_idx.c index 47243bc4..b53eaca7 100644 --- a/src/ltc/pk/ecc/ltc_ecc_is_valid_idx.c +++ b/src/ltc/pk/ecc/ltc_ecc_is_valid_idx.c @@ -17,14 +17,14 @@ /** @file ltc_ecc_is_valid_idx.c ECC Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MECC /** Returns whether an ECC idx is valid or not @param n The idx number to check @return 1 if valid, 0 if not -*/ +*/ int ltc_ecc_is_valid_idx(int n) { int x; diff --git a/src/ltc/pk/ecc/ltc_ecc_map.c b/src/ltc/pk/ecc/ltc_ecc_map.c index 3646581e..d5b041b0 100644 --- a/src/ltc/pk/ecc/ltc_ecc_map.c +++ b/src/ltc/pk/ecc/ltc_ecc_map.c @@ -17,7 +17,7 @@ /** @file ltc_ecc_map.c ECC Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MECC @@ -46,7 +46,7 @@ int ltc_ecc_map(ecc_point *P, void *modulus, void *mp) /* get 1/z */ if ((err = mp_invmod(P->z, modulus, t1)) != CRYPT_OK) { goto done; } - + /* get 1/z^2 and 1/z^3 */ if ((err = mp_sqr(t1, t2)) != CRYPT_OK) { goto done; } if ((err = mp_mod(t2, modulus, t2)) != CRYPT_OK) { goto done; } diff --git a/src/ltc/pk/ecc/ltc_ecc_mul2add.c b/src/ltc/pk/ecc/ltc_ecc_mul2add.c index e9636555..6b222f4c 100644 --- a/src/ltc/pk/ecc/ltc_ecc_mul2add.c +++ b/src/ltc/pk/ecc/ltc_ecc_mul2add.c @@ -17,7 +17,7 @@ /** @file ltc_ecc_mul2add.c ECC Crypto, Shamir's Trick, Tom St Denis -*/ +*/ #ifdef LTC_MECC @@ -29,9 +29,9 @@ @param B Second point to multiply @param kB What to multiple B by @param C [out] Destination point (can overlap with A or B - @param modulus Modulus for curve + @param modulus Modulus for curve @return CRYPT_OK on success -*/ +*/ int ltc_ecc_mul2add(ecc_point *A, void *kA, ecc_point *B, void *kB, ecc_point *C, @@ -44,7 +44,7 @@ int ltc_ecc_mul2add(ecc_point *A, void *kA, unsigned char *tA, *tB; int err, first; void *mp, *mu; - + /* argchks */ LTC_ARGCHK(A != NULL); LTC_ARGCHK(B != NULL); @@ -126,7 +126,7 @@ int ltc_ecc_mul2add(ecc_point *A, void *kA, for (y = 1; y < 4; y++) { if ((err = ltc_mp.ecc_ptadd(precomp[x], precomp[(y<<2)], precomp[x+(y<<2)], a, modulus, mp)) != CRYPT_OK) { goto ERR_MU; } } - } + } nibble = 3; first = 1; @@ -147,8 +147,8 @@ int ltc_ecc_mul2add(ecc_point *A, void *kA, /* extract two bits from both, shift/update */ nA = (bitbufA >> 6) & 0x03; nB = (bitbufB >> 6) & 0x03; - bitbufA = (bitbufA << 2) & 0xFF; - bitbufB = (bitbufB << 2) & 0xFF; + bitbufA = (bitbufA << 2) & 0xFF; + bitbufB = (bitbufB << 2) & 0xFF; /* if both zero, if first, continue */ if ((nA == 0) && (nB == 0) && (first == 1)) { diff --git a/src/ltc/pk/ecc/ltc_ecc_points.c b/src/ltc/pk/ecc/ltc_ecc_points.c index 92a1c683..2b45c726 100644 --- a/src/ltc/pk/ecc/ltc_ecc_points.c +++ b/src/ltc/pk/ecc/ltc_ecc_points.c @@ -17,13 +17,13 @@ /** @file ltc_ecc_points.c ECC Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MECC /** Allocate a new ECC point - @return A newly allocated point or NULL on error + @return A newly allocated point or NULL on error */ ecc_point *ltc_ecc_new_point(void) { diff --git a/src/ltc/pk/pkcs1/pkcs_1_mgf1.c b/src/ltc/pk/pkcs1/pkcs_1_mgf1.c index c7c2b5bc..a063128e 100644 --- a/src/ltc/pk/pkcs1/pkcs_1_mgf1.c +++ b/src/ltc/pk/pkcs1/pkcs_1_mgf1.c @@ -19,9 +19,9 @@ /** Perform PKCS #1 MGF1 (internal) + @param hash_idx The index of the hash desired @param seed The seed for MGF1 @param seedlen The length of the seed - @param hash_idx The index of the hash desired @param mask [out] The destination @param masklen The length of the mask desired @return CRYPT_OK if successful |