Andreas Metzler <[email protected]> writes:
> Afaict almost all tests use internal symbols:
> (sid)ametzler@argenau:/tmp/NETTLE/nettle-3.8.1$ for i in testsuite/*-test ;
> do if objdump -R $i | grep -q -E 'HOGWEED_INTERNAL|NETTLE_INTERNAL' ; then
> echo yes ; else echo no ; fi ; done | sort | uniq --count
> objdump: testsuite/nettle-pbkdf2-test: file format not recognized
> objdump: testsuite/pkcs1-conv-test: file format not recognized
> objdump: testsuite/sexp-conv-test: file format not recognized
> objdump: testsuite/symbols-test: file format not recognized
> 5 no
> 109 yes
Interesting. I tried this command, to list corresponding symbols:
$ for f in testsuite/*-test ; do objdump -R $f | \
grep -E 'HOGWEED_INTERNAL|NETTLE_INTERNAL' | \
awk '{ print $3 }' ; done | sort | uniq --count
1 _nettle_chacha_core@NETTLE_INTERNAL_8_5
106 _nettle_curve25519@HOGWEED_INTERNAL_6_5
6 _nettle_curve25519@@HOGWEED_INTERNAL_6_5
106 _nettle_curve448@HOGWEED_INTERNAL_6_5
6 _nettle_curve448@@HOGWEED_INTERNAL_6_5
1 _nettle_ecc_mod_equal_p@HOGWEED_INTERNAL_6_5
1 _nettle_ecc_mod@HOGWEED_INTERNAL_6_5
1 _nettle_ecc_mod_mul_1@HOGWEED_INTERNAL_6_5
2 _nettle_ecc_mod_zero_p@HOGWEED_INTERNAL_6_5
1 _nettle_ecc_pm1_redc@HOGWEED_INTERNAL_6_5
1 _nettle_ecc_pp1_redc@HOGWEED_INTERNAL_6_5
2 _nettle_ed25519_sha512@@HOGWEED_INTERNAL_6_5
2 _nettle_ed448_shake256@@HOGWEED_INTERNAL_6_5
1 _nettle_eddsa_compress@HOGWEED_INTERNAL_6_5
1 _nettle_eddsa_compress_itch@HOGWEED_INTERNAL_6_5
2 _nettle_eddsa_decompress@HOGWEED_INTERNAL_6_5
1 _nettle_eddsa_decompress_itch@HOGWEED_INTERNAL_6_5
1 _nettle_eddsa_expand_key@HOGWEED_INTERNAL_6_5
1 _nettle_eddsa_public_key@HOGWEED_INTERNAL_6_5
1 _nettle_eddsa_sign@HOGWEED_INTERNAL_6_5
1 _nettle_eddsa_sign_itch@HOGWEED_INTERNAL_6_5
1 _nettle_eddsa_verify@HOGWEED_INTERNAL_6_5
1 _nettle_eddsa_verify_itch@HOGWEED_INTERNAL_6_5
1 _nettle_ghash_set_key@NETTLE_INTERNAL_8_5
1 _nettle_ghash_update@NETTLE_INTERNAL_8_5
109 _nettle_gost_gc256b@HOGWEED_INTERNAL_6_5
109 _nettle_gost_gc512a@HOGWEED_INTERNAL_6_5
109 _nettle_mpz_limbs_copy@HOGWEED_INTERNAL_6_5
1 _nettle_pkcs1_sec_decrypt@HOGWEED_INTERNAL_6_5
1 _nettle_pkcs1_signature_prefix@HOGWEED_INTERNAL_6_5
1 _nettle_poly1305_block@NETTLE_INTERNAL_8_5
1 _nettle_poly1305_digest@NETTLE_INTERNAL_8_5
1 _nettle_poly1305_set_key@NETTLE_INTERNAL_8_5
106 _nettle_secp_192r1@HOGWEED_INTERNAL_6_5
6 _nettle_secp_192r1@@HOGWEED_INTERNAL_6_5
106 _nettle_secp_224r1@HOGWEED_INTERNAL_6_5
6 _nettle_secp_224r1@@HOGWEED_INTERNAL_6_5
105 _nettle_secp_256r1@HOGWEED_INTERNAL_6_5
8 _nettle_secp_256r1@@HOGWEED_INTERNAL_6_5
105 _nettle_secp_384r1@HOGWEED_INTERNAL_6_5
8 _nettle_secp_384r1@@HOGWEED_INTERNAL_6_5
106 _nettle_secp_521r1@HOGWEED_INTERNAL_6_5
6 _nettle_secp_521r1@@HOGWEED_INTERNAL_6_5
2 _nettle_write_be32@NETTLE_INTERNAL_8_5
From a first quick look, I think almost half are internal functions,
referenced from well deserved unit tests. Some are direct references to
curve structs, most likely due to this definition in testutils.h:
const struct ecc_curve * const ecc_curves[] = {
&_nettle_secp_192r1,
&_nettle_secp_224r1,
&_nettle_secp_256r1,
&_nettle_secp_384r1,
&_nettle_secp_521r1,
&_nettle_curve25519,
&_nettle_curve448,
&_nettle_gost_gc256b,
&_nettle_gost_gc512a,
NULL
};
This could use indirection via public accessors instead. And a few are
uses of internal utility functions.
Regards,
/Niels
--
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email is subject to wholesale government surveillance.
_______________________________________________
nettle-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]