Makefile install_all should not install test binary #396

Open
opened 2018-06-01 12:02:22 -05:00 by J08nY · 6 comments
J08nY commented 2018-06-01 12:02:22 -05:00 (Migrated from github.com)

Prerequisites

Description

make -f makefile.shared install_all installs the test binary into $PATH, which then shadows coreutils test binary and causes problems. Generally installing a binary named test will cause some issues.

Steps to Reproduce

make -f makefile.shared install_all

Version

1.18.1

### Prerequisites * [x] Checked the developer manual * [x] Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=repo%3Alibtom%2Flibtomcrypt * [x] Checked that your issue isn't related to TomsFastMath's limitation that PK operations can by default only be done with max. 2048bit keys ### Description `make -f makefile.shared install_all` installs the `test` binary into $PATH, which then shadows coreutils `test` binary and causes problems. Generally installing a binary named `test` will cause some issues. ### Steps to Reproduce `make -f makefile.shared install_all` ### Version 1.18.1
sjaeckel commented 2018-06-02 05:13:02 -05:00 (Migrated from github.com)

Isn't that kind of a 'feature' to have a good replacement in case your regular test is defect? ;) </irony>

Isn't that kind of a 'feature' to have a good replacement in case your regular `test` is defect? ;) \</irony>
J08nY commented 2018-06-02 05:20:51 -05:00 (Migrated from github.com)

I have fish shell, which for some reason, runs test from $PATH, every time ls is run, so I was getting this:

LTC_VERSION  = 1.18.1
LibTomCrypt 1.18.1 (www.libtom.net)
LibTomCrypt is public domain software.


Endianness: little (64-bit words)
Clean stack: disabled

Ciphers built-in:
   Blowfish
   RC2
   RC5
   RC6
   Safer+
   Safer
   Rijndael
   XTEA
   Twofish (tables)
   DES
   CAST5
   Noekeon
   Skipjack
   Khazad
   Anubis  (tweaked)
   KSEED
   KASUMI
   MULTI2
   Camellia
Stream ciphers built-in:
   ChaCha
   RC4
   SOBER128

Hashes built-in:
   SHA3
   SHA-512
   SHA-384
   SHA-512/256
   SHA-256
   SHA-512/224
   SHA-224
   TIGER
   SHA1
   MD5
   MD4
   MD2
   RIPEMD128
   RIPEMD160
   RIPEMD256
   RIPEMD320
   WHIRLPOOL
   BLAKE2S
   BLAKE2B
   CHC_HASH

Block Chaining Modes:
   CFB
   OFB
   ECB
   CBC
   CTR
   LRW (tables) 
   F8
   XTS

MACs:
   HMAC
   OMAC
   PMAC
   PELICAN
   XCBC
   F9
   POLY1305
   BLAKE2S MAC
   BLAKE2B MAC

ENC + AUTH modes:
   EAX
   OCB
   OCB3
   CCM
   GCM (tables) 
   CHACHA20POLY1305

PRNG:
   Yarrow (LTC_YARROW_AES=2)
   SPRNG
   RC4
   ChaCha20
   Fortuna (LTC_FORTUNA_POOLS=32, LTC_FORTUNA_WD=10)
   SOBER128

PK Crypto:
   RSA (with blinding and CRT hardening)
   DH
   ECC (with blinding)
   DSA
   LTC_PK_MAX_RETRIES=20

MPI (Math):
   LTC_MPI
   LTM_DESC
   GMP_DESC
   LTC_MILLER_RABIN_REPS=40

Compiler:
   GCC compiler 8.1.0.
   x86-64 detected.

Various others:  ARGTYPE=0  ADLER32  BASE64  BASE64-URL-SAFE  CRC32  DER  PKCS#1  PKCS#5  HKDF  LTC_DEVRANDOM  LTC_TRY_URANDOM_FIRST  LTC_RNG_GET_BYTES  LTC_RNG_MAKE_PRNG  LTC_HASH_HELPERS  LTC_TEST  LTC_FILE_READ_BUFSIZE=8192  LTC_FAST  LTC_ROx_ASM  LTC_ECC_SHAMIR 


MP_PROVIDER  = LibTomMath
MP_DIGIT_BIT = 60
sizeof(ltc_mp_digit) = 8

on every ls run, after installing libtomcrypt, that was quite weird and hard to debug 😄

I have fish shell, which for some reason, runs `test` from $PATH, every time `ls` is run, so I was getting this: ``` LTC_VERSION = 1.18.1 LibTomCrypt 1.18.1 (www.libtom.net) LibTomCrypt is public domain software. Endianness: little (64-bit words) Clean stack: disabled Ciphers built-in: Blowfish RC2 RC5 RC6 Safer+ Safer Rijndael XTEA Twofish (tables) DES CAST5 Noekeon Skipjack Khazad Anubis (tweaked) KSEED KASUMI MULTI2 Camellia Stream ciphers built-in: ChaCha RC4 SOBER128 Hashes built-in: SHA3 SHA-512 SHA-384 SHA-512/256 SHA-256 SHA-512/224 SHA-224 TIGER SHA1 MD5 MD4 MD2 RIPEMD128 RIPEMD160 RIPEMD256 RIPEMD320 WHIRLPOOL BLAKE2S BLAKE2B CHC_HASH Block Chaining Modes: CFB OFB ECB CBC CTR LRW (tables) F8 XTS MACs: HMAC OMAC PMAC PELICAN XCBC F9 POLY1305 BLAKE2S MAC BLAKE2B MAC ENC + AUTH modes: EAX OCB OCB3 CCM GCM (tables) CHACHA20POLY1305 PRNG: Yarrow (LTC_YARROW_AES=2) SPRNG RC4 ChaCha20 Fortuna (LTC_FORTUNA_POOLS=32, LTC_FORTUNA_WD=10) SOBER128 PK Crypto: RSA (with blinding and CRT hardening) DH ECC (with blinding) DSA LTC_PK_MAX_RETRIES=20 MPI (Math): LTC_MPI LTM_DESC GMP_DESC LTC_MILLER_RABIN_REPS=40 Compiler: GCC compiler 8.1.0. x86-64 detected. Various others: ARGTYPE=0 ADLER32 BASE64 BASE64-URL-SAFE CRC32 DER PKCS#1 PKCS#5 HKDF LTC_DEVRANDOM LTC_TRY_URANDOM_FIRST LTC_RNG_GET_BYTES LTC_RNG_MAKE_PRNG LTC_HASH_HELPERS LTC_TEST LTC_FILE_READ_BUFSIZE=8192 LTC_FAST LTC_ROx_ASM LTC_ECC_SHAMIR MP_PROVIDER = LibTomMath MP_DIGIT_BIT = 60 sizeof(ltc_mp_digit) = 8 ``` on every `ls` run, after installing libtomcrypt, that was quite weird and hard to debug :smile:
sjaeckel commented 2018-06-02 05:41:19 -05:00 (Migrated from github.com)

Jokes aside, we have the following set of demos etc.

aesgcm 2*
constants 1*
hashsum 2*
ltcrypt 2*
openssl-enc 2*
sizes 1*
small 0*
test 0*
timing 0*
tv_gen 0*

I've marked my opinion on their "install-worthiness"

As we had a nameclash for crypt which led us to rename it to ltcrypt we have the same for hashsum which we didn't resolve yet...

I'd say we should remove the possibility to install all "0*-rated" demos and the 1*- and 2*-rated demos should be renamed to something obvious e.g. ltcsizes and ltconstants. Then also regroup them... or don't use groups at all, but provide install-targets per binary?

If we keep groups:

demos - Builds 2*
bins - Builds 1* and 2*
all - Builds library, 0*, 1* and 2*
install_demos - Build&Install 2*
install_bins - Build&Install 1* and 2*
install_all - install install_bins install_doc (as before)

Please add your opinions & preferences! (ping @karel-m @buggywhip)

Jokes aside, we have the following set of demos etc. ``` aesgcm 2* constants 1* hashsum 2* ltcrypt 2* openssl-enc 2* sizes 1* small 0* test 0* timing 0* tv_gen 0* ``` I've marked my opinion on their "install-worthiness" As we had a nameclash for `crypt` which led us to rename it to `ltcrypt` we have the same for `hashsum` which we didn't resolve yet... I'd say we should remove the possibility to install all "0*-rated" demos and the 1*- and 2*-rated demos should be renamed to something obvious e.g. `ltcsizes` and `ltconstants`. Then also regroup them... or don't use groups at all, but provide install-targets per binary? If we keep groups: ``` demos - Builds 2* bins - Builds 1* and 2* all - Builds library, 0*, 1* and 2* install_demos - Build&Install 2* install_bins - Build&Install 1* and 2* install_all - install install_bins install_doc (as before) ``` Please add your opinions & preferences! (ping @karel-m @buggywhip)
J08nY commented 2018-06-02 06:55:29 -05:00 (Migrated from github.com)

I agree with all of the above, also the renaming/prefixing with ltc is useful and should allow easy installing of those binaries into $PATH without name clashes. I also think grouping in Makefiles is useful and allows someone to easily play with the makefile so the demos should be regrouped.

Anyway, thanks for working on this issue! 👍

I agree with all of the above, also the renaming/prefixing with `ltc` is useful and should allow easy installing of those binaries into $PATH without name clashes. I also think grouping in Makefiles is useful and allows someone to easily play with the makefile so the demos should be regrouped. Anyway, thanks for working on this issue! :+1:
karel-m commented 2018-06-03 10:41:31 -05:00 (Migrated from github.com)

IMO the only tool in "release quality" is hashsum and it is the only candidate worth installing. I am in doubts whether anybody will ever use make install_demos.

The ltcrypt + openssl-enc completely ignore integrity and aesgcm IMO needs a bit more work (we have discussed it in some other PR).

The prefixing with ltc is also not a bad idea.

IMO the only tool in "release quality" is `hashsum` and it is the only candidate worth installing. I am in doubts whether anybody will ever use `make install_demos`. The `ltcrypt` + `openssl-enc` completely ignore integrity and `aesgcm` IMO needs a bit more work (we have discussed it in some other PR). The prefixing with `ltc` is also not a bad idea.
sjaeckel commented 2018-07-02 16:44:53 -05:00 (Migrated from github.com)

I'm reopening this so we can re-work as proposed.

I'm reopening this so we can re-work as proposed.
Sign in to join this conversation.
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#396
No description provided.