pq-crystals/kyber

trailing whitespaces?

mmaker opened this issue · 1 comments

Hi, I just wanted to report that there are around 2KB of trailing whitespaces, which are superfluous and could be confusing for patches.

$ du --bytes --exclude .git
104146	./ref
60495	./avx2/keccak4x
243768	./avx2
20410	./scripts
374081	.
$ find . -type f -not -path './.git/*' -exec sed -i -e's/[[:space:]]*$//' {} +
$ du --bytes --exclude .git
103351	./ref
60495	./avx2/keccak4x
243270	./avx2
20209	./scripts
372585	.

This is a list of affected files:

$ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   AUTHORS
	modified:   README.md
	modified:   avx2/PQCgenKAT_kem.c
	modified:   avx2/cbd.h
	modified:   avx2/fips202.c
	modified:   avx2/fips202x4.c
	modified:   avx2/fips202x4.h
	modified:   avx2/genmatrix.c
	modified:   avx2/indcpa.c
	modified:   avx2/indcpa.h
	modified:   avx2/kem.c
	modified:   avx2/kex.c
	modified:   avx2/ntt.h
	modified:   avx2/params.h
	modified:   avx2/poly.c
	modified:   avx2/poly.h
	modified:   avx2/polyvec.c
	modified:   avx2/randombytes.c
	modified:   avx2/randombytes.h
	modified:   avx2/reduce.c
	modified:   avx2/rng.c
	modified:   avx2/speed.c
	modified:   avx2/test_kex.c
	modified:   avx2/test_kyber.c
	modified:   avx2/testvectors.c
	modified:   avx2/verify.c
	modified:   ref/PQCgenKAT_kem.c
	modified:   ref/cbd.c
	modified:   ref/fips202.c
	modified:   ref/indcpa.c
	modified:   ref/indcpa.h
	modified:   ref/kem.c
	modified:   ref/kex.c
	modified:   ref/ntt.c
	modified:   ref/ntt.h
	modified:   ref/params.h
	modified:   ref/poly.c
	modified:   ref/poly.h
	modified:   ref/polyvec.c
	modified:   ref/polyvec.h
	modified:   ref/precomp.c
	modified:   ref/randombytes.c
	modified:   ref/randombytes.h
	modified:   ref/reduce.c
	modified:   ref/rng.c
	modified:   ref/speed.c
	modified:   ref/test_kex.c
	modified:   ref/test_kyber.c
	modified:   ref/testvectors.c
	modified:   ref/verify.c
	modified:   scripts/Kyber.py
	modified:   scripts/Kyber_failure.py
	modified:   scripts/MLWE_security.py
	modified:   scripts/model_BKZ.py
	modified:   scripts/proba_util.py

no changes added to commit (use "git add" and/or "git commit -a")

Perhaps you want to configure your editor to strip them automatically?
Good luck !

(I didn't submit a patch because well… I guess it's a mess to check. But the find kung-fu up there should do the job, and it's easier to review :) )