Hi there,
Here is results of past 2 weeks:
The updated commands to test STrPe-mechanism:
Thanks!
Here is results of past 2 weeks:
1. Trusted Peer improvements
There was some problems with TP's logic. The first - trusted peer was sending packets for checking which have been received from splitter. It's a such a useless activity, so now there is a check that a new packet not from splitter. Here is some code:
def process_next_message(self): chunk_number = Peer_DBS.process_next_message(self) if chunk_number > 0 and self.current_sender != self.splitter: if self.counter == 0: self.send_chunk_hash(chunk_number) self.counter = self.calculate_next_sampled() else: self.counter -= 1 return chunk_number def receive_the_next_message(self): message, sender = Peer_DBS.receive_the_next_message(self) self.current_sender = sender return message, sender
The method process_next_message is calling method receive_the_next_message inside itself, which is overrided: it stores the sender in class variable.
The second one - 255 problem. TP sent every 255 packet. Now the next packet to send is choosed on random basis:
The second one - 255 problem. TP sent every 255 packet. Now the next packet to send is choosed on random basis:
def calculate_next_sampled(self): max_random = len(self.peer_list) / TrustedPeer.SAMPLING_EFFORT return random.randint(1, max(1, max_random)) + TrustedPeer.PASS_NUMBER
Thanks to Juan Álvaro for idea.
2. Testing plan for STrPe mechanism
I have begun the Testing Plan for STrPe mechanism. I have described several types of attack and some network configurations in this document.3. Benchmarks for crypto-libs
There are some preparations for STrPe-DS! I have performed some synthetic tests for PyCrypto lib and ecdsa lib. Both libraries can be installed via pip. Here is results (i7 2,9 GHz):
Exact results for pycrypto lib:
Sources of benchmarks can be accessed here.
Exact results for pycrypto lib:
key.sign x10 times: 0.00385499000549s key.verify x10 times: 0.00309109687805s key.sign x100 times: 0.0352149009705s key.verify x100 times: 0.0317900180817s key.sign x1000 times: 0.332525968552s key.verify x1000 times: 0.326780080795s
Sources of benchmarks can be accessed here.
The updated commands to test STrPe-mechanism:
$ cd /path/to/p2psp/src/
$ vlc Big_Buck_Bunny_small.ogv --sout "#duplicate{dst=standard{mux=ogg,dst=,access=http}}" &
$ xterm -e "./splitter.py --source_port 8080 --strpe "127.0.0.1:56000" &
$ xterm -e "./peer.py --use_localhost" &
$ vlc http://localhost:9999 &
$ xterm -e "./peer.py --use_localhost --player_port 10000 --trusted --port 56000" &
$ vlc http://localhost:10000 &
$ xterm -e "./peer.py --use_localhost --player_port 10001 --malicious" &
$ vlc http://localhost:10001 &
Thanks!
Комментариев нет:
Отправить комментарий