crypto/gc-arcfour tests: Fix link error when using --with-libgcrypt.

2025-05-04 Thread Collin Funk
: Entering directory '/home/collin/.local/src/gnulib/testdir1/gltests' gcc -Wno-error -Wcalloc-transposed-args -o test-gc-arcfour test-gc-arcfour.o libtests.a ../gllib/libgnu.a libtests.a ../gllib/libgnu.a libtests.a /usr/bin/ld: ../gllib/libgnu.a(gc-libgcrypt.o): in functio

Re: bug in gc-arcfour-tests

2005-11-07 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Simon Josefsson on 11/6/2005 7:51 PM: > >>"./gnulib-tool --with-tests --test gc-arcfour" dies a miserable death, >>with what looks like a nested here-doc using the same delimiter >>as its container:

Re: bug in gc-arcfour-tests

2005-11-06 Thread Simon Josefsson
[EMAIL PROTECTED] (Eric Blake) writes: > "./gnulib-tool --with-tests --test gc-arcfour" dies a miserable death, > with what looks like a nested here-doc using the same delimiter > as its container: Is this specific for gc-arcfour? I.e., it doesn't happen for, say, gc-

bug in gc-arcfour-tests

2005-11-05 Thread Eric Blake
"./gnulib-tool --with-tests --test gc-arcfour" dies a miserable death, with what looks like a nested here-doc using the same delimiter as its container: ... configure: creating ./config.status ./configure: line 6395: _ACEOF: command not found grep: conf16235715subs.sed: No such file or

arcfour fix

2005-10-22 Thread Simon Josefsson
--- ChangeLog 21 Oct 2005 15:05:31 - 1.436 +++ ChangeLog 22 Oct 2005 16:44:35 - @@ -1,3 +1,7 @@ +2005-10-22 Simon Josefsson <[EMAIL PROTECTED]> + + * modules/arcfour (Depends-on): Need stdint. + 2005-10-21 Bruno Haible <[EMAIL PROTECTED]> *

gc-arcfour and gc-arcfour-tests

2005-10-19 Thread Simon Josefsson
:04:08 - @@ -1,5 +1,11 @@ 2005-10-19 Simon Josefsson <[EMAIL PROTECTED]> + * tests/test-gc-arcfour.c: New file. + + * modules/gc-arcfour, modules/gc-arcfour-tests: New files. + +2005-10-19 Simon Josefsson <[EMAIL PROTECTED]> + * tests/test-gc-rijndael

Re: arcfour

2005-10-15 Thread Simon Josefsson
Paul Eggert <[EMAIL PROTECTED]> writes: > Simon Josefsson <[EMAIL PROTECTED]> writes: > >> Revised patch below. Ok to install? > > Yes, with one minor nit: > >> + *outbuf++ = *inbuf++ ^ >> +sbox[(0U + sbox[i] + sbox[j]) % ARCFOUR_SBOX_SIZE]; > > The usual GNU style is to parenthesize and

Re: arcfour

2005-10-14 Thread Paul Eggert
Simon Josefsson <[EMAIL PROTECTED]> writes: > Revised patch below. Ok to install? Yes, with one minor nit: > + *outbuf++ = *inbuf++ ^ > + sbox[(0U + sbox[i] + sbox[j]) % ARCFOUR_SBOX_SIZE]; The usual GNU style is to parenthesize and indent right-hand-sides that cross line boundaries,

Re: arcfour

2005-10-14 Thread Simon Josefsson
lib/gnulib/ChangeLog,v retrieving revision 1.419 diff -u -p -r1.419 ChangeLog --- ChangeLog 14 Oct 2005 00:59:45 - 1.419 +++ ChangeLog 14 Oct 2005 23:28:05 - @@ -1,3 +1,9 @@ +2005-10-14 Simon Josefsson <[EMAIL PROTECTED]> + + * tests/test-arcfour.c: New file. + +

Re: arcfour

2005-10-14 Thread Bruno Haible
Paul Eggert wrote: > > +#define ARCFOUR_SBOX_SIZE 256 > > + > > +typedef struct > > +{ > > + size_t idx_i, idx_j; > > + char sbox[ARCFOUR_SBOX_SIZE]; > > +} arcfour_context; > > Why must these be in arcfour.h? Shouldn't all this private to > arcfour.c? > > You can replace the above lines with 's

Re: arcfour

2005-10-14 Thread Paul Eggert
Some fairly minor comments: Simon Josefsson <[EMAIL PROTECTED]> writes: > +#define MOD256(n) ((n) & (ARCFOUR_SBOX_SIZE - 1)) That is a strange name to use. I expected the definiens to be ((n) & 255). Why not use the name MOD_ARCFOUR_SBOX_SIZE, or some shorter variant perhaps? If the code goin

Re: arcfour

2005-10-14 Thread Simon Josefsson
ff -u -p -r1.419 ChangeLog --- ChangeLog 14 Oct 2005 00:59:45 - 1.419 +++ ChangeLog 14 Oct 2005 16:14:54 - @@ -1,3 +1,9 @@ +2005-10-14 Simon Josefsson <[EMAIL PROTECTED]> + + * tests/test-arcfour.c: New file. + + * modules/arcfour, modules/arcfour-tests: New

Re: arcfour

2005-10-14 Thread Simon Josefsson
Ralf Wildenhues <[EMAIL PROTECTED]> writes: > Hi Simon, > > Keep in mind, this is all just IMHO. No need to heed my advice. :) Sure. :) > * Simon Josefsson wrote on Fri, Oct 14, 2005 at 04:14:09PM CEST: >> >> I thought about this more. There are only two defines that I believe >> should be pr

Re: arcfour

2005-10-14 Thread Stepan Kasal
Hello, On Fri, Oct 14, 2005 at 04:14:09PM +0200, Simon Josefsson wrote: > Internally, in arcfour.c, [...] > #define ARCFOUR_MOD_MASK (ARCFOUR_SBOX_SIZE - 1) yes, this is a good idea, and it also applies to the proposal I have just posted: These two would be in .h: #define ARCFOUR_LOGSZ 8 /*

Re: arcfour

2005-10-14 Thread Stepan Kasal
Hello, Ralf proposed: > > > #define ARCFOUR_BLOCKBITS 8 we have a random number generator, which gives us a sequence of 8-bit integers. So, in a sense, we are working with 8-bit blocks. But I see no reason why the other constants should contain the substring "BLOCK". On Fri, Oct 14, 2005 at

Re: arcfour

2005-10-14 Thread Ralf Wildenhues
Hi Simon, Keep in mind, this is all just IMHO. No need to heed my advice. :) * Simon Josefsson wrote on Fri, Oct 14, 2005 at 04:14:09PM CEST: > > I thought about this more. There are only two defines that I believe > should be present in arcfour.h: > > #define ARCFOUR_BLOCK_SIZE 8 ARCFOUR_BL

Re: arcfour

2005-10-14 Thread Simon Josefsson
ision 1.419 diff -u -p -r1.419 ChangeLog --- ChangeLog 14 Oct 2005 00:59:45 - 1.419 +++ ChangeLog 14 Oct 2005 14:13:11 - @@ -1,3 +1,9 @@ +2005-10-14 Simon Josefsson <[EMAIL PROTECTED]> + + * tests/test-arcfour.c: New file. + +

Re: arcfour

2005-10-14 Thread Ralf Wildenhues
* Simon Josefsson wrote on Fri, Oct 14, 2005 at 03:57:43PM CEST: > Ralf Wildenhues <[EMAIL PROTECTED]> writes: > > > Furthermore, if I may suggest not to sprinkle hard-coded numbers all > > over the place. How about something like this > > #define ARCFOUR_BLOCKBITS 8 > > #define ARCFOUR_BLOCK

Re: arcfour

2005-10-14 Thread Simon Josefsson
Ralf Wildenhues <[EMAIL PROTECTED]> writes: > Furthermore, if I may suggest not to sprinkle hard-coded numbers all > over the place. How about something like this > #define ARCFOUR_BLOCKBITS 8 > #define ARCFOUR_BLOCKSIZE (1 << ARCFOUR_BLOCKBITS) > #define ARCFOUR_BLOCKMASK (ARCFOUR_BLOCKSIZ

Re: arcfour

2005-10-14 Thread Simon Josefsson
Bruno Haible <[EMAIL PROTECTED]> writes: > Simon Josefsson wrote: > >> +/* Initialize CONTEXT using encryption KEY of KEYLEN bytes. KEY >> + should be 40 bits (5 bytes) or longer. */ >> +extern void >> +arcfour_setkey (arcfour_context * context, const char *key, size_t keylen); > > The comment

Re: [bug-gnulib] arcfour

2005-10-14 Thread Bruno Haible
Simon Josefsson wrote: > +/* Initialize CONTEXT using encryption KEY of KEYLEN bytes. KEY > + should be 40 bits (5 bytes) or longer. */ > +extern void > +arcfour_setkey (arcfour_context * context, const char *key, size_t keylen); The comment should say that KEYLEN must be > 0. (If keylen==0,

Re: arcfour

2005-10-14 Thread Simon Josefsson
Ralf Wildenhues <[EMAIL PROTECTED]> writes: > Hi Simon, > > * Simon Josefsson wrote on Fri, Oct 14, 2005 at 01:12:59AM CEST: >> How about this? > > Some style comments, if I may.. Thanks! > Yes (for less-than-commonly-optimizing compilers), but you could also be > consistent in notation here, an

Re: arcfour

2005-10-14 Thread Ralf Wildenhues
Hi Simon, * Simon Josefsson wrote on Fri, Oct 14, 2005 at 01:12:59AM CEST: > How about this? Some style comments, if I may.. > Index: lib/arcfour.c > === > RCS file: lib/arcfour.c > diff -N lib/arcfour.c > --- /dev/null 1 Jan 1970 0

arcfour

2005-10-13 Thread Simon Josefsson
@@ -1,3 +1,9 @@ +2005-10-14 Simon Josefsson <[EMAIL PROTECTED]> + + * tests/test-arcfour.c: New file. + + * modules/arcfour, modules/arcfour-tests: New files. + 2005-10-13 Simon Josefsson <[EMAIL PROTECTED]> * modules/gc-hmac-md5-tests: New file. Index: mod