BitTorrent 對 SHA-1 的改善計畫?

最新一版的 Tails 不再支援透過 BitTorrent 下載,會被導去「Biterrant attack」這邊的連結,裡面有一些關於在 SHA-1 打穿後要怎麼判斷。

BitTorrent 的討論 (包括 BitTorrent 發明人 Bram Cohen 的參與) 則是在 GitHub 上:「Transitioning to stronger hash function · Issue #58 · bittorrent/bittorrent.org」,不過看起來連要用什麼 hash algorithm 的定案都還沒有啊... 而且二月底比較熱鬧一點,三月後都沒什麼動作了。

看起來短時間也不會有動作了...

完全分散式的 BitTorrent 搜尋引擎

BitTorrent 已經有足夠的技術與環境 (ecosystem) 做出完全分散式架構的搜尋引擎了,類似於 eDonkey Network (或是說後來變成主流的 eMule) 上的 search 功能,但一直沒看到類似的東西...

magnetico 算是一個嘗試,完全透過 DHT 搜尋取得結果:

不過這套軟體的 license 是攻擊性超強的 AGPLv3,算是實驗性質吧。要真正普及應該要像 eMule 一樣直接做進 client 內...

Tor 在考慮使用 Rust 改寫

不過也不確定是不是愚人節消息就是了:「[tor-dev] Tor in a safer language: Network team update from Amsterdam」。

Tor 考慮使用 Rust 改寫,目前已經完成的部份,以及接下來的規劃:

What has already been done:
- Rust in Tor build
- Putting together environment setup instructions and a (very small) initial draft for coding standards
- Initial work to identify good candidates for migration (not tightly interdependent)

What we think are next steps:
- Define conventions for the API boundary between Rust and C
- Add a non-trivial Rust API and deploy with a flag to optionally use (to test support with a safe fallback)
- Learn from similar projects
- Add automated tooling for Rust, such as linting and testing

目前看到後續的討論只有「[tor-dev] Tor in a safer language: Network team update from Amsterdam」這篇,也許等全世界的 4/1 都過了之後再回來確認吧...

把 rTorrent 跑到 Docker 裡

花了些時間研究如何把 rTorrent 丟進 Docker 裡跑,對應的設定都放在 GitHub 上的「gslin/rtorrent-docker」這邊。

使用的方式是傳入使用者的 uid 與 gid (-e USER_GID-e USER_UID),以及預期的 port (有兩個地方,一個是 -e PORT,另外一個是 -p 開 port forwarding,不然外面沒辦法直接連進來),然後把 TERM 變數丟進確保 console 的操作。剩下來把對應的目錄掛進 container 讓他可以寫入 (-v 的部份):

docker run \
    -e PORT=6991 -e TERM=${TERM} \
    -e USER_GID=`id -g` -e USER_UID=`id -u` \
    -i -p 6991:6991 -t -v "`pwd`:/srv/rtorrent" \
    gslin/rtorrent:latest

自己用這樣應該是夠用了... 把這串命令放到 shell 的 alias 裡面用就好了。

Bitmain 的生意愈做愈大了...

Bitmain 做到打算直接弄一座 data center 來挖 Bitcoin:「Chinese firm building 135MW bitcoin data centre」。居然還是用綠色能源來玩出全世界第三大吃電資料中心:

The complex, which will be capable of pulling 135 megawatts of power placing it at #3 of the most powerful data centres in the world, will operate primarily on wind and solar power.

Bitmain 的 AntPool 應該是目前最大的 mining pool:

Bitmain already controls an estimated 18.6% of hashpower worldwide, and many independent miners in the community expressed concern that controlling a massive data centre dedicated to mining bitcoin would give the company too much influence over bitcoin.

關於 AntPool 佔整個 pool 的計算力這邊是寫 18.6%,不過照「Bitcoin Hashrate Distribution」這邊的資料,目前降到 17.4% 了... 而我記得各種攻擊手法中,最低的應該是 25% 的攻擊:「Majority is not Enough: Bitcoin Mining is Vulnerable」,不知道會不會超過...

歐盟法院認為公開無線網路的營運者不需要對使用者的侵權行為負責

歐盟法院 (The Court of Justice of the European Union) 認為公開無線網路的營運者不需要對使用者的侵權行為負責:「EU Court: Open WiFi Operator Not Liable For Pirate Users」。

不過這是有一些前提的,法院認為應該要符合這幾個要件,營運方才不要負責。基本上完全沒有 filter 限制的無線網路會符合這些條件:

The Court further notes that in order for such ‘mere conduit’ services to be exempt from third party liability, three cumulative conditions must be met:

– The provider must not have initiated the transmission
– It must not have selected the recipient of the transmission
– It must neither have selected nor modified the information contained in the transmission.

帶這並不代表丟著不管,而是在發生後要求改善:

In an effort to strike a balance between protecting a service provider from third party liability and the rights of IP owners, the Court ruled that providers can be required to end infringement.

“[T]he directive does not preclude the copyright holder from seeking before a national authority or court to have such a service provider ordered to end, or prevent, any infringement of copyright committed by its customers,” the Court found.

One such measure could include the obtaining of an injunction which would force an operator to password-protect his open WiFi network in order to deter infringement.

但法院並不同意直接監控:

On a more positive note, the Court rejected the notion of monitoring networks for infringement or taking more aggressive actions where unnecessary.

“[T]he directive expressly rules out the adoption of a measure to monitor information transmitted via a given network. Similarly, a measure consisting in terminating the internet connection completely without considering the adoption of measures less restrictive of the connection provider’s freedom to conduct a business would not be capable of reconciling the abovementioned conflicting rights,” the Court concludes.

網路對現在的言論自由非常重要,所以只有在確認侵犯他人權益的情況下才採取必要措施,歐盟法院這樣判大概是覺得這樣吧...

Open Source 版本的 Skype

前幾天講到用 DockerSkype 的「用 Docker 跑 Skype 講電話」,剛剛就看到「skypeopensource2」這個專案,不過目前功能非常有限:

First in world self-made client to Skype Network based on reversing original Skype 5.5 client.

For now, only receiving and sending messages are supported.

然後看了一下專案內容,應該是 Windows-only,這樣應該還是暫時會用 Docker 版本的 Skype 吧... 最主要還是拿來打電話 XD

用 Docker 跑 Skype 講電話

Update:中文的部份是有問題的。之前以為是跑 Docker 版本時,實際上跑到很久前裝的 skype... 移除後發現 voice 沒問題,但沒有中文字型...

因為 Skype 裡面不知道跑了什麼東西,所以想要用 Docker 包起來放在 container 裡面跑,但之前測起來不穩定,而且中文字型的問題一直沒解決,所以就先一直丟著。

而剛剛測了一下 sameersbn/docker-skype 這邊的版本,發現之前遇到沒辦法看中文的問題也解決了。

安裝的方法非常簡單,先拉下來,然後執行他:

$ docker pull sameersbn/skype:latest
$ docker run -it --rm --volume /usr/local/bin:/target sameersbn/skype:latest install

這樣就會產生 /usr/local/bin/skype,直接跑他就好了,登入後再拿自家電話撥號,測了一下沒什麼問題。另外中文輸入法也是吃 host 的,所以也很順,弄得頗不錯的...

印度 ISP 跟 Torrent 站台合作加速下載

在「Indian ISPs Speed Up BitTorrent by ‘Peering’ With a Torrent Site」這篇講到印度的 ISP 跟 torrent 站台 TorBox 合作,加速下載的速度。

裡面提到了蠻有趣的加速技巧:

They help users to download content faster by linking them to local peers in their own network.

不知道是不是指 Local Peer Discovery (BEP-14) 的技術,如果是的話大概可以猜出作法... 這樣可以降低不少 ISP 對外頻寬的流量與成本。

設計資料同步問題時一定會遇到的 Conflict 解決方案

在「A Conflict-Free Replicated JSON Datatype」這邊看到有趣的東西。(arXiv 說 2016/08/18 會有一個小時的 downtime,台灣時間剛好是 2016/08/18 的 20:20 開始:「Maintenance scheduled for Aug 18 8:20 a.m. EDT」)

作者們設計這個架構是想要在 JSON 結構上找出一個演算法,在 P2P 架構上 (而不需要靠 server) 可以同步並且產生一致的結果,另外要求當 conflict 時不要掉資料:

In this paper we present an algorithm and formal semantics for a JSON data structure that automatically resolves concurrent modifications such that no updates are lost, and such that all replicas converge towards the same state.

作者提出來的想法不是很複雜,而且 merge 保留姿的方法也頗... 特別,但總是給大家一個想法,各何況很多情況下都是有 server 架構,就簡單多了...