🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.privacy.anon-server
7 messages
7 total messages Started by Zax Sat, 13 Aug 2016 19:16
Attn: Elvis - SECRINGNEW Patch
#283930
Author: Zax
Date: Sat, 13 Aug 2016 19:16
92 lines
4113 bytes
Hi,

Here's a small Mixmaster patch for consideration.  This allows the
operator to define the path for the secring.mix.new file rather than it
being hardcoded to the Mix directory.  The reasoning is that some
operators, might prefer to write secret keys to an encrypted filesystem.
The benefit of doing this is defeated if Mixmaster keeps writing the
secring.mix.new file to an unencrypted volume.


diff -uNr ../mixmaster-elvis/Src/config.h Src/config.h
--- ../mixmaster-elvis/Src/config.h	2015-11-06 23:50:15.963341336 +0000
+++ Src/config.h	2016-08-13 19:24:15.755105799 +0100
@@ -215,6 +215,7 @@
 #define DEFAULT_DHPARAMS "dhparam.mix"
 #define DEFAULT_MIXRAND "mixrand.bin"
 #define DEFAULT_SECRING "secring.mix"
+#define DEFAULT_SECRINGNEW "secring.mix.new"
 #define DEFAULT_PUBRING "pubring.mix"
 #define DEFAULT_IDLOG "id.log"
 #define DEFAULT_STATS "stats.log"
@@ -262,6 +263,7 @@
 extern char DHPARAMS[];
 extern char MIXRAND[];
 extern char SECRING[];
+extern char SECRINGNEW[];
 extern char PUBRING[];
 extern char IDLOG[];
 extern char STATS[];
diff -uNr ../mixmaster-elvis/Src/keymgt.c Src/keymgt.c
--- ../mixmaster-elvis/Src/keymgt.c	2016-06-29 22:33:13.129533140 +0100
+++ Src/keymgt.c	2016-08-13 19:30:47.964404415 +0100
@@ -454,9 +454,11 @@
     keyring = mix_openfile(SECRING, "r");
     if (!keyring)
         return -1;
-    newsecring = mix_openfile("secring.mix.new", "w");
-    if (!newsecring)
-        return -1;
+    newsecring = mix_openfile(SECRINGNEW, "w");
+    if (!newsecring) {
+            errlog(ERRORMSG, "Unable to create new secring: %s\n", SECRINGNEW);
+            return -1;
+    }
 
     while (res) {
         linecount++;
@@ -508,9 +510,10 @@
     /* replace the file and wipe the old one */
     keyring = mix_openfile(SECRING, "r+");
     {
-    /* rename the "secring.mix.new" in the MIXDIR not CWD */
+    // Rename SECRINGNEW to SECRING
     char path1[PATHMAX], path2[PATHMAX];
-    mixfile(path1, "secring.mix.new");
+    errlog(LOG, "Renaming %s to %s.\n", SECRINGNEW, SECRING);
+    mixfile(path1, SECRINGNEW);
     mixfile(path2, SECRING);
     if (rename(path1, path2)) return -14;
     }
diff -uNr ../mixmaster-elvis/Src/mix.c Src/mix.c
--- ../mixmaster-elvis/Src/mix.c	2015-11-06 23:50:15.971341278 +0000
+++ Src/mix.c	2016-08-13 19:33:08.351472573 +0100
@@ -57,6 +57,7 @@
 char DHPARAMS[PATHMAX];
 char MIXRAND[PATHMAX];
 char SECRING[PATHMAX];
+char SECRINGNEW[PATHMAX];
 char PUBRING[PATHMAX];
 char IDLOG[PATHMAX];
 char STATS[PATHMAX];
@@ -397,6 +398,7 @@
 	strnncpy(DHPARAMS     , DEFAULT_DHPARAMS);
 	strnncpy(MIXRAND      , DEFAULT_MIXRAND);
 	strnncpy(SECRING      , DEFAULT_SECRING);
+	strnncpy(SECRINGNEW   , DEFAULT_SECRINGNEW);
 	strnncpy(PUBRING      , DEFAULT_PUBRING);
 	strnncpy(IDLOG        , DEFAULT_IDLOG);
 	strnncpy(STATS        , DEFAULT_STATS);
@@ -601,6 +603,7 @@
 	  read_conf(KEYFILE) || read_conf(PGPKEY) ||
 	  read_conf(DSAPARAMS) || read_conf(DHPARAMS) ||
 	  read_conf(MIXRAND) || read_conf(SECRING) ||
+	  read_conf(SECRINGNEW) ||
 	  read_conf(PUBRING) || read_conf(IDLOG) ||
 	  read_conf(STATS) || read_conf(DESTBLOCK) ||
 	  read_conf(PGPMAXCOUNT) ||

-- 
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: Attn: Elvis - SECRINGNEW Patch
#283933
Author: elvis-85503
Date: Sat, 13 Aug 2016 22:21
6 lines
1134 bytes
> Here's a small Mixmaster patch for consideration.  This allows the
> operator to define the path for the secring.mix.new file rather than it
> being hardcoded to the Mix directory.  The reasoning is that some
> operators, might prefer to write secret keys to an encrypted filesystem.

Wouldn't they put the whole of ~Mix on that filesystem?
Re: Attn: Elvis - SECRINGNEW Patch
#283931
Author: Zax
Date: Sat, 13 Aug 2016 23:28
39 lines
2502 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Sat, 13 Aug 2016 22:21:28 GMT, elvis-85503@notatla.org.uk wrote in
Message-Id: <slrnnqv7b8.is8.elvis-85503@notatla.org.uk>:

>> Here's a small Mixmaster patch for consideration.  This allows the
>> operator to define the path for the secring.mix.new file rather than it
>> being hardcoded to the Mix directory.  The reasoning is that some
>> operators, might prefer to write secret keys to an encrypted filesystem.
>
> Wouldn't they put the whole of ~Mix on that filesystem?

I put ~/Mix on a normal filesystem and SECRING (and the pool) on an
encrypted filesystem with a randomly generated key.  The idea being that
any unplanned reboot of the system completely destroys the keys.

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

iQIcBAEBCAAGBQJXr60vAAoJEC3jHKG+Pvqnzh0QAI8g8+RTxcg0no8xqvVtI9U9
ey3+7RHu25JSdHqdg0iGgLBcymsY3dbabav5yvPvFOQSub1BBL9G+0mzkKk+Fv6x
/h8ZcJrDkbASNUH6ks0UytwkHpMXZsdClNnKFxbtLjwYtqRy1+5aGuKfZBk3rrK6
s1rS8H6PftuOvKruZc9SWdMpYiuAlNIzsQGRow7D0EQZMcYnv7pt02F61Yzyp+2Q
ZpL8lyVmoGDF+6AgS8hMq6CH/KnGzOyCbJ0lTtO61XH/JTXr3rLr9pzVQPmVlY5v
UvM3VaZGSQ6lYvFCeSsEFFMqel14IT9soY00ML1klosKMINsX3uR2zWwJ8fOmQgT
bxIM7vBA2lmpzo6mFIOSijsdQ2FqfIyyqA9xJt7kds+aYuF+aYpZaJO8Fn80+iRx
X3vC6KoytndjaE88xb6Uc97c8unCg1Bi4KQGQpu8ioIaHJSoFGtfZ1oAJoG1nJz+
nCY69MWBsW3R088iaNJMjPGyJWJQUnOp+AnNlvP1qf8x2/FhBr1+JdOIpXj2pK3G
/KM/v9irZMEQFXUdfLpwUg7rQhfJCHUpC2llww2ohtWBoR7IWTDtuvftsBZsBunj
GVegPl2iun9Z5b1xUm8+E0mRHl51Xkwy6VGKxjbYXKwgImQv9vSUQs5biQvktM1E
IkRv/n8e3Vf5+313UpzI
=eetd
-----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: Attn: Elvis - SECRINGNEW Patch
#283937
Author: Cornelis Tromp
Date: Sat, 13 Aug 2016 23:43
8 lines
1112 bytes
>> Here's a small Mixmaster patch for consideration.  This allows the
>> operator to define the path for the secring.mix.new file rather than it
>> being hardcoded to the Mix directory.  The reasoning is that some
>> operators, might prefer to write secret keys to an encrypted filesystem.
> 
> Wouldn't they put the whole of ~Mix on that filesystem?

  How to do that would be most interesting.
Re: Attn: Elvis - SECRINGNEW Patch
#283944
Author: Jeremy Bentham
Date: Sun, 14 Aug 2016 22:17
5 lines
982 bytes
Zax - could you pastebin your patch? There is an
issue with incorrect linefeeds with the patch in
my newsreader.

Thanks!
Re: Attn: Elvis - SECRINGNEW Patch
#283942
Author: Zax
Date: Mon, 15 Aug 2016 08:11
34 lines
2174 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Mon, 15 Aug 2016 00:17:42 +0200 (CEST), Jeremy Bentham wrote in
Message-Id: <d4b7154b5419972d5a3432d973a573cc@anemone.mooo.com>:

> Zax - could you pastebin your patch? There is an
> issue with incorrect linefeeds with the patch in
> my newsreader.

https://paste.debian.net/789601/

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

iQIcBAEBCAAGBQJXsXkYAAoJEC3jHKG+Pvqn2agP/R7RQzEyP1wN+6SIQc+jOwqX
lMpJqKcalsgEG936YhXQZdhBeJq0taHx8605eEwgHzB3wiccNIUhtGMqGsSdmPjV
3TjqFn6QepydpiPLGtz8KnXd+HlFWt+po3ftgXVEZY3KBnn9ucBmURqx6qxZMEZi
W8mdY3x/VkMbJsYlE7YN/9JLXAV7tENQARgoN6IQGa0ft8CX8QBvAuFrmniycDca
erzE7/MonnYCbCKkw9XKf98djSsuuKzpS8pJecqwjLplUgEuWqph7rHjCv+z/Yiv
00G2Th0VaVA+UdgbUfJ/bsf+qre3HgeaYEJg/rHMtksf3/LQW8+VD1w9Od6ecRnu
5Rcq7hlENjrmrEzeELJQt6DlUgCoVvMQNInQKBfvY6WqFns6vz/hIQBXpGujISOE
Im0LH1q5eNOHtcswEfM1RAfuobPdU+ecaA3kKvvE3rsAh1fQRYmqdoS6ArayOSLE
4vE0QOBxIlXjI9LArLC6m5S3pkCVi7FBhQ1sP0piCqAM7nU0VTkXro09zJk0Wbyz
CSkDu7WYtH0hKKQy7NN7vKsWyfmhST2MSaovl4zCsT9FVmFWAgNe6eWf4X0KDMrl
J8Mil538Omj/zIwZIj7Ju59kkk8I1FGrhq/oUjONLrMsYAOUBHoqqccv4iF4m7qG
ozYWGWjp/SXFYq7yLGZF
=iz3Y
-----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: Attn: Elvis - SECRINGNEW Patch
#284102
Author: elvis-85503
Date: Sun, 21 Aug 2016 22:09
9 lines
1159 bytes
now on github
https://github.com/merkinmuffley/mixmaster4096/commit/7c7992d920bace5923f167012da3387c8321b458

>> Wouldn't they put the whole of ~Mix on that filesystem?
>
>   How to do that would be most interesting.

this or some variant for your system
http://www.dsm.fordham.edu/cgi-bin/man-cgi.pl?topic=crypttab&ampsect=5
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