• Stars
    star
    1,073
  • Rank 43,114 (Top 0.9 %)
  • Language
    Go
  • License
    Other
  • Created over 10 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The obfourscator (Courtesy mirror)

obfs4 - The obfourscator

Yawning Angel (yawning at schwanenlied dot me)

What?

This is a look-like nothing obfuscation protocol that incorporates ideas and concepts from Philipp Winter's ScrambleSuit protocol. The obfs naming was chosen primarily because it was shorter, in terms of protocol ancestery obfs4 is much closer to ScrambleSuit than obfs2/obfs3.

The notable differences between ScrambleSuit and obfs4:

  • The handshake always does a full key exchange (no such thing as a Session Ticket Handshake).
  • The handshake uses the Tor Project's ntor handshake with public keys obfuscated via the Elligator 2 mapping.
  • The link layer encryption uses NaCl secret boxes (Poly1305/XSalsa20).

As an added bonus, obfs4proxy also supports acting as an obfs2/3 client and bridge to ease the transition to the new protocol.

Why not extend ScrambleSuit?

It's my protocol and I'll obfuscate if I want to.

Since a lot of the changes are to the handshaking process, it didn't make sense to extend ScrambleSuit as writing a server implementation that supported both handshake variants without being obscenely slow is non-trivial.

Dependencies

Build time library dependencies are handled by the Go module automatically.

If you are on Go versions earlier than 1.11, you might need to run go get -d ./... to download all the dependencies. Note however, that modules always use the same dependency versions, while go get -d always downloads master.

  • Go 1.11.0 or later. Patches to support up to 2 prior major releases will be accepted if they are not overly intrusive and well written.
  • See go.mod, go.sum and go list -m -u all for build time dependencies.

Installation

To build:

`go build -o obfs4proxy/obfs4proxy ./obfs4proxy`

To install, copy ./obfs4proxy/obfsproxy to a permanent location (Eg: /usr/local/bin)

Client side torrc configuration:

ClientTransportPlugin obfs4 exec /usr/local/bin/obfs4proxy

Bridge side torrc configuration:

# Act as a bridge relay.
BridgeRelay 1

# Enable the Extended ORPort
ExtORPort auto

# Use obfs4proxy to provide the obfs4 protocol.
ServerTransportPlugin obfs4 exec /usr/local/bin/obfs4proxy

# (Optional) Listen on the specified address/port for obfs4 connections as
# opposed to picking a port automatically.
#ServerTransportListenAddr obfs4 0.0.0.0:443

Tips and tricks

  • On modern Linux systems it is possible to have obfs4proxy bind to reserved ports (<=1024) even when not running as root by granting the CAP_NET_BIND_SERVICE capability with setcap:

    # setcap 'cap_net_bind_service=+ep' /usr/local/bin/obfs4proxy

  • obfs4proxy can also act as an obfs2 and obfs3 client or server. Adjust the ClientTransportPlugin and ServerTransportPlugin lines in the torrc as appropriate.

  • obfs4proxy can also act as a ScrambleSuit client. Adjust the ClientTransportPlugin line in the torrc as appropriate.

  • The autogenerated obfs4 bridge parameters are placed in DataDir/pt_state/obfs4_state.json. To ease deployment, the client side bridge line is written to DataDir/pt_state/obfs4_bridgeline.txt.

Thanks

  • Loup Vaillant for motivating me to replace the Elligator implementation and a body of code I could draw on to accelerate the replacement process.
  • David Fifield for goptlib.
  • Adam Langley for his initial Elligator implementation.
  • Philipp Winter for the ScrambleSuit protocol which provided much of the design.

More Repositories

1

newhope

Golang "Post-quantum key exchange – a new hope." (Mirror of https://gitlab.com/yawning/newhope)
Go
78
star
2

chacha20

Golang (X)ChaCha20 stream cipher. (Mirror)
Go
60
star
3

horse25519

Ed25519 vanity public key generator
C
49
star
4

nyquist

Noise Protocol Framework (Mirror)
Go
42
star
5

obfsclient

A C++11 obfs2/3 Tor managed pluggable transport client
C++
30
star
6

bulb

bulb is not stem
Go
28
star
7

secp256k1-voi

High assurance Go secp256k1 (Mirror)
Go
27
star
8

sphincs256

SPHINCS-256 practical stateless hash-based signature scheme
Go
25
star
9

onionwrap

Delicious Onion Service Wraps.
Go
23
star
10

libelligator

DEPRECATED: A C++ Elligator2 implementation
15
star
11

kyber

Mirror of my Go Kyber implementation.
Go
15
star
12

or-ctl-filter

"control-port-filter" without the bash
Go
15
star
13

ntru

NTRUEncrypt: im in ur quantum box, maybe
Go
13
star
14

x448

curve448 ECDH (Mirror)
Go
9
star
15

aez

Mirror of my Go AEZ implementation.
Go
8
star
16

tor-fw-helper

tor-fw-helper replacement (Development mirror)
Go
8
star
17

sshproxy

obfsproxyssh rewritten in Python using system ssh
Python
8
star
18

deskpi-ctl

DeskPi Pro Raspi 4 enclosure tools
Go
7
star
19

bsaes

Mirror of my constant time Go AES implementation.
Go
6
star
20

obfsproxyssh

obfsproxyssh: A SSH wire protocol Tor Pluggable Transport
C
6
star
21

liballium

A C Tor Pluggable Transports Utility Library
C
5
star
22

cryptopan

Go implementation of the Crypto-PAn algorithm
Go
4
star
23

aegis

AEGIS-128
Go
4
star
24

ricochet

Ricochet protocol implementation (Work in progress)
Go
3
star
25

poly1305

Golang poly1305-donna-32.
Go
3
star
26

morus

Mirror of my Go MORUS-1280-256 implementation.
Go
3
star
27

avl

Go AVL tree
Go
3
star
28

obfsproxy

obfsproxy, with experimental changes
Python
3
star
29

gibloc

G(olang l)ibloc ("gib location") (Mirror)
Go
1
star
30

bloom

Go
1
star
31

norx

Mirror of my Go NORX implementation.
Go
1
star
32

basmati

jasmin compiler in a container
Dockerfile
1
star
33

a2filter

Active-Active Bloom Filter
Go
1
star
34

or-applet

A Gtk+ Tor System Tray applet
Python
1
star
35

dynlib

Golang Linux dynamic library/linker utilities.
Go
1
star
36

musig2-voi

Go MuSig2 (w/secp256k1) (Mirror)
Go
1
star
37

edwards25519-extra

Go ed25519 extras (mirror)
Go
1
star
38

odin-wycheproof

Odin language cryptography tests
Odin
1
star
39

bs255

ristretto255 based Schnorr signatures (Mirror)
Go
1
star