Added missing 'const' qualifier to many functions' parameters #324

Merged
TrinityCoder merged 2 commits from fix-missing-const-params into develop 2018-04-09 04:58:38 -05:00
TrinityCoder commented 2017-11-08 22:14:25 -06:00 (Migrated from github.com)

I have found several functions taking non-cost pointers, while the only thing they do is return size of some keys.

I believe that functions like these really should take their arguments as const rsa_key* to preserve const-correctness and not being forced to write (i. e. in C++) things like

inline int GetKeySize() const { return ::rsa_get_size(const_cast<rsa_key*>(&key_)); }

If someone comes across another function(s) which should have const parameter but do not, you can write here and we can fix them all at once instead of splitting that into several commits.

Thanks!

EDIT: As was pointed out by several commenters, there are many more functions in which
a non-const pointer parameter is not used to change the pointed-to object, therefore the pointer can be declared as a const pointer. See below for the full discussion.

I have found several functions taking non-cost pointers, while the only thing they do is return size of some keys. I believe that functions like these really should take their arguments as `const rsa_key*` to preserve const-correctness and not being forced to write (i. e. in C++) things like `inline int GetKeySize() const { return ::rsa_get_size(const_cast<rsa_key*>(&key_)); }` If someone comes across another function(s) which should have `const` parameter but do not, you can write here and we can fix them all at once instead of splitting that into several commits. Thanks! **_EDIT:_** As was pointed out by several commenters, there are many more functions in which a non-const pointer parameter is not used to change the pointed-to object, therefore the pointer can be declared as a const pointer. See below for the full discussion.
sjaeckel commented 2017-11-09 08:08:21 -06:00 (Migrated from github.com)

There's a huge bunch of functions that could use a const*, probably @fperrad can create a list from its linter?

I guess this could be the start of tackling the API improvements :)

There's a huge bunch of functions that could use a `const*`, probably @fperrad can create a list from its linter? I guess this could be the start of tackling the [API improvements](https://github.com/libtom/libtomcrypt/labels/improve%20API) :)
karel-m commented 2017-11-09 12:51:58 -06:00 (Migrated from github.com)

I agree that we should handle this consistently at least over all rsa_*, ecc_*, dh_*, dsa_*

I agree that we should handle this consistently at least over all `rsa_*`, `ecc_*`, `dh_*`, `dsa_*`
fperrad commented 2017-11-09 14:00:21 -06:00 (Migrated from github.com)

Here a first list (151 items).
Note: this kind of work is incremental, when the first founds are fixed, the linter could find the next ones.

src/pk/dh/dh_shared_secret.c  74  Info 818: Pointer parameter 'private_key' (line 22) could be declared as pointing to const
src/pk/dh/dh.c  231  Info 818: Pointer parameter 'key' (line 227) could be declared as pointing to const
src/pk/dh/dh_export.c  56  Info 818: Pointer parameter 'key' (line 22) could be declared as pointing to const
src/pk/dh/dh_export_key.c  41  Info 818: Pointer parameter 'key' (line 22) could be declared as pointing to const
src/pk/dh/dh_check_pubkey.c  59  Info 818: Pointer parameter 'key' (line 19) could be declared as pointing to const
src/pk/rsa/rsa_export.c  91  Info 818: Pointer parameter 'key' (line 26) could be declared as pointing to const
src/pk/rsa/rsa_exptmod.c  176  Info 818: Pointer parameter 'key' (line 31) could be declared as pointing to const
src/pk/rsa/rsa_get_size.c  34  Info 818: Pointer parameter 'key' (line 23) could be declared as pointing to const
src/pk/asn1/der/object_identifier/der_length_object_identifier.c  81  Info 818: Pointer parameter 'words' (line 38) could be declared as pointing to const
src/pk/asn1/der/generalizedtime/der_length_generalizedtime.c  52  Info 818: Pointer parameter 'gtime' (line 25) could be declared as pointing to const
src/pk/asn1/der/sequence/der_length_sequence.c  187  Info 818: Pointer parameter 'list' (line 31) could be declared as pointing to const
src/pk/asn1/der/utctime/der_length_utctime.c  38  Info 818: Pointer parameter 'utctime' (line 24) could be declared as pointing to const
src/pk/asn1/der/set/der_encode_set.c  101  Info 818: Pointer parameter 'list' (line 72) could be declared as pointing to const
src/pk/ecc/ecc_free.c  32  Info 818: Pointer parameter 'key' (line 28) could be declared as pointing to const
src/pk/ecc/ecc_sign_hash.c  126  Info 818: Pointer parameter 'key' (line 21) could be declared as pointing to const
src/pk/ecc/ltc_ecc_projective_dbl_point.c  140  Info 818: Pointer parameter 'P' (line 32) could be declared as pointing to const
src/pk/ecc/ltc_ecc_projective_dbl_point.c  140  Info 818: Pointer parameter 'R' (line 32) could be declared as pointing to const
src/pk/ecc/ecc_import.c  70  Info 818: Pointer parameter 'key' (line 24) could be declared as pointing to const
src/pk/ecc/ecc_ansi_x963_export.c  71  Info 818: Pointer parameter 'key' (line 30) could be declared as pointing to const
src/pk/ecc/ecc_ansi_x963_import.c  96  Info 818: Pointer parameter 'dp' (line 34) could be declared as pointing to const
src/pk/ecc/ltc_ecc_mulmod_timing.c  156  Info 818: Pointer parameter 'G' (line 35) could be declared as pointing to const
src/pk/ecc/ltc_ecc_projective_add_point.c  187  Info 818: Pointer parameter 'Q' (line 33) could be declared as pointing to const
src/pk/ecc/ecc_export.c  74  Info 818: Pointer parameter 'key' (line 32) could be declared as pointing to const
src/pk/ecc/ltc_ecc_map.c  67  Info 818: Pointer parameter 'P' (line 31) could be declared as pointing to const
src/pk/ecc/ecc_verify_hash.c  160  Info 818: Pointer parameter 'key' (line 21) could be declared as pointing to const
src/pk/ecc/ecc_get_size.c  36  Info 818: Pointer parameter 'key' (line 29) could be declared as pointing to const
src/pk/ecc/ltc_ecc_mul2add.c  199  Info 818: Pointer parameter 'A' (line 35) could be declared as pointing to const
src/pk/ecc/ltc_ecc_mul2add.c  199  Info 818: Pointer parameter 'B' (line 36) could be declared as pointing to const
src/pk/ecc/ecc_shared_secret.c  87  Info 818: Pointer parameter 'private_key' (line 32) could be declared as pointing to const
src/pk/dsa/dsa_sign_hash.c  105  Info 818: Pointer parameter 'key' (line 31) could be declared as pointing to const
src/pk/dsa/dsa_verify_key.c  95  Info 818: Pointer parameter 'key' (line 50) could be declared as pointing to const
src/pk/dsa/dsa_verify_key.c  130  Info 818: Pointer parameter 'key' (line 104) could be declared as pointing to const
src/pk/dsa/dsa_verify_key.c  193  Info 818: Pointer parameter 'key' (line 139) could be declared as pointing to const
src/pk/dsa/dsa_export.c  109  Info 818: Pointer parameter 'key' (line 26) could be declared as pointing to const
src/pk/dsa/dsa_shared_secret.c  64  Info 818: Pointer parameter 'public_key' (line 28) could be declared as pointing to const
src/pk/dsa/dsa_verify_hash.c  83  Info 818: Pointer parameter 'key' (line 31) could be declared as pointing to const
src/modes/cbc/cbc_getiv.c  38  Info 818: Pointer parameter 'cbc' (line 25) could be declared as pointing to const
src/modes/lrw/lrw_getiv.c  38  Info 818: Pointer parameter 'lrw' (line 25) could be declared as pointing to const
src/modes/ctr/ctr_getiv.c  38  Info 818: Pointer parameter 'ctr' (line 25) could be declared as pointing to const
src/modes/cfb/cfb_getiv.c  38  Info 818: Pointer parameter 'cfb' (line 25) could be declared as pointing to const
src/modes/xts/xts_test.c  39  Info 818: Pointer parameter 'skey1' (line 15) could be declared as pointing to const
src/modes/xts/xts_test.c  39  Info 818: Pointer parameter 'skey2' (line 15) could be declared as pointing to const
src/modes/xts/xts_test.c  66  Info 818: Pointer parameter 'skey1' (line 42) could be declared as pointing to const
src/modes/xts/xts_test.c  66  Info 818: Pointer parameter 'skey2' (line 42) could be declared as pointing to const
src/modes/f8/f8_getiv.c  38  Info 818: Pointer parameter 'f8' (line 25) could be declared as pointing to const
src/modes/ofb/ofb_getiv.c  38  Info 818: Pointer parameter 'ofb' (line 25) could be declared as pointing to const
src/hashes/sha3.c  300  Info 818: Pointer parameter 'outlen' (line 289) could be declared as pointing to const
src/hashes/md5.c  214  Info 818: Pointer parameter 'buf' (line 101) could be declared as pointing to const
src/hashes/chc/chc.c  154  Info 818: Pointer parameter 'buf' (line 130) could be declared as pointing to const
src/hashes/rmd128.c  253  Info 818: Pointer parameter 'buf' (line 84) could be declared as pointing to const
src/hashes/rmd256.c  262  Info 818: Pointer parameter 'buf' (line 78) could be declared as pointing to const
src/hashes/whirl/whirl.c  108  Info 818: Pointer parameter 'buf' (line 58) could be declared as pointing to const
src/hashes/sha2/sha512.c  155  Info 818: Pointer parameter 'buf' (line 94) could be declared as pointing to const
src/hashes/sha2/sha256.c  187  Info 818: Pointer parameter 'buf' (line 69) could be declared as pointing to const
src/hashes/rmd320.c  325  Info 818: Pointer parameter 'buf' (line 99) could be declared as pointing to const
src/hashes/sha1.c  146  Info 818: Pointer parameter 'buf' (line 45) could be declared as pointing to const
src/hashes/md4.c  155  Info 818: Pointer parameter 'buf' (line 76) could be declared as pointing to const
src/hashes/tiger.c  587  Info 818: Pointer parameter 'x' (line 577) could be declared as pointing to const
src/hashes/tiger.c  639  Info 818: Pointer parameter 'buf' (line 613) could be declared as pointing to const
src/hashes/rmd160.c  311  Info 818: Pointer parameter 'buf' (line 104) could be declared as pointing to const
src/stream/sober128/sober128_stream.c  36  Info 818: Pointer parameter 'b' (line 31) could be declared as pointing to const
src/stream/sober128/sober128_stream.c  86  Info 818: Pointer parameter 'c' (line 81) could be declared as pointing to const
src/prngs/fortuna.c  395  Info 818: Pointer parameter 'prng' (line 331) could be declared as pointing to const
src/math/ltm_desc.c  71  Info 818: Pointer parameter 'a' (line 66) could be declared as pointing to const
src/math/ltm_desc.c  78  Info 818: Pointer parameter 'a' (line 73) could be declared as pointing to const
src/math/ltm_desc.c  99  Info 818: Pointer parameter 'a' (line 95) could be declared as pointing to const
src/math/ltm_desc.c  129  Info 818: Pointer parameter 'a' (line 117) could be declared as pointing to const
src/math/ltm_desc.c  129  Info 818: Pointer parameter 'b' (line 117) could be declared as pointing to const
src/math/ltm_desc.c  142  Info 818: Pointer parameter 'a' (line 131) could be declared as pointing to const
src/math/ltm_desc.c  148  Info 818: Pointer parameter 'a' (line 144) could be declared as pointing to const
src/math/ltm_desc.c  154  Info 818: Pointer parameter 'a' (line 150) could be declared as pointing to const
src/math/ltm_desc.c  179  Info 818: Pointer parameter 'a' (line 174) could be declared as pointing to const
src/math/ltm_desc.c  186  Info 818: Pointer parameter 'a' (line 182) could be declared as pointing to const
src/math/ltm_desc.c  194  Info 818: Pointer parameter 'a' (line 189) could be declared as pointing to const
src/math/ltm_desc.c  202  Info 818: Pointer parameter 'b' (line 197) could be declared as pointing to const
src/math/ltm_desc.c  211  Info 818: Pointer parameter 'a' (line 205) could be declared as pointing to const
src/math/ltm_desc.c  211  Info 818: Pointer parameter 'b' (line 205) could be declared as pointing to const
src/math/ltm_desc.c  218  Info 818: Pointer parameter 'a' (line 213) could be declared as pointing to const
src/math/ltm_desc.c  227  Info 818: Pointer parameter 'a' (line 221) could be declared as pointing to const
src/math/ltm_desc.c  227  Info 818: Pointer parameter 'b' (line 221) could be declared as pointing to const
src/math/ltm_desc.c  234  Info 818: Pointer parameter 'a' (line 229) could be declared as pointing to const
src/math/ltm_desc.c  243  Info 818: Pointer parameter 'a' (line 237) could be declared as pointing to const
src/math/ltm_desc.c  243  Info 818: Pointer parameter 'b' (line 237) could be declared as pointing to const
src/math/ltm_desc.c  250  Info 818: Pointer parameter 'a' (line 245) could be declared as pointing to const
src/math/ltm_desc.c  258  Info 818: Pointer parameter 'a' (line 253) could be declared as pointing to const
src/math/ltm_desc.c  266  Info 818: Pointer parameter 'a' (line 261) could be declared as pointing to const
src/math/ltm_desc.c  266  Info 818: Pointer parameter 'b' (line 261) could be declared as pointing to const
src/math/ltm_desc.c  273  Info 818: Pointer parameter 'a' (line 268) could be declared as pointing to const
src/math/ltm_desc.c  289  Info 818: Pointer parameter 'a' (line 276) could be declared as pointing to const
src/math/ltm_desc.c  298  Info 818: Pointer parameter 'a' (line 292) could be declared as pointing to const
src/math/ltm_desc.c  298  Info 818: Pointer parameter 'b' (line 292) could be declared as pointing to const
src/math/ltm_desc.c  307  Info 818: Pointer parameter 'a' (line 301) could be declared as pointing to const
src/math/ltm_desc.c  307  Info 818: Pointer parameter 'b' (line 301) could be declared as pointing to const
src/math/ltm_desc.c  316  Info 818: Pointer parameter 'a' (line 309) could be declared as pointing to const
src/math/ltm_desc.c  316  Info 818: Pointer parameter 'b' (line 309) could be declared as pointing to const
src/math/ltm_desc.c  316  Info 818: Pointer parameter 'c' (line 309) could be declared as pointing to const
src/math/ltm_desc.c  325  Info 818: Pointer parameter 'a' (line 318) could be declared as pointing to const
src/math/ltm_desc.c  325  Info 818: Pointer parameter 'b' (line 318) could be declared as pointing to const
src/math/ltm_desc.c  325  Info 818: Pointer parameter 'c' (line 318) could be declared as pointing to const
src/math/ltm_desc.c  334  Info 818: Pointer parameter 'a' (line 327) could be declared as pointing to const
src/math/ltm_desc.c  334  Info 818: Pointer parameter 'b' (line 327) could be declared as pointing to const
src/math/ltm_desc.c  334  Info 818: Pointer parameter 'c' (line 327) could be declared as pointing to const
src/math/ltm_desc.c  342  Info 818: Pointer parameter 'a' (line 336) could be declared as pointing to const
src/math/ltm_desc.c  342  Info 818: Pointer parameter 'b' (line 336) could be declared as pointing to const
src/math/ltm_desc.c  351  Info 818: Pointer parameter 'a' (line 345) could be declared as pointing to const
src/math/ltm_desc.c  351  Info 818: Pointer parameter 'b' (line 345) could be declared as pointing to const
src/math/ltm_desc.c  367  Info 818: Pointer parameter 'a' (line 354) could be declared as pointing to const
src/math/ltm_desc.c  375  Info 818: Pointer parameter 'b' (line 370) could be declared as pointing to const
src/math/ltm_desc.c  384  Info 818: Pointer parameter 'b' (line 378) could be declared as pointing to const
src/math/ltm_desc.c  384  Info 818: Pointer parameter 'c' (line 378) could be declared as pointing to const
src/math/ltm_desc.c  399  Info 818: Pointer parameter 'a' (line 392) could be declared as pointing to const
src/math/ltm_desc.c  399  Info 818: Pointer parameter 'b' (line 392) could be declared as pointing to const
src/math/ltm_desc.c  399  Info 818: Pointer parameter 'c' (line 392) could be declared as pointing to const
src/math/ltm_desc.c  412  Info 818: Pointer parameter 'a' (line 401) could be declared as pointing to const
src/ciphers/kasumi.c  121  Info 818: Pointer parameter 'key' (line 99) could be declared as pointing to const
src/ciphers/kasumi.c  137  Info 818: Pointer parameter 'key' (line 123) could be declared as pointing to const
src/ciphers/cast5.c  571  Info 818: Pointer parameter 'skey' (line 539) could be declared as pointing to const
src/ciphers/cast5.c  625  Info 818: Pointer parameter 'skey' (line 592) could be declared as pointing to const
src/ciphers/camellia.c  206  Info 818: Pointer parameter 'in' (line 196) could be declared as pointing to const
src/ciphers/camellia.c  531  Info 818: Pointer parameter 'skey' (line 439) could be declared as pointing to const
src/ciphers/camellia.c  626  Info 818: Pointer parameter 'skey' (line 533) could be declared as pointing to const
src/ciphers/serpent.c  531  Info 818: Pointer parameter 'k' (line 491) could be declared as pointing to const
src/ciphers/serpent.c  572  Info 818: Pointer parameter 'k' (line 533) could be declared as pointing to const
src/ciphers/twofish/twofish.c  268  Info 818: Pointer parameter 'M' (line 240) could be declared as pointing to const
src/ciphers/idea.c  145  Info 818: Pointer parameter 'm_key' (line 107) could be declared as pointing to const
src/ciphers/des.c  1607  Info 818: Pointer parameter 'skey' (line 1595) could be declared as pointing to const
src/ciphers/des.c  1628  Info 818: Pointer parameter 'skey' (line 1616) could be declared as pointing to const
src/ciphers/des.c  1652  Info 818: Pointer parameter 'skey' (line 1637) could be declared as pointing to const
src/ciphers/des.c  1675  Info 818: Pointer parameter 'skey' (line 1661) could be declared as pointing to const
src/ciphers/skipjack.c  120  Info 818: Pointer parameter 'key' (line 110) could be declared as pointing to const
src/ciphers/skipjack.c  132  Info 818: Pointer parameter 'key' (line 122) could be declared as pointing to const
src/ciphers/multi2.c  30  Info 818: Pointer parameter 'k' (line 23) could be declared as pointing to const
src/ciphers/multi2.c  42  Info 818: Pointer parameter 'k' (line 32) could be declared as pointing to const
src/ciphers/multi2.c  50  Info 818: Pointer parameter 'k' (line 44) could be declared as pointing to const
src/ciphers/multi2.c  78  Info 818: Pointer parameter 'dk' (line 52) could be declared as pointing to const
src/ciphers/blowfish.c  432  Info 818: Pointer parameter 'skey' (line 391) could be declared as pointing to const
src/ciphers/blowfish.c  493  Info 818: Pointer parameter 'skey' (line 453) could be declared as pointing to const
src/ciphers/xtea.c  101  Info 818: Pointer parameter 'skey' (line 74) could be declared as pointing to const
src/ciphers/xtea.c  137  Info 818: Pointer parameter 'skey' (line 110) could be declared as pointing to const
src/ciphers/khazad.c  751  Info 818: Pointer parameter 'skey' (line 744) could be declared as pointing to const
src/ciphers/khazad.c  767  Info 818: Pointer parameter 'skey' (line 760) could be declared as pointing to const
src/ciphers/anubis.c  1128  Info 818: Pointer parameter 'roundKey' (line 1038) could be declared as pointing to const
src/ciphers/kseed.c  248  Info 818: Pointer parameter 'K' (line 239) could be declared as pointing to const
src/ciphers/noekeon.c  146  Info 818: Pointer parameter 'skey' (line 113) could be declared as pointing to const
src/ciphers/noekeon.c  199  Info 818: Pointer parameter 'skey' (line 167) could be declared as pointing to const
src/ciphers/safer/saferp.c  396  Info 818: Pointer parameter 'skey' (line 341) could be declared as pointing to const
src/ciphers/safer/saferp.c  460  Info 818: Pointer parameter 'skey' (line 405) could be declared as pointing to const
src/encauth/gcm/gcm_mult_h.c  52  Info 818: Pointer parameter 'gcm' (line 22) could be declared as pointing to const
src/encauth/eax/eax_decrypt_verify_memory.c  103  Info 818: Pointer parameter 'tag' (line 41) could be declared as pointing to const
src/misc/adler32.c  107  Info 818: Pointer parameter 'ctx' (line 82) could be declared as pointing to const
src/misc/crc32.c  178  Info 818: Pointer parameter 'ctx' (line 162) could be declared as pointing to const
Here a first list (151 items). Note: this kind of work is incremental, when the first founds are fixed, the linter could find the next ones. ``` src/pk/dh/dh_shared_secret.c 74 Info 818: Pointer parameter 'private_key' (line 22) could be declared as pointing to const src/pk/dh/dh.c 231 Info 818: Pointer parameter 'key' (line 227) could be declared as pointing to const src/pk/dh/dh_export.c 56 Info 818: Pointer parameter 'key' (line 22) could be declared as pointing to const src/pk/dh/dh_export_key.c 41 Info 818: Pointer parameter 'key' (line 22) could be declared as pointing to const src/pk/dh/dh_check_pubkey.c 59 Info 818: Pointer parameter 'key' (line 19) could be declared as pointing to const src/pk/rsa/rsa_export.c 91 Info 818: Pointer parameter 'key' (line 26) could be declared as pointing to const src/pk/rsa/rsa_exptmod.c 176 Info 818: Pointer parameter 'key' (line 31) could be declared as pointing to const src/pk/rsa/rsa_get_size.c 34 Info 818: Pointer parameter 'key' (line 23) could be declared as pointing to const src/pk/asn1/der/object_identifier/der_length_object_identifier.c 81 Info 818: Pointer parameter 'words' (line 38) could be declared as pointing to const src/pk/asn1/der/generalizedtime/der_length_generalizedtime.c 52 Info 818: Pointer parameter 'gtime' (line 25) could be declared as pointing to const src/pk/asn1/der/sequence/der_length_sequence.c 187 Info 818: Pointer parameter 'list' (line 31) could be declared as pointing to const src/pk/asn1/der/utctime/der_length_utctime.c 38 Info 818: Pointer parameter 'utctime' (line 24) could be declared as pointing to const src/pk/asn1/der/set/der_encode_set.c 101 Info 818: Pointer parameter 'list' (line 72) could be declared as pointing to const src/pk/ecc/ecc_free.c 32 Info 818: Pointer parameter 'key' (line 28) could be declared as pointing to const src/pk/ecc/ecc_sign_hash.c 126 Info 818: Pointer parameter 'key' (line 21) could be declared as pointing to const src/pk/ecc/ltc_ecc_projective_dbl_point.c 140 Info 818: Pointer parameter 'P' (line 32) could be declared as pointing to const src/pk/ecc/ltc_ecc_projective_dbl_point.c 140 Info 818: Pointer parameter 'R' (line 32) could be declared as pointing to const src/pk/ecc/ecc_import.c 70 Info 818: Pointer parameter 'key' (line 24) could be declared as pointing to const src/pk/ecc/ecc_ansi_x963_export.c 71 Info 818: Pointer parameter 'key' (line 30) could be declared as pointing to const src/pk/ecc/ecc_ansi_x963_import.c 96 Info 818: Pointer parameter 'dp' (line 34) could be declared as pointing to const src/pk/ecc/ltc_ecc_mulmod_timing.c 156 Info 818: Pointer parameter 'G' (line 35) could be declared as pointing to const src/pk/ecc/ltc_ecc_projective_add_point.c 187 Info 818: Pointer parameter 'Q' (line 33) could be declared as pointing to const src/pk/ecc/ecc_export.c 74 Info 818: Pointer parameter 'key' (line 32) could be declared as pointing to const src/pk/ecc/ltc_ecc_map.c 67 Info 818: Pointer parameter 'P' (line 31) could be declared as pointing to const src/pk/ecc/ecc_verify_hash.c 160 Info 818: Pointer parameter 'key' (line 21) could be declared as pointing to const src/pk/ecc/ecc_get_size.c 36 Info 818: Pointer parameter 'key' (line 29) could be declared as pointing to const src/pk/ecc/ltc_ecc_mul2add.c 199 Info 818: Pointer parameter 'A' (line 35) could be declared as pointing to const src/pk/ecc/ltc_ecc_mul2add.c 199 Info 818: Pointer parameter 'B' (line 36) could be declared as pointing to const src/pk/ecc/ecc_shared_secret.c 87 Info 818: Pointer parameter 'private_key' (line 32) could be declared as pointing to const src/pk/dsa/dsa_sign_hash.c 105 Info 818: Pointer parameter 'key' (line 31) could be declared as pointing to const src/pk/dsa/dsa_verify_key.c 95 Info 818: Pointer parameter 'key' (line 50) could be declared as pointing to const src/pk/dsa/dsa_verify_key.c 130 Info 818: Pointer parameter 'key' (line 104) could be declared as pointing to const src/pk/dsa/dsa_verify_key.c 193 Info 818: Pointer parameter 'key' (line 139) could be declared as pointing to const src/pk/dsa/dsa_export.c 109 Info 818: Pointer parameter 'key' (line 26) could be declared as pointing to const src/pk/dsa/dsa_shared_secret.c 64 Info 818: Pointer parameter 'public_key' (line 28) could be declared as pointing to const src/pk/dsa/dsa_verify_hash.c 83 Info 818: Pointer parameter 'key' (line 31) could be declared as pointing to const src/modes/cbc/cbc_getiv.c 38 Info 818: Pointer parameter 'cbc' (line 25) could be declared as pointing to const src/modes/lrw/lrw_getiv.c 38 Info 818: Pointer parameter 'lrw' (line 25) could be declared as pointing to const src/modes/ctr/ctr_getiv.c 38 Info 818: Pointer parameter 'ctr' (line 25) could be declared as pointing to const src/modes/cfb/cfb_getiv.c 38 Info 818: Pointer parameter 'cfb' (line 25) could be declared as pointing to const src/modes/xts/xts_test.c 39 Info 818: Pointer parameter 'skey1' (line 15) could be declared as pointing to const src/modes/xts/xts_test.c 39 Info 818: Pointer parameter 'skey2' (line 15) could be declared as pointing to const src/modes/xts/xts_test.c 66 Info 818: Pointer parameter 'skey1' (line 42) could be declared as pointing to const src/modes/xts/xts_test.c 66 Info 818: Pointer parameter 'skey2' (line 42) could be declared as pointing to const src/modes/f8/f8_getiv.c 38 Info 818: Pointer parameter 'f8' (line 25) could be declared as pointing to const src/modes/ofb/ofb_getiv.c 38 Info 818: Pointer parameter 'ofb' (line 25) could be declared as pointing to const src/hashes/sha3.c 300 Info 818: Pointer parameter 'outlen' (line 289) could be declared as pointing to const src/hashes/md5.c 214 Info 818: Pointer parameter 'buf' (line 101) could be declared as pointing to const src/hashes/chc/chc.c 154 Info 818: Pointer parameter 'buf' (line 130) could be declared as pointing to const src/hashes/rmd128.c 253 Info 818: Pointer parameter 'buf' (line 84) could be declared as pointing to const src/hashes/rmd256.c 262 Info 818: Pointer parameter 'buf' (line 78) could be declared as pointing to const src/hashes/whirl/whirl.c 108 Info 818: Pointer parameter 'buf' (line 58) could be declared as pointing to const src/hashes/sha2/sha512.c 155 Info 818: Pointer parameter 'buf' (line 94) could be declared as pointing to const src/hashes/sha2/sha256.c 187 Info 818: Pointer parameter 'buf' (line 69) could be declared as pointing to const src/hashes/rmd320.c 325 Info 818: Pointer parameter 'buf' (line 99) could be declared as pointing to const src/hashes/sha1.c 146 Info 818: Pointer parameter 'buf' (line 45) could be declared as pointing to const src/hashes/md4.c 155 Info 818: Pointer parameter 'buf' (line 76) could be declared as pointing to const src/hashes/tiger.c 587 Info 818: Pointer parameter 'x' (line 577) could be declared as pointing to const src/hashes/tiger.c 639 Info 818: Pointer parameter 'buf' (line 613) could be declared as pointing to const src/hashes/rmd160.c 311 Info 818: Pointer parameter 'buf' (line 104) could be declared as pointing to const src/stream/sober128/sober128_stream.c 36 Info 818: Pointer parameter 'b' (line 31) could be declared as pointing to const src/stream/sober128/sober128_stream.c 86 Info 818: Pointer parameter 'c' (line 81) could be declared as pointing to const src/prngs/fortuna.c 395 Info 818: Pointer parameter 'prng' (line 331) could be declared as pointing to const src/math/ltm_desc.c 71 Info 818: Pointer parameter 'a' (line 66) could be declared as pointing to const src/math/ltm_desc.c 78 Info 818: Pointer parameter 'a' (line 73) could be declared as pointing to const src/math/ltm_desc.c 99 Info 818: Pointer parameter 'a' (line 95) could be declared as pointing to const src/math/ltm_desc.c 129 Info 818: Pointer parameter 'a' (line 117) could be declared as pointing to const src/math/ltm_desc.c 129 Info 818: Pointer parameter 'b' (line 117) could be declared as pointing to const src/math/ltm_desc.c 142 Info 818: Pointer parameter 'a' (line 131) could be declared as pointing to const src/math/ltm_desc.c 148 Info 818: Pointer parameter 'a' (line 144) could be declared as pointing to const src/math/ltm_desc.c 154 Info 818: Pointer parameter 'a' (line 150) could be declared as pointing to const src/math/ltm_desc.c 179 Info 818: Pointer parameter 'a' (line 174) could be declared as pointing to const src/math/ltm_desc.c 186 Info 818: Pointer parameter 'a' (line 182) could be declared as pointing to const src/math/ltm_desc.c 194 Info 818: Pointer parameter 'a' (line 189) could be declared as pointing to const src/math/ltm_desc.c 202 Info 818: Pointer parameter 'b' (line 197) could be declared as pointing to const src/math/ltm_desc.c 211 Info 818: Pointer parameter 'a' (line 205) could be declared as pointing to const src/math/ltm_desc.c 211 Info 818: Pointer parameter 'b' (line 205) could be declared as pointing to const src/math/ltm_desc.c 218 Info 818: Pointer parameter 'a' (line 213) could be declared as pointing to const src/math/ltm_desc.c 227 Info 818: Pointer parameter 'a' (line 221) could be declared as pointing to const src/math/ltm_desc.c 227 Info 818: Pointer parameter 'b' (line 221) could be declared as pointing to const src/math/ltm_desc.c 234 Info 818: Pointer parameter 'a' (line 229) could be declared as pointing to const src/math/ltm_desc.c 243 Info 818: Pointer parameter 'a' (line 237) could be declared as pointing to const src/math/ltm_desc.c 243 Info 818: Pointer parameter 'b' (line 237) could be declared as pointing to const src/math/ltm_desc.c 250 Info 818: Pointer parameter 'a' (line 245) could be declared as pointing to const src/math/ltm_desc.c 258 Info 818: Pointer parameter 'a' (line 253) could be declared as pointing to const src/math/ltm_desc.c 266 Info 818: Pointer parameter 'a' (line 261) could be declared as pointing to const src/math/ltm_desc.c 266 Info 818: Pointer parameter 'b' (line 261) could be declared as pointing to const src/math/ltm_desc.c 273 Info 818: Pointer parameter 'a' (line 268) could be declared as pointing to const src/math/ltm_desc.c 289 Info 818: Pointer parameter 'a' (line 276) could be declared as pointing to const src/math/ltm_desc.c 298 Info 818: Pointer parameter 'a' (line 292) could be declared as pointing to const src/math/ltm_desc.c 298 Info 818: Pointer parameter 'b' (line 292) could be declared as pointing to const src/math/ltm_desc.c 307 Info 818: Pointer parameter 'a' (line 301) could be declared as pointing to const src/math/ltm_desc.c 307 Info 818: Pointer parameter 'b' (line 301) could be declared as pointing to const src/math/ltm_desc.c 316 Info 818: Pointer parameter 'a' (line 309) could be declared as pointing to const src/math/ltm_desc.c 316 Info 818: Pointer parameter 'b' (line 309) could be declared as pointing to const src/math/ltm_desc.c 316 Info 818: Pointer parameter 'c' (line 309) could be declared as pointing to const src/math/ltm_desc.c 325 Info 818: Pointer parameter 'a' (line 318) could be declared as pointing to const src/math/ltm_desc.c 325 Info 818: Pointer parameter 'b' (line 318) could be declared as pointing to const src/math/ltm_desc.c 325 Info 818: Pointer parameter 'c' (line 318) could be declared as pointing to const src/math/ltm_desc.c 334 Info 818: Pointer parameter 'a' (line 327) could be declared as pointing to const src/math/ltm_desc.c 334 Info 818: Pointer parameter 'b' (line 327) could be declared as pointing to const src/math/ltm_desc.c 334 Info 818: Pointer parameter 'c' (line 327) could be declared as pointing to const src/math/ltm_desc.c 342 Info 818: Pointer parameter 'a' (line 336) could be declared as pointing to const src/math/ltm_desc.c 342 Info 818: Pointer parameter 'b' (line 336) could be declared as pointing to const src/math/ltm_desc.c 351 Info 818: Pointer parameter 'a' (line 345) could be declared as pointing to const src/math/ltm_desc.c 351 Info 818: Pointer parameter 'b' (line 345) could be declared as pointing to const src/math/ltm_desc.c 367 Info 818: Pointer parameter 'a' (line 354) could be declared as pointing to const src/math/ltm_desc.c 375 Info 818: Pointer parameter 'b' (line 370) could be declared as pointing to const src/math/ltm_desc.c 384 Info 818: Pointer parameter 'b' (line 378) could be declared as pointing to const src/math/ltm_desc.c 384 Info 818: Pointer parameter 'c' (line 378) could be declared as pointing to const src/math/ltm_desc.c 399 Info 818: Pointer parameter 'a' (line 392) could be declared as pointing to const src/math/ltm_desc.c 399 Info 818: Pointer parameter 'b' (line 392) could be declared as pointing to const src/math/ltm_desc.c 399 Info 818: Pointer parameter 'c' (line 392) could be declared as pointing to const src/math/ltm_desc.c 412 Info 818: Pointer parameter 'a' (line 401) could be declared as pointing to const src/ciphers/kasumi.c 121 Info 818: Pointer parameter 'key' (line 99) could be declared as pointing to const src/ciphers/kasumi.c 137 Info 818: Pointer parameter 'key' (line 123) could be declared as pointing to const src/ciphers/cast5.c 571 Info 818: Pointer parameter 'skey' (line 539) could be declared as pointing to const src/ciphers/cast5.c 625 Info 818: Pointer parameter 'skey' (line 592) could be declared as pointing to const src/ciphers/camellia.c 206 Info 818: Pointer parameter 'in' (line 196) could be declared as pointing to const src/ciphers/camellia.c 531 Info 818: Pointer parameter 'skey' (line 439) could be declared as pointing to const src/ciphers/camellia.c 626 Info 818: Pointer parameter 'skey' (line 533) could be declared as pointing to const src/ciphers/serpent.c 531 Info 818: Pointer parameter 'k' (line 491) could be declared as pointing to const src/ciphers/serpent.c 572 Info 818: Pointer parameter 'k' (line 533) could be declared as pointing to const src/ciphers/twofish/twofish.c 268 Info 818: Pointer parameter 'M' (line 240) could be declared as pointing to const src/ciphers/idea.c 145 Info 818: Pointer parameter 'm_key' (line 107) could be declared as pointing to const src/ciphers/des.c 1607 Info 818: Pointer parameter 'skey' (line 1595) could be declared as pointing to const src/ciphers/des.c 1628 Info 818: Pointer parameter 'skey' (line 1616) could be declared as pointing to const src/ciphers/des.c 1652 Info 818: Pointer parameter 'skey' (line 1637) could be declared as pointing to const src/ciphers/des.c 1675 Info 818: Pointer parameter 'skey' (line 1661) could be declared as pointing to const src/ciphers/skipjack.c 120 Info 818: Pointer parameter 'key' (line 110) could be declared as pointing to const src/ciphers/skipjack.c 132 Info 818: Pointer parameter 'key' (line 122) could be declared as pointing to const src/ciphers/multi2.c 30 Info 818: Pointer parameter 'k' (line 23) could be declared as pointing to const src/ciphers/multi2.c 42 Info 818: Pointer parameter 'k' (line 32) could be declared as pointing to const src/ciphers/multi2.c 50 Info 818: Pointer parameter 'k' (line 44) could be declared as pointing to const src/ciphers/multi2.c 78 Info 818: Pointer parameter 'dk' (line 52) could be declared as pointing to const src/ciphers/blowfish.c 432 Info 818: Pointer parameter 'skey' (line 391) could be declared as pointing to const src/ciphers/blowfish.c 493 Info 818: Pointer parameter 'skey' (line 453) could be declared as pointing to const src/ciphers/xtea.c 101 Info 818: Pointer parameter 'skey' (line 74) could be declared as pointing to const src/ciphers/xtea.c 137 Info 818: Pointer parameter 'skey' (line 110) could be declared as pointing to const src/ciphers/khazad.c 751 Info 818: Pointer parameter 'skey' (line 744) could be declared as pointing to const src/ciphers/khazad.c 767 Info 818: Pointer parameter 'skey' (line 760) could be declared as pointing to const src/ciphers/anubis.c 1128 Info 818: Pointer parameter 'roundKey' (line 1038) could be declared as pointing to const src/ciphers/kseed.c 248 Info 818: Pointer parameter 'K' (line 239) could be declared as pointing to const src/ciphers/noekeon.c 146 Info 818: Pointer parameter 'skey' (line 113) could be declared as pointing to const src/ciphers/noekeon.c 199 Info 818: Pointer parameter 'skey' (line 167) could be declared as pointing to const src/ciphers/safer/saferp.c 396 Info 818: Pointer parameter 'skey' (line 341) could be declared as pointing to const src/ciphers/safer/saferp.c 460 Info 818: Pointer parameter 'skey' (line 405) could be declared as pointing to const src/encauth/gcm/gcm_mult_h.c 52 Info 818: Pointer parameter 'gcm' (line 22) could be declared as pointing to const src/encauth/eax/eax_decrypt_verify_memory.c 103 Info 818: Pointer parameter 'tag' (line 41) could be declared as pointing to const src/misc/adler32.c 107 Info 818: Pointer parameter 'ctx' (line 82) could be declared as pointing to const src/misc/crc32.c 178 Info 818: Pointer parameter 'ctx' (line 162) could be declared as pointing to const ```
sjaeckel commented 2017-11-09 14:21:27 -06:00 (Migrated from github.com)

151 items

damn 😆

> 151 items damn :laughing:
rofl0r commented 2017-11-09 14:32:01 -06:00 (Migrated from github.com)

@TrinityCoder go go go xD

@TrinityCoder go go go xD
TrinityCoder commented 2017-11-10 07:59:25 -06:00 (Migrated from github.com)

@rofl0r OK, I will start with the list provided by @fperrad and will look forward to see what comes next :)

@rofl0r OK, I will start with the list provided by @fperrad and will look forward to see what comes next :)
sjaeckel commented 2017-11-20 05:56:59 -06:00 (Migrated from github.com)

I just realized that we have to be careful when changing this in the 3 different implementations of ltc_math_descriptor... I'd say you can probably leave them out or the code will most likely become splattered by casts back to non-const because ltm doesn't have a release with const* arguments yet and tfm doesn't even have it implemted...

I just realized that we have to be careful when changing this in the 3 different implementations of `ltc_math_descriptor`... I'd say you can probably leave them out or the code will most likely become splattered by casts back to non-const because ltm doesn't have a release with `const*` arguments yet and tfm doesn't even have it implemted...
TrinityCoder commented 2018-01-02 19:07:18 -06:00 (Migrated from github.com)

Thanks @sjaeckel for the comment and sorry for taking long to reply.

CURRENT STATUS

I have taken a look at all those errors coming from the Travis build, and the main problem is probably in errors similar to this one (which actually counts for the majority of error log):

"makefile V=1"        "-DUSE_LTM -DLTM_DESC" "-ltommath"
...
PTHREAD (-DLTC_PTHREAD -O2, makefile V=1 IGNORE_SPEED=1)...
building...build  PTHREAD failed! printing gcc_2.txt now for convenience
src/math/ltm_desc.c: In function ‘neg’:
src/math/ltm_desc.c:70:4: warning: passing argument 1 of ‘mp_neg’ discards ‘const’ qualifier from pointer target type [enabled by default]
    return mpi_to_ltc_error(mp_neg(a, b));
    ^
In file included from src/math/ltm_desc.c:15:0:
/usr/include/tommath.h:299:5: note: expected ‘struct mp_int *’ but argument is of type ‘const void *’
 int mp_neg(mp_int *a, mp_int *b);
     ^

These errors arise because now we are correctly passing const pointers inside our code,
but we have not changed anything in i. e. libtommath itself, which also uses the "incorrect"
non-const pointer approach...

SOLUTION

Let me think a few minutes about this...

Thanks @sjaeckel for the comment and sorry for taking long to reply. # CURRENT STATUS I have taken a look at all those errors coming from the Travis build, and the main problem is probably in errors similar to this one (which actually counts for the majority of error log): ```bash "makefile V=1" "-DUSE_LTM -DLTM_DESC" "-ltommath" ... PTHREAD (-DLTC_PTHREAD -O2, makefile V=1 IGNORE_SPEED=1)... building...build PTHREAD failed! printing gcc_2.txt now for convenience src/math/ltm_desc.c: In function ‘neg’: src/math/ltm_desc.c:70:4: warning: passing argument 1 of ‘mp_neg’ discards ‘const’ qualifier from pointer target type [enabled by default] return mpi_to_ltc_error(mp_neg(a, b)); ^ In file included from src/math/ltm_desc.c:15:0: /usr/include/tommath.h:299:5: note: expected ‘struct mp_int *’ but argument is of type ‘const void *’ int mp_neg(mp_int *a, mp_int *b); ^ ``` These errors arise because now we are correctly passing `const` pointers inside our code, but we have not changed anything in i. e. `libtommath` itself, which also uses the "incorrect" non-const pointer approach... # SOLUTION _Let me think a few minutes about this..._
rofl0r commented 2018-01-02 20:03:39 -06:00 (Migrated from github.com)

tommath.h:299:5: note: expected ‘struct mp_int *’ but argument is of type ‘const void *’
this doesn't look like its only due to addition of const

`tommath.h:299:5: note: expected ‘struct mp_int *’ but argument is of type ‘const void *’` this doesn't look like its only due to addition of `const`
TrinityCoder commented 2018-01-02 20:54:52 -06:00 (Migrated from github.com)

@sjaeckel Sorry for requesting a review a few minutes ago; it was a missclick

@rofl0r Yes you are right, this error appears as well, I know about it and I will fix it

@sjaeckel Sorry for requesting a review a few minutes ago; it was a missclick @rofl0r Yes you are right, this error appears as well, I know about it and I will fix it
sjaeckel commented 2018-01-03 08:04:52 -06:00 (Migrated from github.com)

Cool, thanks for continuing work on this!
As already mentioned here, I think we can leave the math descriptors as they are for now.

Cool, thanks for continuing work on this! [As already mentioned here](https://github.com/libtom/libtomcrypt/pull/324#issuecomment-345675034), I think we can leave the math descriptors as they are for now.
sjaeckel commented 2018-01-15 11:23:29 -06:00 (Migrated from github.com)

@sjaeckel Sorry for requesting a review a few minutes ago; it was a missclick

No problem :) I removed myself from the reviewers list, can you please add me again as soon as you think it should be reviewed!

> @sjaeckel Sorry for requesting a review a few minutes ago; it was a missclick No problem :) I removed myself from the reviewers list, can you please add me again as soon as you think it should be reviewed!
TrinityCoder commented 2018-01-15 11:32:19 -06:00 (Migrated from github.com)

@sjaeckel Yes, I will try to fix all the functions (except the math descriptor ones...) and immediately tag you for review :)

@sjaeckel Yes, I will try to fix all the functions (except the math descriptor ones...) and immediately tag you for review :)
sjaeckel commented 2018-02-15 13:32:19 -06:00 (Migrated from github.com)

@fperrad could you please merge this locally into develop and update your list w/o src/math/*_desc.c?

@TrinityCoder when you have the time to continue:

  1. can you please rebase on top of develop and squash the commits together into one
  2. revert the modifications to doc/crypt.tex

thx

@fperrad could you please merge this locally into develop and update your list w/o `src/math/*_desc.c`? @TrinityCoder when you have the time to continue: 1. can you please rebase on top of develop and squash the commits together into one 2. revert the modifications to `doc/crypt.tex` thx
fperrad commented 2018-02-16 14:17:06 -06:00 (Migrated from github.com)

Here the second list (79 items)

src/pk/rsa/rsa_sign_saltlen_get.c  41  Info 818: Pointer parameter 'key' (line 25) could be declared as pointing to const
src/pk/rsa/rsa_exptmod.c  176  Info 818: Pointer parameter 'key' (line 31) could be declared as pointing to const
src/pk/asn1/der/object_identifier/der_encode_object_identifier.c  103  Info 818: Pointer parameter 'words' (line 25) could be declared as pointing to const
src/pk/asn1/der/generalizedtime/der_encode_generalizedtime.c  102  Info 818: Pointer parameter 'gtime' (line 40) could be declared as pointing to const
src/pk/asn1/der/utctime/der_encode_utctime.c  75  Info 818: Pointer parameter 'utctime' (line 31) could be declared as pointing to const
src/pk/ecc/ecc_free.c  32  Info 818: Pointer parameter 'key' (line 28) could be declared as pointing to const
src/pk/ecc/ecc_sign_hash.c  126  Info 818: Pointer parameter 'key' (line 21) could be declared as pointing to const
src/pk/ecc/ltc_ecc_projective_dbl_point.c  140  Info 818: Pointer parameter 'P' (line 32) could be declared as pointing to const
src/pk/ecc/ltc_ecc_projective_dbl_point.c  140  Info 818: Pointer parameter 'R' (line 32) could be declared as pointing to const
src/pk/ecc/ecc_import.c  70  Info 818: Pointer parameter 'key' (line 24) could be declared as pointing to const
src/pk/ecc/ecc_ansi_x963_export.c  71  Info 818: Pointer parameter 'key' (line 30) could be declared as pointing to const
src/pk/ecc/ecc_ansi_x963_import.c  96  Info 818: Pointer parameter 'dp' (line 34) could be declared as pointing to const
src/pk/ecc/ltc_ecc_mulmod_timing.c  156  Info 818: Pointer parameter 'G' (line 35) could be declared as pointing to const
src/pk/ecc/ltc_ecc_projective_add_point.c  187  Info 818: Pointer parameter 'Q' (line 33) could be declared as pointing to const
src/pk/ecc/ecc_export.c  74  Info 818: Pointer parameter 'key' (line 32) could be declared as pointing to const
src/pk/ecc/ltc_ecc_map.c  67  Info 818: Pointer parameter 'P' (line 31) could be declared as pointing to const
src/pk/ecc/ecc_verify_hash.c  160  Info 818: Pointer parameter 'key' (line 21) could be declared as pointing to const
src/pk/ecc/ltc_ecc_mul2add.c  199  Info 818: Pointer parameter 'A' (line 35) could be declared as pointing to const
src/pk/ecc/ltc_ecc_mul2add.c  199  Info 818: Pointer parameter 'B' (line 36) could be declared as pointing to const
src/pk/ecc/ecc_shared_secret.c  87  Info 818: Pointer parameter 'private_key' (line 32) could be declared as pointing to const
src/pk/dsa/dsa_sign_hash.c  105  Info 818: Pointer parameter 'key' (line 31) could be declared as pointing to const
src/pk/dsa/dsa_verify_key.c  95  Info 818: Pointer parameter 'key' (line 50) could be declared as pointing to const
src/pk/dsa/dsa_verify_key.c  130  Info 818: Pointer parameter 'key' (line 104) could be declared as pointing to const
src/pk/dsa/dsa_verify_key.c  193  Info 818: Pointer parameter 'key' (line 139) could be declared as pointing to const
src/pk/dsa/dsa_export.c  109  Info 818: Pointer parameter 'key' (line 26) could be declared as pointing to const
src/pk/dsa/dsa_shared_secret.c  64  Info 818: Pointer parameter 'public_key' (line 28) could be declared as pointing to const
src/pk/dsa/dsa_verify_hash.c  83  Info 818: Pointer parameter 'key' (line 31) could be declared as pointing to const
src/modes/cbc/cbc_getiv.c  38  Info 818: Pointer parameter 'cbc' (line 25) could be declared as pointing to const
src/modes/lrw/lrw_getiv.c  38  Info 818: Pointer parameter 'lrw' (line 25) could be declared as pointing to const
src/modes/ctr/ctr_getiv.c  38  Info 818: Pointer parameter 'ctr' (line 25) could be declared as pointing to const
src/modes/cfb/cfb_getiv.c  38  Info 818: Pointer parameter 'cfb' (line 25) could be declared as pointing to const
src/modes/xts/xts_test.c  39  Info 818: Pointer parameter 'skey1' (line 15) could be declared as pointing to const
src/modes/xts/xts_test.c  39  Info 818: Pointer parameter 'skey2' (line 15) could be declared as pointing to const
src/modes/xts/xts_test.c  66  Info 818: Pointer parameter 'skey1' (line 42) could be declared as pointing to const
src/modes/xts/xts_test.c  66  Info 818: Pointer parameter 'skey2' (line 42) could be declared as pointing to const
src/modes/f8/f8_getiv.c  38  Info 818: Pointer parameter 'f8' (line 25) could be declared as pointing to const
src/modes/ofb/ofb_getiv.c  38  Info 818: Pointer parameter 'ofb' (line 25) could be declared as pointing to const
src/hashes/chc/chc.c  154  Info 818: Pointer parameter 'buf' (line 130) could be declared as pointing to const
src/hashes/tiger.c  587  Info 818: Pointer parameter 'x' (line 577) could be declared as pointing to const
src/stream/sober128/sober128_stream.c  86  Info 818: Pointer parameter 'c' (line 81) could be declared as pointing to const
src/stream/sosemanuk/sosemanuk.c  330  Info 818: Pointer parameter 'key' (line 204) could be declared as pointing to const
src/stream/sosemanuk/sosemanuk.c  448  Info 818: Pointer parameter 'iv' (line 344) could be declared as pointing to const
src/prngs/fortuna.c  396  Info 818: Pointer parameter 'prng' (line 332) could be declared as pointing to const
src/ciphers/kasumi.c  121  Info 818: Pointer parameter 'key' (line 99) could be declared as pointing to const
src/ciphers/kasumi.c  137  Info 818: Pointer parameter 'key' (line 123) could be declared as pointing to const
src/ciphers/cast5.c  571  Info 818: Pointer parameter 'skey' (line 539) could be declared as pointing to const
src/ciphers/cast5.c  625  Info 818: Pointer parameter 'skey' (line 592) could be declared as pointing to const
src/ciphers/camellia.c  531  Info 818: Pointer parameter 'skey' (line 439) could be declared as pointing to const
src/ciphers/camellia.c  626  Info 818: Pointer parameter 'skey' (line 533) could be declared as pointing to const
src/ciphers/serpent.c  598  Info 818: Pointer parameter 'skey' (line 591) could be declared as pointing to const
src/ciphers/serpent.c  607  Info 818: Pointer parameter 'skey' (line 600) could be declared as pointing to const
src/ciphers/idea.c  165  Info 818: Pointer parameter 'skey' (line 158) could be declared as pointing to const
src/ciphers/idea.c  174  Info 818: Pointer parameter 'skey' (line 167) could be declared as pointing to const
src/ciphers/des.c  1607  Info 818: Pointer parameter 'skey' (line 1595) could be declared as pointing to const
src/ciphers/des.c  1628  Info 818: Pointer parameter 'skey' (line 1616) could be declared as pointing to const
src/ciphers/des.c  1652  Info 818: Pointer parameter 'skey' (line 1637) could be declared as pointing to const
src/ciphers/des.c  1675  Info 818: Pointer parameter 'skey' (line 1661) could be declared as pointing to const
src/ciphers/skipjack.c  187  Info 818: Pointer parameter 'skey' (line 144) could be declared as pointing to const
src/ciphers/skipjack.c  255  Info 818: Pointer parameter 'skey' (line 208) could be declared as pointing to const
src/ciphers/multi2.c  78  Info 818: Pointer parameter 'k' (line 52) could be declared as pointing to const
src/ciphers/multi2.c  90  Info 818: Pointer parameter 'uk' (line 80) could be declared as pointing to const
src/ciphers/multi2.c  105  Info 818: Pointer parameter 'uk' (line 92) could be declared as pointing to const
src/ciphers/blowfish.c  432  Info 818: Pointer parameter 'skey' (line 391) could be declared as pointing to const
src/ciphers/blowfish.c  493  Info 818: Pointer parameter 'skey' (line 453) could be declared as pointing to const
src/ciphers/xtea.c  101  Info 818: Pointer parameter 'skey' (line 74) could be declared as pointing to const
src/ciphers/xtea.c  137  Info 818: Pointer parameter 'skey' (line 110) could be declared as pointing to const
src/ciphers/khazad.c  751  Info 818: Pointer parameter 'skey' (line 744) could be declared as pointing to const
src/ciphers/khazad.c  767  Info 818: Pointer parameter 'skey' (line 760) could be declared as pointing to const
src/ciphers/anubis.c  1128  Info 818: Pointer parameter 'roundKey' (line 1038) could be declared as pointing to const
src/ciphers/kseed.c  270  Info 818: Pointer parameter 'skey' (line 257) could be declared as pointing to const
src/ciphers/kseed.c  292  Info 818: Pointer parameter 'skey' (line 279) could be declared as pointing to const
src/ciphers/noekeon.c  146  Info 818: Pointer parameter 'skey' (line 113) could be declared as pointing to const
src/ciphers/noekeon.c  199  Info 818: Pointer parameter 'skey' (line 167) could be declared as pointing to const
src/ciphers/safer/saferp.c  396  Info 818: Pointer parameter 'skey' (line 341) could be declared as pointing to const
src/ciphers/safer/saferp.c  460  Info 818: Pointer parameter 'skey' (line 405) could be declared as pointing to const
src/encauth/gcm/gcm_mult_h.c  52  Info 818: Pointer parameter 'gcm' (line 22) could be declared as pointing to const
src/encauth/eax/eax_decrypt_verify_memory.c  103  Info 818: Pointer parameter 'tag' (line 41) could be declared as pointing to const
src/misc/adler32.c  107  Info 818: Pointer parameter 'ctx' (line 82) could be declared as pointing to const
src/misc/crc32.c  178  Info 818: Pointer parameter 'ctx' (line 162) could be declared as pointing to const
Here the second list (79 items) ``` src/pk/rsa/rsa_sign_saltlen_get.c 41 Info 818: Pointer parameter 'key' (line 25) could be declared as pointing to const src/pk/rsa/rsa_exptmod.c 176 Info 818: Pointer parameter 'key' (line 31) could be declared as pointing to const src/pk/asn1/der/object_identifier/der_encode_object_identifier.c 103 Info 818: Pointer parameter 'words' (line 25) could be declared as pointing to const src/pk/asn1/der/generalizedtime/der_encode_generalizedtime.c 102 Info 818: Pointer parameter 'gtime' (line 40) could be declared as pointing to const src/pk/asn1/der/utctime/der_encode_utctime.c 75 Info 818: Pointer parameter 'utctime' (line 31) could be declared as pointing to const src/pk/ecc/ecc_free.c 32 Info 818: Pointer parameter 'key' (line 28) could be declared as pointing to const src/pk/ecc/ecc_sign_hash.c 126 Info 818: Pointer parameter 'key' (line 21) could be declared as pointing to const src/pk/ecc/ltc_ecc_projective_dbl_point.c 140 Info 818: Pointer parameter 'P' (line 32) could be declared as pointing to const src/pk/ecc/ltc_ecc_projective_dbl_point.c 140 Info 818: Pointer parameter 'R' (line 32) could be declared as pointing to const src/pk/ecc/ecc_import.c 70 Info 818: Pointer parameter 'key' (line 24) could be declared as pointing to const src/pk/ecc/ecc_ansi_x963_export.c 71 Info 818: Pointer parameter 'key' (line 30) could be declared as pointing to const src/pk/ecc/ecc_ansi_x963_import.c 96 Info 818: Pointer parameter 'dp' (line 34) could be declared as pointing to const src/pk/ecc/ltc_ecc_mulmod_timing.c 156 Info 818: Pointer parameter 'G' (line 35) could be declared as pointing to const src/pk/ecc/ltc_ecc_projective_add_point.c 187 Info 818: Pointer parameter 'Q' (line 33) could be declared as pointing to const src/pk/ecc/ecc_export.c 74 Info 818: Pointer parameter 'key' (line 32) could be declared as pointing to const src/pk/ecc/ltc_ecc_map.c 67 Info 818: Pointer parameter 'P' (line 31) could be declared as pointing to const src/pk/ecc/ecc_verify_hash.c 160 Info 818: Pointer parameter 'key' (line 21) could be declared as pointing to const src/pk/ecc/ltc_ecc_mul2add.c 199 Info 818: Pointer parameter 'A' (line 35) could be declared as pointing to const src/pk/ecc/ltc_ecc_mul2add.c 199 Info 818: Pointer parameter 'B' (line 36) could be declared as pointing to const src/pk/ecc/ecc_shared_secret.c 87 Info 818: Pointer parameter 'private_key' (line 32) could be declared as pointing to const src/pk/dsa/dsa_sign_hash.c 105 Info 818: Pointer parameter 'key' (line 31) could be declared as pointing to const src/pk/dsa/dsa_verify_key.c 95 Info 818: Pointer parameter 'key' (line 50) could be declared as pointing to const src/pk/dsa/dsa_verify_key.c 130 Info 818: Pointer parameter 'key' (line 104) could be declared as pointing to const src/pk/dsa/dsa_verify_key.c 193 Info 818: Pointer parameter 'key' (line 139) could be declared as pointing to const src/pk/dsa/dsa_export.c 109 Info 818: Pointer parameter 'key' (line 26) could be declared as pointing to const src/pk/dsa/dsa_shared_secret.c 64 Info 818: Pointer parameter 'public_key' (line 28) could be declared as pointing to const src/pk/dsa/dsa_verify_hash.c 83 Info 818: Pointer parameter 'key' (line 31) could be declared as pointing to const src/modes/cbc/cbc_getiv.c 38 Info 818: Pointer parameter 'cbc' (line 25) could be declared as pointing to const src/modes/lrw/lrw_getiv.c 38 Info 818: Pointer parameter 'lrw' (line 25) could be declared as pointing to const src/modes/ctr/ctr_getiv.c 38 Info 818: Pointer parameter 'ctr' (line 25) could be declared as pointing to const src/modes/cfb/cfb_getiv.c 38 Info 818: Pointer parameter 'cfb' (line 25) could be declared as pointing to const src/modes/xts/xts_test.c 39 Info 818: Pointer parameter 'skey1' (line 15) could be declared as pointing to const src/modes/xts/xts_test.c 39 Info 818: Pointer parameter 'skey2' (line 15) could be declared as pointing to const src/modes/xts/xts_test.c 66 Info 818: Pointer parameter 'skey1' (line 42) could be declared as pointing to const src/modes/xts/xts_test.c 66 Info 818: Pointer parameter 'skey2' (line 42) could be declared as pointing to const src/modes/f8/f8_getiv.c 38 Info 818: Pointer parameter 'f8' (line 25) could be declared as pointing to const src/modes/ofb/ofb_getiv.c 38 Info 818: Pointer parameter 'ofb' (line 25) could be declared as pointing to const src/hashes/chc/chc.c 154 Info 818: Pointer parameter 'buf' (line 130) could be declared as pointing to const src/hashes/tiger.c 587 Info 818: Pointer parameter 'x' (line 577) could be declared as pointing to const src/stream/sober128/sober128_stream.c 86 Info 818: Pointer parameter 'c' (line 81) could be declared as pointing to const src/stream/sosemanuk/sosemanuk.c 330 Info 818: Pointer parameter 'key' (line 204) could be declared as pointing to const src/stream/sosemanuk/sosemanuk.c 448 Info 818: Pointer parameter 'iv' (line 344) could be declared as pointing to const src/prngs/fortuna.c 396 Info 818: Pointer parameter 'prng' (line 332) could be declared as pointing to const src/ciphers/kasumi.c 121 Info 818: Pointer parameter 'key' (line 99) could be declared as pointing to const src/ciphers/kasumi.c 137 Info 818: Pointer parameter 'key' (line 123) could be declared as pointing to const src/ciphers/cast5.c 571 Info 818: Pointer parameter 'skey' (line 539) could be declared as pointing to const src/ciphers/cast5.c 625 Info 818: Pointer parameter 'skey' (line 592) could be declared as pointing to const src/ciphers/camellia.c 531 Info 818: Pointer parameter 'skey' (line 439) could be declared as pointing to const src/ciphers/camellia.c 626 Info 818: Pointer parameter 'skey' (line 533) could be declared as pointing to const src/ciphers/serpent.c 598 Info 818: Pointer parameter 'skey' (line 591) could be declared as pointing to const src/ciphers/serpent.c 607 Info 818: Pointer parameter 'skey' (line 600) could be declared as pointing to const src/ciphers/idea.c 165 Info 818: Pointer parameter 'skey' (line 158) could be declared as pointing to const src/ciphers/idea.c 174 Info 818: Pointer parameter 'skey' (line 167) could be declared as pointing to const src/ciphers/des.c 1607 Info 818: Pointer parameter 'skey' (line 1595) could be declared as pointing to const src/ciphers/des.c 1628 Info 818: Pointer parameter 'skey' (line 1616) could be declared as pointing to const src/ciphers/des.c 1652 Info 818: Pointer parameter 'skey' (line 1637) could be declared as pointing to const src/ciphers/des.c 1675 Info 818: Pointer parameter 'skey' (line 1661) could be declared as pointing to const src/ciphers/skipjack.c 187 Info 818: Pointer parameter 'skey' (line 144) could be declared as pointing to const src/ciphers/skipjack.c 255 Info 818: Pointer parameter 'skey' (line 208) could be declared as pointing to const src/ciphers/multi2.c 78 Info 818: Pointer parameter 'k' (line 52) could be declared as pointing to const src/ciphers/multi2.c 90 Info 818: Pointer parameter 'uk' (line 80) could be declared as pointing to const src/ciphers/multi2.c 105 Info 818: Pointer parameter 'uk' (line 92) could be declared as pointing to const src/ciphers/blowfish.c 432 Info 818: Pointer parameter 'skey' (line 391) could be declared as pointing to const src/ciphers/blowfish.c 493 Info 818: Pointer parameter 'skey' (line 453) could be declared as pointing to const src/ciphers/xtea.c 101 Info 818: Pointer parameter 'skey' (line 74) could be declared as pointing to const src/ciphers/xtea.c 137 Info 818: Pointer parameter 'skey' (line 110) could be declared as pointing to const src/ciphers/khazad.c 751 Info 818: Pointer parameter 'skey' (line 744) could be declared as pointing to const src/ciphers/khazad.c 767 Info 818: Pointer parameter 'skey' (line 760) could be declared as pointing to const src/ciphers/anubis.c 1128 Info 818: Pointer parameter 'roundKey' (line 1038) could be declared as pointing to const src/ciphers/kseed.c 270 Info 818: Pointer parameter 'skey' (line 257) could be declared as pointing to const src/ciphers/kseed.c 292 Info 818: Pointer parameter 'skey' (line 279) could be declared as pointing to const src/ciphers/noekeon.c 146 Info 818: Pointer parameter 'skey' (line 113) could be declared as pointing to const src/ciphers/noekeon.c 199 Info 818: Pointer parameter 'skey' (line 167) could be declared as pointing to const src/ciphers/safer/saferp.c 396 Info 818: Pointer parameter 'skey' (line 341) could be declared as pointing to const src/ciphers/safer/saferp.c 460 Info 818: Pointer parameter 'skey' (line 405) could be declared as pointing to const src/encauth/gcm/gcm_mult_h.c 52 Info 818: Pointer parameter 'gcm' (line 22) could be declared as pointing to const src/encauth/eax/eax_decrypt_verify_memory.c 103 Info 818: Pointer parameter 'tag' (line 41) could be declared as pointing to const src/misc/adler32.c 107 Info 818: Pointer parameter 'ctx' (line 82) could be declared as pointing to const src/misc/crc32.c 178 Info 818: Pointer parameter 'ctx' (line 162) could be declared as pointing to const ```
karel-m commented 2018-02-17 08:27:26 -06:00 (Migrated from github.com)

Please avoid changes to src/pk/ecc/* It would be better to handle these
after merging pr/ecc-* branches

Please avoid changes to src/pk/ecc/* It would be better to handle these after merging pr/ecc-* branches
sjaeckel commented 2018-02-17 08:49:47 -06:00 (Migrated from github.com)

Please avoid changes to src/pk/ecc/* It would be better to handle these after merging pr/ecc-* branches

👍

> Please avoid changes to src/pk/ecc/* It would be better to handle these after merging pr/ecc-* branches 👍
sjaeckel commented 2018-03-26 19:31:39 -05:00 (Migrated from github.com)

@fperrad can you please check again :)

@fperrad can you please check again :)
fperrad commented 2018-03-27 13:26:17 -05:00 (Migrated from github.com)

Here the third list (32 items)

src/pk/rsa/rsa_sign_hash.c  140  Info 818: Pointer parameter 'key' (line 37) could be declared as pointing to const
src/pk/rsa/rsa_encrypt_key.c  94  Info 818: Pointer parameter 'key' (line 36) could be declared as pointing to const
src/pk/rsa/rsa_verify_hash.c  187  Info 818: Pointer parameter 'key' (line 35) could be declared as pointing to const
src/pk/rsa/rsa_decrypt_key.c  97  Info 818: Pointer parameter 'key' (line 36) could be declared as pointing to const
src/pk/asn1/der/sequence/der_decode_sequence_multi.c  132  Info 818: Pointer parameter 'a1' (line 29) could be declared as pointing to const
src/pk/asn1/der/sequence/der_decode_sequence_multi.c  132  Info 818: Pointer parameter 'a2' (line 29) could be declared as pointing to const
src/pk/ecc/ecc_free.c  32  Info 818: Pointer parameter 'key' (line 28) could be declared as pointing to const
src/pk/ecc/ecc_sign_hash.c  126  Info 818: Pointer parameter 'key' (line 21) could be declared as pointing to const
src/pk/ecc/ltc_ecc_projective_dbl_point.c  140  Info 818: Pointer parameter 'P' (line 32) could be declared as pointing to const
src/pk/ecc/ltc_ecc_projective_dbl_point.c  140  Info 818: Pointer parameter 'R' (line 32) could be declared as pointing to const
src/pk/ecc/ecc_import.c  70  Info 818: Pointer parameter 'key' (line 24) could be declared as pointing to const
src/pk/ecc/ecc_ansi_x963_export.c  71  Info 818: Pointer parameter 'key' (line 30) could be declared as pointing to const
src/pk/ecc/ecc_ansi_x963_import.c  96  Info 818: Pointer parameter 'dp' (line 34) could be declared as pointing to const
src/pk/ecc/ltc_ecc_mulmod_timing.c  156  Info 818: Pointer parameter 'G' (line 35) could be declared as pointing to const
src/pk/ecc/ltc_ecc_projective_add_point.c  187  Info 818: Pointer parameter 'Q' (line 33) could be declared as pointing to const
src/pk/ecc/ecc_export.c  74  Info 818: Pointer parameter 'key' (line 32) could be declared as pointing to const
src/pk/ecc/ltc_ecc_map.c  67  Info 818: Pointer parameter 'P' (line 31) could be declared as pointing to const
src/pk/ecc/ecc_verify_hash.c  160  Info 818: Pointer parameter 'key' (line 21) could be declared as pointing to const
src/pk/ecc/ecc_get_size.c  36  Info 818: Pointer parameter 'key' (line 29) could be declared as pointing to const
src/pk/ecc/ltc_ecc_mul2add.c  199  Info 818: Pointer parameter 'A' (line 35) could be declared as pointing to const
src/pk/ecc/ltc_ecc_mul2add.c  199  Info 818: Pointer parameter 'B' (line 36) could be declared as pointing to const
src/pk/ecc/ecc_shared_secret.c  87  Info 818: Pointer parameter 'private_key' (line 32) could be declared as pointing to const
src/pk/dsa/dsa_decrypt_key.c  132  Info 818: Pointer parameter 'key' (line 29) could be declared as pointing to const
src/pk/dsa/dsa_encrypt_key.c  122  Info 818: Pointer parameter 'key' (line 33) could be declared as pointing to const
src/modes/xts/xts_test.c  39  Info 818: Pointer parameter 'skey1' (line 15) could be declared as pointing to const
src/modes/xts/xts_test.c  39  Info 818: Pointer parameter 'skey2' (line 15) could be declared as pointing to const
src/modes/xts/xts_test.c  66  Info 818: Pointer parameter 'skey1' (line 42) could be declared as pointing to const
src/modes/xts/xts_test.c  66  Info 818: Pointer parameter 'skey2' (line 42) could be declared as pointing to const
src/modes/xts/xts_decrypt.c  49  Info 818: Pointer parameter 'xts' (line 17) could be declared as pointing to const
src/modes/xts/xts_encrypt.c  51  Info 818: Pointer parameter 'xts' (line 17) could be declared as pointing to const
src/ciphers/multi2.c  78  Info 818: Pointer parameter 'k' (line 52) could be declared as pointing to const
src/misc/padding/padding_depad.c  88  Info 818: Pointer parameter 'data' (line 23) could be declared as pointing to const
Here the third list (32 items) ``` src/pk/rsa/rsa_sign_hash.c 140 Info 818: Pointer parameter 'key' (line 37) could be declared as pointing to const src/pk/rsa/rsa_encrypt_key.c 94 Info 818: Pointer parameter 'key' (line 36) could be declared as pointing to const src/pk/rsa/rsa_verify_hash.c 187 Info 818: Pointer parameter 'key' (line 35) could be declared as pointing to const src/pk/rsa/rsa_decrypt_key.c 97 Info 818: Pointer parameter 'key' (line 36) could be declared as pointing to const src/pk/asn1/der/sequence/der_decode_sequence_multi.c 132 Info 818: Pointer parameter 'a1' (line 29) could be declared as pointing to const src/pk/asn1/der/sequence/der_decode_sequence_multi.c 132 Info 818: Pointer parameter 'a2' (line 29) could be declared as pointing to const src/pk/ecc/ecc_free.c 32 Info 818: Pointer parameter 'key' (line 28) could be declared as pointing to const src/pk/ecc/ecc_sign_hash.c 126 Info 818: Pointer parameter 'key' (line 21) could be declared as pointing to const src/pk/ecc/ltc_ecc_projective_dbl_point.c 140 Info 818: Pointer parameter 'P' (line 32) could be declared as pointing to const src/pk/ecc/ltc_ecc_projective_dbl_point.c 140 Info 818: Pointer parameter 'R' (line 32) could be declared as pointing to const src/pk/ecc/ecc_import.c 70 Info 818: Pointer parameter 'key' (line 24) could be declared as pointing to const src/pk/ecc/ecc_ansi_x963_export.c 71 Info 818: Pointer parameter 'key' (line 30) could be declared as pointing to const src/pk/ecc/ecc_ansi_x963_import.c 96 Info 818: Pointer parameter 'dp' (line 34) could be declared as pointing to const src/pk/ecc/ltc_ecc_mulmod_timing.c 156 Info 818: Pointer parameter 'G' (line 35) could be declared as pointing to const src/pk/ecc/ltc_ecc_projective_add_point.c 187 Info 818: Pointer parameter 'Q' (line 33) could be declared as pointing to const src/pk/ecc/ecc_export.c 74 Info 818: Pointer parameter 'key' (line 32) could be declared as pointing to const src/pk/ecc/ltc_ecc_map.c 67 Info 818: Pointer parameter 'P' (line 31) could be declared as pointing to const src/pk/ecc/ecc_verify_hash.c 160 Info 818: Pointer parameter 'key' (line 21) could be declared as pointing to const src/pk/ecc/ecc_get_size.c 36 Info 818: Pointer parameter 'key' (line 29) could be declared as pointing to const src/pk/ecc/ltc_ecc_mul2add.c 199 Info 818: Pointer parameter 'A' (line 35) could be declared as pointing to const src/pk/ecc/ltc_ecc_mul2add.c 199 Info 818: Pointer parameter 'B' (line 36) could be declared as pointing to const src/pk/ecc/ecc_shared_secret.c 87 Info 818: Pointer parameter 'private_key' (line 32) could be declared as pointing to const src/pk/dsa/dsa_decrypt_key.c 132 Info 818: Pointer parameter 'key' (line 29) could be declared as pointing to const src/pk/dsa/dsa_encrypt_key.c 122 Info 818: Pointer parameter 'key' (line 33) could be declared as pointing to const src/modes/xts/xts_test.c 39 Info 818: Pointer parameter 'skey1' (line 15) could be declared as pointing to const src/modes/xts/xts_test.c 39 Info 818: Pointer parameter 'skey2' (line 15) could be declared as pointing to const src/modes/xts/xts_test.c 66 Info 818: Pointer parameter 'skey1' (line 42) could be declared as pointing to const src/modes/xts/xts_test.c 66 Info 818: Pointer parameter 'skey2' (line 42) could be declared as pointing to const src/modes/xts/xts_decrypt.c 49 Info 818: Pointer parameter 'xts' (line 17) could be declared as pointing to const src/modes/xts/xts_encrypt.c 51 Info 818: Pointer parameter 'xts' (line 17) could be declared as pointing to const src/ciphers/multi2.c 78 Info 818: Pointer parameter 'k' (line 52) could be declared as pointing to const src/misc/padding/padding_depad.c 88 Info 818: Pointer parameter 'data' (line 23) could be declared as pointing to const ```
sjaeckel commented 2018-03-27 14:17:32 -05:00 (Migrated from github.com)

regarding src/pk/asn1/der/sequence/der_decode_sequence_multi.c 132 Info 818: Pointer parameter 'a1' (line 29) could be declared as pointing to const I'm not sure if that's a good idea, as the c standard defines that the va_list arguments of the corresponding functions aren't const...
and as already mentioned, the ecc stuff will be fixed after the ecc re-work

regarding `src/pk/asn1/der/sequence/der_decode_sequence_multi.c 132 Info 818: Pointer parameter 'a1' (line 29) could be declared as pointing to const` I'm not sure if that's a good idea, as the c standard defines that the `va_list` arguments of the corresponding functions aren't const... and as already mentioned, the ecc stuff will be fixed after the ecc re-work
sjaeckel commented 2018-03-27 14:19:54 -05:00 (Migrated from github.com)

and @fperrad can you check again please? :)

and @fperrad can you check again please? :)
fperrad commented 2018-03-28 02:15:23 -05:00 (Migrated from github.com)

Here the fourth list (16+2 items)

src/pk/ecc/ecc_free.c  32  Info 818: Pointer parameter 'key' (line 28) could be declared as pointing to const
src/pk/ecc/ecc_sign_hash.c  126  Info 818: Pointer parameter 'key' (line 21) could be declared as pointing to const
src/pk/ecc/ltc_ecc_projective_dbl_point.c  140  Info 818: Pointer parameter 'P' (line 32) could be declared as pointing to const
src/pk/ecc/ltc_ecc_projective_dbl_point.c  140  Info 818: Pointer parameter 'R' (line 32) could be declared as pointing to const
src/pk/ecc/ecc_import.c  70  Info 818: Pointer parameter 'key' (line 24) could be declared as pointing to const
src/pk/ecc/ecc_ansi_x963_export.c  71  Info 818: Pointer parameter 'key' (line 30) could be declared as pointing to const
src/pk/ecc/ecc_ansi_x963_import.c  96  Info 818: Pointer parameter 'dp' (line 34) could be declared as pointing to const
src/pk/ecc/ltc_ecc_mulmod_timing.c  156  Info 818: Pointer parameter 'G' (line 35) could be declared as pointing to const
src/pk/ecc/ltc_ecc_projective_add_point.c  187  Info 818: Pointer parameter 'Q' (line 33) could be declared as pointing to const
src/pk/ecc/ecc_export.c  74  Info 818: Pointer parameter 'key' (line 32) could be declared as pointing to const
src/pk/ecc/ltc_ecc_map.c  67  Info 818: Pointer parameter 'P' (line 31) could be declared as pointing to const
src/pk/ecc/ecc_verify_hash.c  160  Info 818: Pointer parameter 'key' (line 21) could be declared as pointing to const
src/pk/ecc/ecc_get_size.c  36  Info 818: Pointer parameter 'key' (line 29) could be declared as pointing to const
src/pk/ecc/ltc_ecc_mul2add.c  199  Info 818: Pointer parameter 'A' (line 35) could be declared as pointing to const
src/pk/ecc/ltc_ecc_mul2add.c  199  Info 818: Pointer parameter 'B' (line 36) could be declared as pointing to const
src/pk/ecc/ecc_shared_secret.c  87  Info 818: Pointer parameter 'private_key' (line 32) could be declared as pointing to const
src/pk/dsa/dsa_decrypt_key.c  132  Info 818: Pointer parameter 'key' (line 29) could be declared as pointing to const
src/pk/dsa/dsa_encrypt_key.c  122  Info 818: Pointer parameter 'key' (line 33) could be declared as pointing to const
Here the fourth list (16+2 items) ``` src/pk/ecc/ecc_free.c 32 Info 818: Pointer parameter 'key' (line 28) could be declared as pointing to const src/pk/ecc/ecc_sign_hash.c 126 Info 818: Pointer parameter 'key' (line 21) could be declared as pointing to const src/pk/ecc/ltc_ecc_projective_dbl_point.c 140 Info 818: Pointer parameter 'P' (line 32) could be declared as pointing to const src/pk/ecc/ltc_ecc_projective_dbl_point.c 140 Info 818: Pointer parameter 'R' (line 32) could be declared as pointing to const src/pk/ecc/ecc_import.c 70 Info 818: Pointer parameter 'key' (line 24) could be declared as pointing to const src/pk/ecc/ecc_ansi_x963_export.c 71 Info 818: Pointer parameter 'key' (line 30) could be declared as pointing to const src/pk/ecc/ecc_ansi_x963_import.c 96 Info 818: Pointer parameter 'dp' (line 34) could be declared as pointing to const src/pk/ecc/ltc_ecc_mulmod_timing.c 156 Info 818: Pointer parameter 'G' (line 35) could be declared as pointing to const src/pk/ecc/ltc_ecc_projective_add_point.c 187 Info 818: Pointer parameter 'Q' (line 33) could be declared as pointing to const src/pk/ecc/ecc_export.c 74 Info 818: Pointer parameter 'key' (line 32) could be declared as pointing to const src/pk/ecc/ltc_ecc_map.c 67 Info 818: Pointer parameter 'P' (line 31) could be declared as pointing to const src/pk/ecc/ecc_verify_hash.c 160 Info 818: Pointer parameter 'key' (line 21) could be declared as pointing to const src/pk/ecc/ecc_get_size.c 36 Info 818: Pointer parameter 'key' (line 29) could be declared as pointing to const src/pk/ecc/ltc_ecc_mul2add.c 199 Info 818: Pointer parameter 'A' (line 35) could be declared as pointing to const src/pk/ecc/ltc_ecc_mul2add.c 199 Info 818: Pointer parameter 'B' (line 36) could be declared as pointing to const src/pk/ecc/ecc_shared_secret.c 87 Info 818: Pointer parameter 'private_key' (line 32) could be declared as pointing to const src/pk/dsa/dsa_decrypt_key.c 132 Info 818: Pointer parameter 'key' (line 29) could be declared as pointing to const src/pk/dsa/dsa_encrypt_key.c 122 Info 818: Pointer parameter 'key' (line 33) could be declared as pointing to const ```
sjaeckel commented 2018-03-28 02:31:00 -05:00 (Migrated from github.com)

@fperrad and hopefully the last iteration :)

@fperrad and hopefully the last iteration :)
karel-m commented 2018-04-08 10:07:16 -05:00 (Migrated from github.com)

@sjaeckel could we merge this PR into develop?

@sjaeckel could we merge this PR into develop?
sjaeckel commented 2018-04-08 18:20:22 -05:00 (Migrated from github.com)

after @fperrad checked a last time, yes

after @fperrad checked a last time, yes
fperrad commented 2018-04-08 22:37:15 -05:00 (Migrated from github.com)

good for me (src/pk/ecc currently excluded).

good for me (`src/pk/ecc` currently excluded).
karel-m (Migrated from github.com) approved these changes 2018-04-09 02:05:02 -05:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-libtom/libtomcrypt!324
No description provided.