🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.privacy.anon-server
Article #275751

Re: Question

#275751
From: Zax
Date: Sun, 30 Aug 2015 18:00
95 lines
5385 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Sun, 30 Aug 2015 16:12:34 +0000 (UTC), Anonymous wrote in
Message-Id: <ab526e494fa5c36e605a5a5dc6b0301f@remailer.paranoici.org>:

>> The solution to this is complicated and it took me a while to understand
>> it.  Instead of each remailer padding with random data, they pad with
>> something predictable, such as 512 x "0".  Each remailer performs a
>> decrypt on this header (and all the other headers) so the 512 x "0" is
>> indistinguishable from random when it leaves the remailer.  The key
>> difference is that the client (who also generates all the encryption
>> keys) can now predict what 512 x "0" should look like at each hop when
>> decrypted.  It can generate Hash values for the padding added at
>> every hop and put that hash in the next-hop header for checking.
>>
>> Each remailer must now pad with 512 x "0" otherwise the next remailer
>> will spot the broken hash (provided by the client) and drop the message.
>> The entire message, although mutated at each hop, is entirely integrity
>> checked.  Mixmaster doesn't currently do this.
>
>   It seems that the implementation would not be that hard to 
> incorporate.  Possibly the 4096s could do this alone.

Unfortunately it's not as simple as it sounds.  Current Mixmaster uses
3DES encryption and the encrypt/decrypt operations are not identical.
This would require switching to AES_CTR (or some other cipher in CTR
mode) where "0" can be pre-encrypted N times by the client using a
generated key, in order to predict the result after a series of
remailers perform decryption on the headers.

Consider the first hop remailer in a chain: It inserts 512x"0" at the
bottom of the header stack (call it Pad-1)and then decrypts each header
(including Pad-1).  When the next remailer gets the message, it inserts another
512x"0" (Pad-2) and does the same decryption on each header.  Pad-1 has
now been decrypted twice, with different keys and IVs.  This process
repeats up to 20 times.  The client needs to predict all these actions
through every hop when generating the message.

Here's the function from Yamn that achieves this:-

// deterministic precalculates the header content for fake headers inserted at
// each remailer hop.
func deterministic(keys, ivs [maxChainLength - 1][]byte, chainLength, hopNum int) (pos int, content []byte) {
  bottomSlotNum := maxChainLength - 1          // (9 for 10 hops)
  numDslots := chainLength - 1 - hopNum        // (2 for exit of 10 hops)
  topDslotNum := bottomSlotNum - numDslots + 1 // (8 for exit of 10 hops)
  content = make([]byte, 0, numDslots*headerBytes)
  //fmt.Printf("Chain=%d, Hop=%d\n", chainLength, hopNum)
  for slot := topDslotNum; slot <= bottomSlotNum; slot++ {
    fakehead := make([]byte, headerBytes)
    //fmt.Printf("Location: H%dS%d\n", hopNum, slot)
    startHop := maxChainLength + hopNum - slot
    startSlot := bottomSlotNum
    for iterLeft := startHop; iterLeft > hopNum; iterLeft-- {
      // Minus one because we don't use these keys/iv on the exit hop
      hopkey := keys[iterLeft-1]
      hopivs := ivs[iterLeft-1]
      hopiv := hopivs[startSlot*16 : (startSlot+1)*16]
      //fmt.Printf("Fake: Hop=%d, Slot=%d, Key=%x, IV=%x\n", iterLeft, startSlot, hopkey[:10], hopiv[:10])
      fakehead = AES_CTR(fakehead, hopkey, hopiv)
      startSlot--
    }
    clen := len(content)
    content = content[0 : clen+headerBytes]
    copy(content[clen:], fakehead)
  }
  pos = topDslotNum * headerBytes
  return
}



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

iQIcBAEBCAAGBQJV40S1AAoJEC3jHKG+PvqnIxYP/Rfi8Lx216fgjh0mFIgkVsG4
sD0Nb+LK3vM8AOINEYKNBKYMbmV3A+IZ/wCQ61rNDac2Y6qnYTKrbV915haw8aIm
PcQHE3qxP5e18wf2wbs4q99pD8W8cf+g8VzAcbNvnlNxECnwof0lURLopwcop32K
3/xKTJIBGvJMDRkAIBV7zwn8APuHdZPQ1IvWP7IjzHgH6VZeaDitwKdPI5xRSTKF
u8qsXSMZ3qN6DFmFO04EVb2SE/4IFKkUpv515/nz7Z3lY1KClcFhj9vcIo5wPp5x
KzXJAf1GFVkX7P+V6TOmpQnqssHHHRtcg1rRxpduJnjmdue0hE0z7AHZE70lnPiR
GsxBTazW9pBjbxDPoVv2/GKnadYIT7r68Yh0l+vushvlKGwQ/ZY3D5ro+RgG9B/+
FtSo7iPSlD266I938FcYzRL0U280Q1jKVTcVHdPn5LhwMA86Yz4j8YHxar/j3HEW
GZokSIQC+jlW5IMEjXSm5OLvryFqiFwqLTnZnGtMTF1CdT5s5Wgxz/viTcep2Sk+
rojxcXj2KNeK/8sq/0dbll8mNPKAWx+GO/4kjbu/ubdcDjAdNe5qrZ7Udmxpex/V
mhasx89MGWCLUX8RBVholk900XSdd5DIEBz+RQpjd87xuV7AnnRH0Q6yN+5YGqQW
k9j+FMFm0W4tvNzu9BNw
=rJC2
-----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
Technical Details
Message-ID: <slrnmu6h5n.ilk.admin@snorky.mixmin.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!news.usenet.farm!..!..!not-for-mail
References: <slrnmu5qqd.g2o.admin@snorky.mixmin.net> <ab526e494fa5c36e605a5a5dc6b0301f@remailer.paranoici.org>

Show Full Headers
Complete Article Headers
Message-ID: <slrnmu6h5n.ilk.admin@snorky.mixmin.net>
Subject: Re: Question
Date: Sun, 30 Aug 2015 18:00:23 +0000
From: Zax <admin@mixmin.net>
References: <slrnmu5qqd.g2o.admin@snorky.mixmin.net> <ab526e494fa5c36e605a5a5dc6b0301f@remailer.paranoici.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!news.usenet.farm!..!..!not-for-mail
Newsgroups: alt.privacy.anon-server
Organization: Mixmin
Injection-Date: Sun, 30 Aug 2015 18:00:23 +0000 (UTC)
Injection-Info: news.mixmin.net; posting-host="b3d35a7ea93243cd2837e0450058617a56b6aceb";
User-Agent: slrn/pre1.0.3-4 (Linux)
Lines: 94