Top Banner
ProjectTox Free as in freedom Skype replacement Wei-Ning Huang (AZ)
89

ProjectTox: Free as in freedom Skype replacement

Jul 15, 2015

Download

Technology

Wei-Ning Huang
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: ProjectTox: Free as in freedom Skype replacement

ProjectTox Free as in freedom Skype

replacement

Wei-Ning Huang (AZ)

Page 2: ProjectTox: Free as in freedom Skype replacement

About the Speaker • 正在水深火熱中的碩二學生

• 熱愛Python及Open Source

• Involved open source projects: o Gummi LaTeX Editor

o cppman

o PyTox

o ProjectTox-Core

o Toxic

o jToxcore

o …

• More info: http://azhuang.me

Page 3: ProjectTox: Free as in freedom Skype replacement

Outline • What is Tox?

• Functionality

• Architecture and Design

• Pitfalls and Solutions

• In Progress Features

• Client and Bindings

• Live Demo

Page 4: ProjectTox: Free as in freedom Skype replacement

What is anyway?

Page 5: ProjectTox: Free as in freedom Skype replacement

What is anyway? • FOSS messaging network, supports A/V (GPLv3)

Page 6: ProjectTox: Free as in freedom Skype replacement

What is anyway? • FOSS messaging network, supports A/V (GPLv3)

• Decentralized architecture

Page 7: ProjectTox: Free as in freedom Skype replacement

What is anyway? • FOSS messaging network, supports A/V (GPLv3)

• Decentralized architecture

• End-to-end encryption

Page 8: ProjectTox: Free as in freedom Skype replacement

What is anyway? • FOSS messaging network, supports A/V (GPLv3)

• Decentralized architecture

• End-to-end encryption

• Configuration free (does not require registration)

Page 9: ProjectTox: Free as in freedom Skype replacement

What is anyway? • FOSS messaging network, supports A/V (GPLv3)

• Decentralized architecture

• End-to-end encryption

• Configuration free (does not require registration)

• Secure and easy to use

Page 10: ProjectTox: Free as in freedom Skype replacement

What is anyway? • FOSS messaging network, supports A/V (GPLv3)

• Decentralized architecture

• End-to-end encryption

• Configuration free (does not require registration)

• Secure and easy to use

• A Skype replacement

Page 11: ProjectTox: Free as in freedom Skype replacement

Why are we doing this?

Page 12: ProjectTox: Free as in freedom Skype replacement

Why are we doing this?

Page 13: ProjectTox: Free as in freedom Skype replacement

Why are we doing this?

Page 14: ProjectTox: Free as in freedom Skype replacement

Why are we doing this? 4chan/g/

Page 15: ProjectTox: Free as in freedom Skype replacement

Why are we doing this? 4chan/g/

Page 16: ProjectTox: Free as in freedom Skype replacement

Why are we doing this?

Page 17: ProjectTox: Free as in freedom Skype replacement

Why are we doing this?

Page 18: ProjectTox: Free as in freedom Skype replacement

Why are we doing this?

馬卡茸表示:如果沒做錯事,就不用怕監聽!

圖片來自插畫家謝立聖

Page 19: ProjectTox: Free as in freedom Skype replacement

Why are we doing this?

馬卡茸表示:如果沒做錯事,就不用怕監聽!

圖片來自插畫家謝立聖

???

Page 20: ProjectTox: Free as in freedom Skype replacement

Why are we doing this?

馬卡茸表示:如果沒做錯事,就不用怕監聽!

圖片來自插畫家謝立聖

???

Page 21: ProjectTox: Free as in freedom Skype replacement

Why are we doing this?

馬卡茸表示:如果沒做錯事,就不用怕監聽!

圖片來自插畫家謝立聖

憲法第十二條:「人民有祕密通訊之自由」

???

Page 22: ProjectTox: Free as in freedom Skype replacement

Why are we doing this?

Page 23: ProjectTox: Free as in freedom Skype replacement

Why are we doing this? • We want a free(as in Freedom) and secure

alternative for , since it is “Microsofted”....

Page 24: ProjectTox: Free as in freedom Skype replacement

Why are we doing this? • We want a free(as in Freedom) and secure

alternative for , since it is “Microsofted”....

• "We don't want to be the next secure chatting program, we want to be the next secure chatting program that people actually use." - Someone on IRC

Page 25: ProjectTox: Free as in freedom Skype replacement

Why are we doing this? • We want a free(as in Freedom) and secure

alternative for , since it is “Microsofted”....

• "We don't want to be the next secure chatting program, we want to be the next secure chatting program that people actually use." - Someone on IRC

• Current secure chat programs aren't easy to use, at least not for our parents and grandparents normal people

Page 26: ProjectTox: Free as in freedom Skype replacement

Who started this?

Page 27: ProjectTox: Free as in freedom Skype replacement

Who started this? • irungentoo

o Real identity is a mystery :P

o Most of the code is implemented by him

Page 28: ProjectTox: Free as in freedom Skype replacement

Who started this? • irungentoo

o Real identity is a mystery :P

o Most of the code is implemented by him

• Project started up Jun 23, 2013

Page 29: ProjectTox: Free as in freedom Skype replacement

Who started this? • irungentoo

o Real identity is a mystery :P

o Most of the code is implemented by him

• Project started up Jun 23, 2013

• There are currently about 10 active tox.im developers, including me.

Page 30: ProjectTox: Free as in freedom Skype replacement

Architecture and Design

Page 31: ProjectTox: Free as in freedom Skype replacement

Architecture and Design • Separated core and client, Tox is a library.

Page 32: ProjectTox: Free as in freedom Skype replacement

Architecture and Design • Separated core and client, Tox is a library.

• Current implemented features in core:

Page 33: ProjectTox: Free as in freedom Skype replacement

Architecture and Design • Separated core and client, Tox is a library.

• Current implemented features in core: o Text messages

• Read receipt

• Typing status

Page 34: ProjectTox: Free as in freedom Skype replacement

Architecture and Design • Separated core and client, Tox is a library.

• Current implemented features in core: o Text messages

• Read receipt

• Typing status

o File transfer (way faster than Skype)

Page 35: ProjectTox: Free as in freedom Skype replacement

Architecture and Design • Separated core and client, Tox is a library.

• Current implemented features in core: o Text messages

• Read receipt

• Typing status

o File transfer (way faster than Skype)

o Group chat (IRC-like, currently invitation only)

Page 36: ProjectTox: Free as in freedom Skype replacement

Architecture and Design • Separated core and client, Tox is a library.

• Current implemented features in core: o Text messages

• Read receipt

• Typing status

o File transfer (way faster than Skype)

o Group chat (IRC-like, currently invitation only)

o Audio / Video call support

• Currently only 1-to-1 call supported

• 1-to-many and many-to-many support on the way!

Page 37: ProjectTox: Free as in freedom Skype replacement

Architecture and Design • Separated core and client, Tox is a library.

• Current implemented features in core: o Text messages

• Read receipt

• Typing status

o File transfer (way faster than Skype)

o Group chat (IRC-like, currently invitation only)

o Audio / Video call support

• Currently only 1-to-1 call supported

• 1-to-many and many-to-many support on the way!

o All communication between clients are encrypted.

Page 38: ProjectTox: Free as in freedom Skype replacement

DHT

Page 39: ProjectTox: Free as in freedom Skype replacement

DHT • Distributed Hash Table similar to BitTorrent

Page 40: ProjectTox: Free as in freedom Skype replacement

DHT • Distributed Hash Table similar to BitTorrent

• Hash table contains ID to IP-Port mapping

Page 41: ProjectTox: Free as in freedom Skype replacement

DHT • Distributed Hash Table similar to BitTorrent

• Hash table contains ID to IP-Port mapping

Bootstrap Server

Client

NAT

Client Client

LAN Discovery

Client

Client Boostrap

Hole punching

NAT

Page 42: ProjectTox: Free as in freedom Skype replacement

Friend Requests

Page 43: ProjectTox: Free as in freedom Skype replacement

Friend Requests • Friend requests are routed between clients

Page 44: ProjectTox: Free as in freedom Skype replacement

Friend Requests • Friend requests are routed between clients

• Client list or a list of clients whose ID are mathematically (XOR) closest to us

Page 45: ProjectTox: Free as in freedom Skype replacement

Friend Requests • Friend requests are routed between clients

• Client list or a list of clients whose ID are mathematically (XOR) closest to us

Alice

Jack

Lucy

Bob

Request

Request

Got Alice’s IP_Port

Page 46: ProjectTox: Free as in freedom Skype replacement

Using the UDP Protocal • Using UDP, easier for hole punching

Page 47: ProjectTox: Free as in freedom Skype replacement

Using the UDP Protocal • Using UDP, easier for hole punching

• A Lossless UDP protocol on top of UDP

Page 48: ProjectTox: Free as in freedom Skype replacement

Using the UDP Protocal • Using UDP, easier for hole punching

• A Lossless UDP protocol on top of UDP

• Allow packet drop for A/V data packet

Page 49: ProjectTox: Free as in freedom Skype replacement

Using the UDP Protocal • Using UDP, easier for hole punching

• A Lossless UDP protocol on top of UDP

• Allow packet drop for A/V data packet

• NAT Traversal: Most NAT works, but symmetric NAT are problematic for now

Page 50: ProjectTox: Free as in freedom Skype replacement

Encryption • Using Elliptic Curve Cryptography

o Short key length, but still secure

Page 51: ProjectTox: Free as in freedom Skype replacement

Encryption • Using Elliptic Curve Cryptography

o Short key length, but still secure

• Using NaCl (Networking and Cryptography library)

Page 52: ProjectTox: Free as in freedom Skype replacement

Encryption • Using Elliptic Curve Cryptography

o Short key length, but still secure

• Using NaCl (Networking and Cryptography library) o libsodium is prefered

Page 53: ProjectTox: Free as in freedom Skype replacement

Encryption • Using Elliptic Curve Cryptography

o Short key length, but still secure

• Using NaCl (Networking and Cryptography library) o libsodium is prefered

o crypto_box: curve25519xsalsa20poly1305

• curve25519 for Key exchange

• xsalsa20 for encryption

• poly1305 for message authentication

Page 54: ProjectTox: Free as in freedom Skype replacement

Encryption • Using Elliptic Curve Cryptography

o Short key length, but still secure

• Using NaCl (Networking and Cryptography library) o libsodium is prefered

o crypto_box: curve25519xsalsa20poly1305

• curve25519 for Key exchange

• xsalsa20 for encryption

• poly1305 for message authentication

• ID == Public Key o Example ID:

4E9D1B82DEE3BD3D4DDA62190873EA40737251A43445E4D517E66230BC4507233533EDD01F24

Page 55: ProjectTox: Free as in freedom Skype replacement

Pitfalls and Solutions

Page 56: ProjectTox: Free as in freedom Skype replacement

Pitfalls and Solutions • Attack against DHT

o Sybil attacks: attacker with large resource (e.g. governments) can create a large number of pseudo nodes that does nothing or disrupt network.

Page 57: ProjectTox: Free as in freedom Skype replacement

Pitfalls and Solutions • Attack against DHT

o Sybil attacks: attacker with large resource (e.g. governments) can create a large number of pseudo nodes that does nothing or disrupt network.

• Metadata Leaking o When routing friend requests, nodes leaks information

about the request’s ID and IP mapping.

o Possible to identify a users’s real identity with IP

Page 58: ProjectTox: Free as in freedom Skype replacement

Pitfalls and Solutions • Attack against DHT

o Sybil attacks: attacker with large resource (e.g. governments) can create a large number of pseudo nodes that does nothing or disrupt network.

• Metadata Leaking o When routing friend requests, nodes leaks information

about the request’s ID and IP mapping.

o Possible to identify a users’s real identity with IP

• How do we safely exchange ID (Public Key) o Key being swap by a MITM?

Page 59: ProjectTox: Free as in freedom Skype replacement

Solutions • Attack against DHT

o Periodically check all client’s behavior to see if it’s a bad node.

o The criteria of a good node is strict.

Page 60: ProjectTox: Free as in freedom Skype replacement

Solutions • Attack against DHT

o Periodically check all client’s behavior to see if it’s a bad node.

o The criteria of a good node is strict.

• Metadata Leaking o Don’t use their long term keypair in DHT, generate a

temporary one when sending friend requests.

o Onion routing for friend requests

Page 61: ProjectTox: Free as in freedom Skype replacement

Solutions • Attack against DHT

o Periodically check all client’s behavior to see if it’s a bad node.

o The criteria of a good node is strict.

• Metadata Leaking o Don’t use their long term keypair in DHT, generate a

temporary one when sending friend requests.

o Onion routing for friend requests

• How do we safely exchange ID (Public Key) o DNS lookup!

Page 62: ProjectTox: Free as in freedom Skype replacement

DNS User Discovery

Page 63: ProjectTox: Free as in freedom Skype replacement

DNS User Discovery • Use DNS TXT record to store the ID, for example:

o tox://[email protected] will be mapped to at TXT record ‘tox1._tox.azhuang.me’

Page 64: ProjectTox: Free as in freedom Skype replacement

DNS User Discovery • Use DNS TXT record to store the ID, for example:

o tox://[email protected] will be mapped to at TXT record ‘tox1._tox.azhuang.me’

o ‘v=tox1;id=4E9D1B82DEE3BD3D4DDA62190873EA40737251A43445E4D517E66230BC4507233533EDD01F24’

Page 65: ProjectTox: Free as in freedom Skype replacement

DNS User Discovery • Use DNS TXT record to store the ID, for example:

o tox://[email protected] will be mapped to at TXT record ‘tox1._tox.azhuang.me’

o ‘v=tox1;id=4E9D1B82DEE3BD3D4DDA62190873EA40737251A43445E4D517E66230BC4507233533EDD01F24’

• To prevent DNS poisoning or MITM, use the tox2 protocol (requires a extra pin): o 'v=tox2;pub=4E9D1B82DEE3BD3D4DDA62190873EA407372

51A43445E4D517E66230BC450723;check=1F24‘

Page 66: ProjectTox: Free as in freedom Skype replacement

DNS User Discovery • Use DNS TXT record to store the ID, for example:

o tox://[email protected] will be mapped to at TXT record ‘tox1._tox.azhuang.me’

o ‘v=tox1;id=4E9D1B82DEE3BD3D4DDA62190873EA40737251A43445E4D517E66230BC4507233533EDD01F24’

• To prevent DNS poisoning or MITM, use the tox2 protocol (requires a extra pin): o 'v=tox2;pub=4E9D1B82DEE3BD3D4DDA62190873EA407372

51A43445E4D517E66230BC450723;check=1F24‘

• tox.se will be available for the public

Page 67: ProjectTox: Free as in freedom Skype replacement

In Progress Features

Page 68: ProjectTox: Free as in freedom Skype replacement

In Progress Features • DHT Hardening

o Research for more attach patterns

Page 69: ProjectTox: Free as in freedom Skype replacement

In Progress Features • DHT Hardening

o Research for more attach patterns

• TCP Server o Route traffic for clients behind symmetric NAT or

enterprise firewalls

o Act like a “Super node” in the Skype network

Page 70: ProjectTox: Free as in freedom Skype replacement

In Progress Features • DHT Hardening

o Research for more attach patterns

• TCP Server o Route traffic for clients behind symmetric NAT or

enterprise firewalls

o Act like a “Super node” in the Skype network

• A/V improvements o Congestion control and variable bitrate support

o A/V synchronization

Page 71: ProjectTox: Free as in freedom Skype replacement

Clients and Bindings

Page 72: ProjectTox: Free as in freedom Skype replacement

Clients and Bindings

Page 73: ProjectTox: Free as in freedom Skype replacement

Clients and Bindings • Support most platforms

Page 74: ProjectTox: Free as in freedom Skype replacement

Clients and Bindings • Support most platforms

o Windows, Linux, Mac

• Toxic (Ncurses CLI), has audio call support

• Venom (Vala with GTK+)

• Poison (MacOS only)

Page 75: ProjectTox: Free as in freedom Skype replacement

Clients and Bindings • Support most platforms

o Windows, Linux, Mac

• Toxic (Ncurses CLI), has audio call support

• Venom (Vala with GTK+)

• Poison (MacOS only)

o Mobile

• AnTox (Android), supports QR code scanning

• Toxicity (iOS)

Page 76: ProjectTox: Free as in freedom Skype replacement

Clients and Bindings • Support most platforms

o Windows, Linux, Mac

• Toxic (Ncurses CLI), has audio call support

• Venom (Vala with GTK+)

• Poison (MacOS only)

o Mobile

• AnTox (Android), supports QR code scanning

• Toxicity (iOS)

• Language bindings: o Python: PyTox (full A/V support)

o jTorecore: used in Antox

Page 77: ProjectTox: Free as in freedom Skype replacement

How to use? • Just launch any client, and it will generate a

public/private key pair for you

Page 78: ProjectTox: Free as in freedom Skype replacement

How to use? • Just launch any client, and it will generate a

public/private key pair for you

• No login required

Page 79: ProjectTox: Free as in freedom Skype replacement

How to use? • Just launch any client, and it will generate a

public/private key pair for you

• No login required

• Send your public key to you friends

Page 80: ProjectTox: Free as in freedom Skype replacement

How to use? • Just launch any client, and it will generate a

public/private key pair for you

• No login required

• Send your public key to you friends

• Add you friends with their public key

Page 81: ProjectTox: Free as in freedom Skype replacement

How to use? • Just launch any client, and it will generate a

public/private key pair for you

• No login required

• Send your public key to you friends

• Add you friends with their public key

• Start chatting!

Page 82: ProjectTox: Free as in freedom Skype replacement

PyTox

Page 83: ProjectTox: Free as in freedom Skype replacement

PyTox • CDD (Conference Driven Developemnt)

Page 84: ProjectTox: Free as in freedom Skype replacement

PyTox • CDD (Conference Driven Developemnt)

• No A/V support 2 days ago… o The video implementation in core even has some critical

bugs

Page 85: ProjectTox: Free as in freedom Skype replacement

PyTox • CDD (Conference Driven Developemnt)

• No A/V support 2 days ago… o The video implementation in core even has some critical

bugs

• Full A/V support implemented before OSDC.tw!

Page 86: ProjectTox: Free as in freedom Skype replacement

PyTox • CDD (Conference Driven Developemnt)

• No A/V support 2 days ago… o The video implementation in core even has some critical

bugs

• Full A/V support implemented before OSDC.tw!

• Leverage the power of Python o An EchoBot can be implement in less than 50 lines of

Python code

o SyncBot: a PoC of PyTox, syncing messages between Tox groupchat and freenode #tox-ontopic

Page 87: ProjectTox: Free as in freedom Skype replacement

PyTox

Page 88: ProjectTox: Free as in freedom Skype replacement

Live Demo