Commit Graph

22 Commits

Author SHA1 Message Date
Denis Vlasenko
e9afc468fa sha: merge sha1/sha256 handling (they are similar enough for this),
shrink sha215 code

function                                             old     new   delta
sha1_end                                             129     142     +13
sha1_process_block64                                 486     494      +8
sha256_begin                                          37      44      +7
sha1_begin                                            49      56      +7
sha1_hash                                            108     112      +4
...
sha512_end                                           204     184     -20
sha512_process_block128                             1405    1334     -71
sha256_process_block64                               520     446     -74
sha256_end                                           147       -    -147
sha512_hash                                          297     130    -167
sha256_hash                                          260       -    -260
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 11/9 up/down: 59/-752)         Total: -693 bytes
2009-03-15 02:28:05 +00:00
Denis Vlasenko
c8329c9568 sha: reduce sha256/512 context size. Make sha1/sha256 code more similar
function                                             old     new   delta
sha512_end                                           182     204     +22
sha256_end                                           137     147     +10
sha1_hash                                            113     108      -5
sha1_end                                             143     129     -14
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/2 up/down: 32/-19)             Total: 13 bytes
2009-03-12 19:06:18 +00:00
Denis Vlasenko
4a43057268 sha: tiny shrink 2009-03-12 17:50:50 +00:00
Denis Vlasenko
ddb1b85053 add comment about sha testing 2009-03-12 16:05:02 +00:00
Denis Vlasenko
cd2cd312b7 shrink sha hashing a bit more (remove wbuflen field from ctx),
remove the requirement for aligned buffer

function                                             old     new   delta
sha512_hash                                          262     297     +35
sha1_end                                             136     143      +7
passwd_main                                         1019    1023      +4
sha256_end                                           135     137      +2
count_lines                                           72      74      +2
sha256_hash                                          259     260      +1
popstring                                            164     158      -6
sha512_begin                                          88      81      -7
sha256_begin                                          44      37      -7
parse_expr                                           832     824      -8
bbunpack                                             446     438      -8
sha256_process_block64                               529     520      -9
md5_end                                              166     151     -15
evaltreenr                                           817     802     -15
evaltree                                             817     802     -15
sha512_end                                           204     182     -22
sha512_process_block128                             1444    1405     -39
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 6/11 up/down: 51/-151)         Total: -100 bytes
2009-03-12 15:40:27 +00:00
Denis Vlasenko
6a5d9faa29 shrink sha hashing
function                                             old     new   delta
sha512_hash                                          262     281     +19
sha512_end                                           204     221     +17
sha1_hash                                            128     113     -15
static.mask                                           16       -     -16
static.bits                                           16       -     -16
sha1_end                                             160     136     -24
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 2/2 up/down: 36/-71)            Total: -35 bytes
2009-03-12 15:39:11 +00:00
Denis Vlasenko
98c87f7575 sha256/512: code shrink. Run-tested.
function                                             old     new   delta
sha512_process_block128                                -    1444   +1444
sha1_process_block64                                   -     542    +542
sha256_process_block64                                 -     529    +529
K512_lo                                                -     320    +320
K256                                                   -     320    +320
init512_lo                                             -      32     +32
init256                                                -      32     +32
sha1_hash                                             99     128     +29
sha256_end                                           160     135     -25
sha1_end                                             189     160     -29
sha512_end                                           237     204     -33
sha256_begin                                          77      44     -33
sha512_begin                                         154      88     -66
sha256_hash                                          338     259     -79
sha512_hash                                          358     262     -96
sha1_compile                                         542       -    -542
sha256_process_block                                 594       -    -594
static.K                                             896       -    -896
sha512_process_block                                1861       -   -1861
------------------------------------------------------------------------------
(add/remove: 7/4 grow/shrink: 1/7 up/down: 3248/-4254)      Total: -1006 bytes
   text    data     bss     dec     hex filename
 808013     468    7856  816337   c74d1 busybox_old
 807007     468    7856  815331   c70e3 busybox_unstripped
2009-03-11 21:15:51 +00:00
Denis Vlasenko
e9b9a19ad3 libbb: disable a second md5 implementation which managed to creep in :)
function                                             old     new   delta
sha512_end                                           239     237      -2
sha256_end                                           162     160      -2
sha1_end                                             191     189      -2
md5_end                                              168     166      -2
__md5__magic                                           4       -      -4
md5_crypt                                            627     621      -6
static.S                                              16       -     -16
__md5_Init                                            42       -     -42
static.P                                              64       -     -64
__md5_Final                                          131       -    -131
__md5_Update                                         153       -    -153
static.C                                             268      12    -256
__md5_Transform                                      293       -    -293
------------------------------------------------------------------------------
(add/remove: 0/7 grow/shrink: 0/6 up/down: 0/-973)           Total: -973 bytes
2008-11-11 01:38:04 +00:00
Denis Vlasenko
56dceb9b77 sha256,sha512: new applets. +4.9kb
we will require sha256/512 code for new $5$ and $6$ style
 password hashes anyway, they are showing up already
 in people's /etc/passwd...
2008-11-10 13:32:50 +00:00
Denis Vlasenko
c028ec280a Typo fixes 2008-11-10 10:47:47 +00:00
Denis Vlasenko
0a009c3c6b libbb: constify some data in sha1. gcc is clever enough to do it itself,
thus no actual code changes. Also some pointless beautifuing crept in.
2008-11-10 09:51:15 +00:00
Denis Vlasenko
defc1ea340 *: introduce and use FAST_FUNC: regparm on i386, otherwise no-on
text    data     bss     dec     hex filename
 808035     611    6868  815514   c719a busybox_old
 804472     611    6868  811951   c63af busybox_unstripped
2008-06-27 02:52:20 +00:00
Denis Vlasenko
9a7d38fe24 delete tons of extra #includes 2007-05-31 22:42:12 +00:00
Denis Vlasenko
bf0a201008 style fixes
last xcalloc replaced by xzalloc
2006-12-26 10:42:51 +00:00
Denis Vlasenko
524176680d Tried to find sha1_crypt - nope... ok, save few bytes in md5_sha1_sum.c
(time to sleep, 02:28 in the morning)...
2006-09-28 00:29:00 +00:00
Denis Vlasenko
9213a9e0f2 whitespace cleanup 2006-09-17 16:28:10 +00:00
"Robert P. J. Day"
5d8843e451 Replace current verbose GPL stuff in libbb/*.c with one-line GPL boilerplate. 2006-07-10 11:41:19 +00:00
"Robert P. J. Day"
63fc1a9e08 Standardize on the vi editing directives being on the first line. 2006-07-02 19:47:05 +00:00
Rob Landley
2c39eee805 Migrate endianness macros. 2006-05-05 16:54:40 +00:00
Bernhard Reutner-Fischer
421d9e5941 - move buffer allocation schemes to libbb.h
- include the correct headers: applets need busybox.h while lib* need libbb.h
2006-04-03 16:39:31 +00:00
Mike Frysinger
f885513940 just whitespace fixes 2006-03-28 02:35:56 +00:00
Rob Landley
5cf7c2df66 Patch from Devin Bayer to split up hash_fd.c into md5.c and sha1.c. (I tweaked
md5_sha1_sum.c to convert some #ifdef CONFIG to if(ENABLE).)
2006-02-21 06:44:43 +00:00