[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH 0/5] simplify and improve crypt_make_salt()
From: Rasmus Villemoes <rasmus.villemoes () prevas ! dk>
Date: 2024-04-29 6:57:03
Message-ID: 7a3028b5-ccc0-428d-96c9-c98cdec61b69 () prevas ! dk
[Download RAW message or body]
On 15/04/2024 14.56, Rasmus Villemoes wrote:
> Currently, crypt_make_salt() can only return 2^28 different salt
> strings. There are some low-hanging fruits allowing us to reduce the
> code size, and even with patch 5 which obviously by itself increases
> the footprint, the combined result of these patches is
>
> function old new delta
> crypt_make_salt 104 95 -9
> i64c 41 24 -17
> ------------------------------------------------------------------------------
> (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-26) Total: -26 bytes
>
> while making sure (in the normal case where /dev/urandom is available)
> that the salt string is completely random, and that we are not in any
> case doing worse than what the current code does.
If there are no other comments, could these be considered for applying?
Thanks,
Rasmus
>
> Rasmus Villemoes (5):
> pw_encrypt.c: make i64c() slightly smaller
> crypt_make_salt: cleanup leftover comments
> crypt_make_salt(): simplify and improve
> crypt_make_salt(): fixup odd calling convention
> crypt_make_salt(): try to use actual random bytes for salt generation
>
> include/libbb.h | 11 ++---------
> libbb/pw_encrypt.c | 27 +++++++++++----------------
> networking/httpd.c | 2 +-
> 3 files changed, 14 insertions(+), 26 deletions(-)
>
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic