Delivery-Date: Tue, 05 Aug 2014 02:59:23 -0400
Return-Path: <tor-talk-bounces@lists.torproject.org>
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on moria.seul.org
X-Spam-Level: 
X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,
	RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID autolearn=ham version=3.3.1
X-Original-To: archiver@seul.org
Delivered-To: archiver@seul.org
Received: from eugeni.torproject.org (eugeni.torproject.org [38.229.72.13])
	(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by khazad-dum.seul.org (Postfix) with ESMTPS id E7A6F1E0C0D;
	Tue,  5 Aug 2014 02:59:21 -0400 (EDT)
Received: from eugeni.torproject.org (localhost [127.0.0.1])
	by eugeni.torproject.org (Postfix) with ESMTP id DA7992F625;
	Tue,  5 Aug 2014 06:59:17 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by eugeni.torproject.org (Postfix) with ESMTP id 30BDC2EDF7
 for <tor-talk@lists.torproject.org>; Tue,  5 Aug 2014 06:59:13 +0000 (UTC)
X-Virus-Scanned: Debian amavisd-new at eugeni.torproject.org
Received: from eugeni.torproject.org ([127.0.0.1])
 by localhost (eugeni.torproject.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id tga_bMJMK-zG for <tor-talk@lists.torproject.org>;
 Tue,  5 Aug 2014 06:59:13 +0000 (UTC)
Received: from mail-wi0-x22b.google.com (mail-wi0-x22b.google.com
 [IPv6:2a00:1450:400c:c05::22b])
 (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (not verified))
 by eugeni.torproject.org (Postfix) with ESMTPS id CF1122EDF4
 for <tor-talk@lists.torproject.org>; Tue,  5 Aug 2014 06:59:12 +0000 (UTC)
Received: by mail-wi0-f171.google.com with SMTP id hi2so6306571wib.4
 for <tor-talk@lists.torproject.org>; Mon, 04 Aug 2014 23:59:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:message-id:date:from:user-agent:mime-version:to:subject
 :references:in-reply-to:content-type:content-transfer-encoding;
 bh=GU7MpP7kcOLInqt3lwc53qZJUdll+wtoBLdP031Ovhk=;
 b=kHjpa7qMowc/ZinYJplRZe0CBtn/hicatWe1+UO/20Jm9u90NEpsvtZWrIVxrA1nnK
 oT+0M8B7wV7X7stm5UcBqBaAdGVRkwfNwyhQ7+WdzIBbsl0YLwC+e8EqPf6EMoLWa57F
 sUfbwf+sNWSic/gPkizqFzMTcJVQ41cNiUm+oEOPnO2BiSAMzCHb7VIO7wOas/OwkLnm
 zbX+rpLqIf+RxVPZyk+ceqGQ/fvcOQ3fXkwMViBZrs7GC6FVmOm5NMPjU6+G78vB2H/0
 KrbH2sg3LOjAUoJT29qM1+SNzuT/3ql7tNHXz0zxJIZXrjZvG6p8qvc0hGoB0BFgRt0L
 GFHA==
X-Received: by 10.180.96.169 with SMTP id dt9mr3668356wib.62.1407221949753;
 Mon, 04 Aug 2014 23:59:09 -0700 (PDT)
Received: from karstens-air.multi.box
 (dyndsl-031-150-159-110.ewe-ip-backbone.de. [31.150.159.110])
 by mx.google.com with ESMTPSA id f6sm2052672wja.25.2014.08.04.23.59.07
 for <multiple recipients>
 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
 Mon, 04 Aug 2014 23:59:08 -0700 (PDT)
Message-ID: <53E080BB.1070604@torproject.org>
Date: Tue, 05 Aug 2014 08:59:07 +0200
From: Karsten Loesing <karsten@torproject.org>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9;
 rv:24.0) Gecko/20100101 Thunderbird/24.6.0
MIME-Version: 1.0
To: tor-talk@lists.torproject.org
References: <53DAB8B4.1080403@bitmessage.ch> <53DFDBC1.40200@torproject.org>
 <53E01838.5040703@bitmessage.ch>
In-Reply-To: <53E01838.5040703@bitmessage.ch>
X-Enigmail-Version: 1.6
Subject: Re: [tor-talk] understanding metrics bw graphs
X-BeenThere: tor-talk@lists.torproject.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: tor-talk@lists.torproject.org
List-Id: "all discussion about theory, design,
 and development of Onion Routing" <tor-talk.lists.torproject.org>
List-Unsubscribe: <https://lists.torproject.org/cgi-bin/mailman/options/tor-talk>, 
 <mailto:tor-talk-request@lists.torproject.org?subject=unsubscribe>
List-Archive: <http://lists.torproject.org/pipermail/tor-talk/>
List-Post: <mailto:tor-talk@lists.torproject.org>
List-Help: <mailto:tor-talk-request@lists.torproject.org?subject=help>
List-Subscribe: <https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk>, 
 <mailto:tor-talk-request@lists.torproject.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: tor-talk-bounces@lists.torproject.org
Sender: "tor-talk" <tor-talk-bounces@lists.torproject.org>

On 05/08/14 01:33, Nusenu wrote:
>>> Which would bring me to the next question (which would be 
>>> required to actually do the required accounting for (b)): Is a 
>>> relay able to tell whether it is being used as first or second 
>>> hop solely by looking at packets (not their source)?
> 
>> Looking at the packet source and comparing it to the list of
>> known relays would probably be the most reliable way for counting
>> bytes as first or second hop.  But this is not implemented, and
>> there are plans to implement this, to the best of my knowledge.
> 
> If relays are unable to tell in which position they are used, how
> does AllowSingleHopExits work? I guess by simple checking if the
> client IP matches an IP in the consensus?

From a quick look at the code: yes.

https://gitweb.torproject.org/tor.git/blob/HEAD:/src/or/connection_edge.c#l2494

Relays also distinguish whether a circuit was created using a
CREATE_FAST or a CREATE cell, but that distinction is going away with
CREATE_FAST cells being phased out.  See proposal 221 for details.

https://gitweb.torproject.org/torspec.git/blob/HEAD:/proposals/221-stop-using-create-fast.txt

So, yes, by comparing the identity presented by the previous hop with
the identities contained in the known consensus.

All the best,
Karsten
-- 
tor-talk mailing list - tor-talk@lists.torproject.org
To unsubscribe or change other settings go to
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk

