🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.privacy.anon-server
5 messages
5 total messages Started by Anonymous Fri, 04 Mar 2016 02:57
Ping Zax / merkinmuffley - mixmaster4096
#280561
Author: Anonymous
Date: Fri, 04 Mar 2016 02:57
23 lines
1641 bytes
  I was looking at keymgt.c to see if I could determine the expired key problem with mixmaster303.  I am weak in C coding, but I was wondering if there could be a problem in this chunk of code.  As I remember, C is case sensitive.  The secret.mix keys are as such:

-----Begin Mix Key-----
Created: 2015-11-24
Expires: 2016-05-22
...

Could the code possibly be having a problem comparing created: to Created: and expires: to Expires:?

	do {
	  res = fgets(line, sizeof(line), keyring);
	  if (strileft(line, "created:")) {
	    created = parse_yearmonthday(strchr(line, ':')+1);
	    if (created == -1)
	      created = 0;
	  } else if (strileft(line, "expires:")) {
	    expires = parse_yearmonthday(strchr(line, ':')+1);
	    if (expires == -1)
	      expires = 0;
	  }


  inwtx.net
Re: Ping Zax / merkinmuffley - mixmaster4096
#280627
Author: Nomen Nescio
Date: Sun, 06 Mar 2016 14:50
42 lines
2141 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

  Correction for 'Key is expired:' error.  This should stop the new
key generation 5 day hiatus.

https://github.com/merkinmuffley/mixmaster4096/archive/master.zip
The code in \mixmaster4096-master\Src\crypto.c needs correcting:

Line 394 needs to be changed from

      fprintf(f, "%s\nCreated: %s\n", begin_key, line);
to
      fprintf(f, "%s\ncreated: %s\n", begin_key, line);

and line 404 needs to be changed from

	fprintf(f, "Expires: %s\n", line);
to
	fprintf(f, "expires: %s\n", line);

Delete the pre-compiled file crypto.o before compiling.


  inwtx.net

-----BEGIN PGP SIGNATURE-----

iQIcBAEBAgAGBQJW3C4YAAoJEInjXwVU+GB4XdkP/A86iDadExM+ana/xZq4+Jnc
E6LqhJCDzYpXIxiNKHxRZbvIsV+zhfCr0cweQ2gGAO7nw7aV6WxyPiFeDoqpW60H
C6ETrIzkLLuqEndsyV3bOF7ywcW4bBF1L/DrZmiy94KTD6PJMm0OS9UOWVAZfUWQ
dP5xsspuyMl45stTGcV8gL6CAk4o/VDOwCGMJPQcDEHfSOKFtdPF+vWYVfsnJmHP
fS0rO35gePIgDwNTDHP5n75ebZUlCOl2HSixKUKtqx0rnpo5hdVTfbBFXxqoJkZx
cE1CSIQxQkr/ymOX04QNzSGcYFXHPSNrtu0X//muOHjhMtEbh7VbuGE+fHYGBHc2
1vlljeDcDUEvGmmHSIZeawQUcov5BCUSnz+5GDlJeg/pWqk1U0rIzopqCRffglkF
hPlL6hfnhbPRR1eqTVkWak0aK8rCFb3etCfzYcgG9T2hXz0X9zckVfiSVXAvzxdY
NFdMT2eOBX8INp1no/lgGW8o3AfD7lxBqwgIsAbv76BPrh73aDHbXibLXGUwq+qK
gPdoe1RszAyRNSo4gfaPu+MUXY3xH3QE6R79gRl4Y25KB6kh10bPZqmYh2Ry8RGl
8nn2kRQ9rJHtpkv517ote2nY75Iv5A2Ub+PgMmrZoUdBRnzoBfcvsX3O0G3wdDdm
vQvSzub/G9p3FRXoBIen
=Gwrl
-----END PGP SIGNATURE-----
Re: Ping Zax / merkinmuffley - mixmaster4096
#280628
Author: Zax
Date: Sun, 06 Mar 2016 19:12
80 lines
3380 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Sun,  6 Mar 2016 15:50:27 +0100 (CET), Nomen Nescio wrote in
Message-Id: <a759f89bd7e7aad1f7a11e0a3694f1d6@dizum.com>:

>
>   Correction for 'Key is expired:' error.  This should stop the new
> key generation 5 day hiatus.
>
> https://github.com/merkinmuffley/mixmaster4096/archive/master.zip
> The code in \mixmaster4096-master\Src\crypto.c needs correcting:
>
> Line 394 needs to be changed from
>
>       fprintf(f, "%s\nCreated: %s\n", begin_key, line);
> to
>       fprintf(f, "%s\ncreated: %s\n", begin_key, line);
>
> and line 404 needs to be changed from
>
> 	fprintf(f, "Expires: %s\n", line);
> to
> 	fprintf(f, "expires: %s\n", line);
>
> Delete the pre-compiled file crypto.o before compiling.

Hi,

Please can you offer some explanation as to how this fixes the key
expiration issue?

The Created and Expired lines are read in keymgt.c using this clause:-

if (strileft(line, "created:")) {
  created = parse_yearmonthday(strchr(line, ':')+1);
  if (created == -1)
    created = 0;
} else if (strileft(line, "expires:")) {
    expires = parse_yearmonthday(strchr(line, ':')+1);
    if (expires == -1)
      expires = 0;
}

The strileft function contains:

int strileft(const char *string, const char *keyword)
{
  register unsigned int i;

  for (i = 0; keyword[i] != '\0'; i++)
    if (tolower(string[i]) != tolower(keyword[i]))
      return 0;
  return 1;
}

The tolower() function should be case insensitive.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJW3IELAAoJEC3jHKG+PvqnIdwQAI8J9aIZtlWoAIqUwnaPl9/x
mu1hVchlSzzkXtcJ62/pxL9BTFdS9zJi3hJY/meDF7z2SQ/7LeNMnoMYrsxGdq+b
cooS8r/NsWdRaZ0E5IdfjPEKrmg+eEQItrPvUCOnrXBCTuZC5+k33KdByAFrKgIy
+LtHV2zn13v9m4kCyjJzYlfNn7+qYgw1STmutbrrvos/9u9jfRG5ZopZ/GnQJs0V
fRpvSFdso9iP9+c9mrz0V1HIk1JDYqe7qW5wKWVDVrKHzM6R2CcVrzwr0TSK/fvK
hC56YRSUH9io/oq+scTsRNJ0JEt/EY9c00N7Yb3XLmyar+eHehQb1T5LfvsyTr1V
Lijy7GjA1HhUUwor3+Uo3FJUl5rKOvYPFFoeFiLWIaTlJXrxOOnI1ucA1jKptK04
68zyAwCKqAMNZJH+vR+zmZbouE7h9ynncbT5+AfXYW6vKRKfABULO1RPDQCCgLf5
JlnOPoNkXgiRn/arQU+bv6XJZfImrEpziPLdqQZGiEGsjdPuxHJ9TrzvakMWhKPw
bR98IA64UyLOd1jTD2ihQ3oRRptHN5Wa9x5pANnw76k9blHOocxC2K+IdaWbG4Re
0Ci/syc3L8dmHMkvNx8AZCb/bQBTxQxyz4G3ld2KwLHp9kcF2PR6zcjHJp5eHUTs
of6phqglq10M4dFxl2nf
=NQux
-----END PGP SIGNATURE-----

-- 
pub   1024D/228761E7 2003-06-04 Steven Crook <steve@mixmin.net>
      Key fingerprint = 1CD9 95E1 E9CE 80D6 C885  B7EB B471 80D5 2287 61E7
sub  4096R/BE3EFAA7  created: 2014-11-14  expires: 2016-11-13  usage: S
Re: Ping Zax / merkinmuffley - mixmaster4096
#280636
Author: Anonymous
Date: Sun, 06 Mar 2016 21:24
82 lines
3356 bytes
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> 
> On Sun,  6 Mar 2016 15:50:27 +0100 (CET), Nomen Nescio wrote in
> Message-Id: <a759f89bd7e7aad1f7a11e0a3694f1d6@dizum.com>:
> 
> 
>>
>>   Correction for 'Key is expired:' error.  This should stop the new
>> key generation 5 day hiatus.
>>
>> https://github.com/merkinmuffley/mixmaster4096/archive/master.zip
>> The code in \mixmaster4096-master\Src\crypto.c needs correcting:
>>
>> Line 394 needs to be changed from
>>
>>       fprintf(f, "%s\nCreated: %s\n", begin_key, line);
>> to
>>       fprintf(f, "%s\ncreated: %s\n", begin_key, line);
>>
>> and line 404 needs to be changed from
>>
>>     fprintf(f, "Expires: %s\n", line);
>> to
>>     fprintf(f, "expires: %s\n", line);
>>
>> Delete the pre-compiled file crypto.o before compiling.
> 
> Hi,
> 
> Please can you offer some explanation as to how this fixes the key
> expiration issue?
> 
> The Created and Expired lines are read in keymgt.c using this clause:-
> 
> if (strileft(line, "created:")) {
> created = parse_yearmonthday(strchr(line, ':')+1);
> if (created == -1)
> created = 0;
> } else if (strileft(line, "expires:")) {
> expires = parse_yearmonthday(strchr(line, ':')+1);
> if (expires == -1)
> expires = 0;
> }
> 
> The strileft function contains:
> 
> int strileft(const char *string, const char *keyword)
> {
> register unsigned int i;
> 
> return 0;
> return 1;
> }
> 
> The tolower() function should be case insensitive.

  Yes, I see now.  That is where my lack of knowledge of C
gets me.  I thought that strileft was a C instruction, not
a function.  I see that the tolower is in there, sure enough.
It did seem completely logical that the do/while loop was
missing the expired line.

  I am wondering the function does?

int strileft(const char *string, const char *keyword)
{
  register unsigned int i;

  for (i = 0; keyword[i] != '\0'; i++)
    if (tolower(string[i]) != tolower(keyword[i]))
      return 0;
  return 1;
}

  Is it scanning or walking across 'string' looking for
'keyword'?

  Nevertheless, I guess I need to stick with what I know
best, mainframe assembler and cobol.

  inwtx.net
Re: Ping Zax / merkinmuffley - mixmaster4096
#280655
Author: Zax
Date: Mon, 07 Mar 2016 08:54
56 lines
2942 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Sun, 6 Mar 2016 22:24:38 +0100, Anonymous wrote in
Message-Id: <810fdeeddff6227e5498f36d5899de1f@hoi-polloi.org>:

> Yes, I see now.  That is where my lack of knowledge of C gets me.  I
> thought that strileft was a C instruction, not a function.  I see that
> the tolower is in there, sure enough.  It did seem completely logical
> that the do/while loop was missing the expired line.
>
>   I am wondering the function does?
>
> int strileft(const char *string, const char *keyword)
> {
>   register unsigned int i;
>
>   for (i = 0; keyword[i] != '\0'; i++)
>     if (tolower(string[i]) != tolower(keyword[i]))
>       return 0;
>   return 1;
> }
>
>   Is it scanning or walking across 'string' looking for
> 'keyword'?
Yes, it scans the string, one character at a time and tests each one
matches the corresponding keyword character.  The \0 is used to indicate
the string terminator.

> Nevertheless, I guess I need to stick with what I know best, mainframe
> assembler and cobol.
Please stick with it, the more people who take the trouble to scan code,
the better our chances of finding bugs and ways to improve it.  :)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJW3UG3AAoJEC3jHKG+PvqnC6EP/2w3U2L/JioaLK6+TLqk7sqW
bOPKeXbcdFfZCVW+rUkmFpsxun3lXZk5eopdWAsHSV2TqDZKxEbtg9L1ucgeypaO
cO73e73Avn2pBVHCo79a/M0hqOAPSJk1UHthi0uljga4QG2uIiwaOjFS2CnXxAql
NkKugYvwK3aNde+vqjFjDvKexbIJfJeIyI1NCCiKdODuO8bvuOTI1N99igp4+iOF
7O6022410lnFhrFhyAiqy511J29acoITmrIdbP0T2aimQ4UkpyNTpcDvzugKZqoi
QKQ5h6dI03Q6oJfO3WPd495SgfUaJIDTElewAWqUTZRWceJ0laxuWo317NN+HXLe
OmR999L7OUxxLubeHjIfVgRNAkeIa1Vo/ySNwrd8uGGLkLhRCPyeFwhaNz8JOPIs
VlgBioiRIcvPMJ8rJA3LAVL5V5zmjzm/wCVJghTddyEVIjLY/9Zs5qjFaxU8IB6x
uMeqY+uNA3qsEkz2f4I8Y59F9xAh9/N5mauGqQIYDvrg0GOVXOeNVrom8p95qL6y
Iqco681AkXPpb+OB1ppqRvxOPGJr4BkVh26sRT8idAZ3QgqV+qI7gCI+8AdojDPN
hQt718LZmNeHDILlxnp6/IbVAqoLLZa0VpjnpbLYXiwx0aayPBJDwg929sjLadMb
WbquUktDndvpONYIY/pB
=gd1q
-----END PGP SIGNATURE-----

-- 
pub   1024D/228761E7 2003-06-04 Steven Crook <steve@mixmin.net>
      Key fingerprint = 1CD9 95E1 E9CE 80D6 C885  B7EB B471 80D5 2287 61E7
sub  4096R/BE3EFAA7  created: 2014-11-14  expires: 2016-11-13  usage: S
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads