raptor codes

15
RAPTOR CODES José Lopes (please call me Sá) @zemanelsa

Upload: jose-lopes

Post on 30-Jun-2015

249 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Raptor codes

RAPTOR CODESJosé Lopes (please call me Sá)

@zemanelsa

Page 2: Raptor codes

About me• Braga

• MSc in Information Security (FCUL)• Researcher@LaSIGE

• Motorcycles

• MSc Thesis• RaptorQ implementation• Breaking & Securing RQ

Page 3: Raptor codes

What you should take from this talk?

Theory:• What are fountain codes?• What properties they have?• How can they be used?

You should think about:• Where can I use them?• How can my applications benefit from them?• New ideas that work with this mindset

Page 4: Raptor codes
Page 5: Raptor codes

FEC - Forward Error Correction• Used to recover from errors occurred during transmission• Sender encodes the message in a redundant way

• using an error-correcting code (ECC)

• Redundancy allows the receiver to detect errors• and often to correct these errors without retransmission

• Corrects errors without a reverse channel to request retransmission of data• but at the cost of a fixed, higher forward channel bandwidth

• Usually applied in situations where retransmissions are costly or impossible (e.g., multicast)

• Added to mass storage devices to enable recovery of corrupted data (e.g., RAID)

Page 6: Raptor codes

Erasure codes

• Error correcting code• Transforms a message of k symbols into a longer message with n symbols

• The original message can be recovered from a subset (k’) of the n symbols

• (Code rate) r = k/n proportion of the data-stream that is useful

• (Reception efficiency) k’/k

Page 7: Raptor codes

Fountain codes• Rateless erasure code• Endless supply of encoded symbols• Recover original data with any K encoded symbols (with

high probability)

DigitalK

Receiver(bucket)

Fountain

Page 8: Raptor codes

Use case: point-to-multipoint• For a large number of receivers TCP does not

scale• every receiver requires a separate data stream• sender needs to keep track of what arrives at each

receiver

• UDP can be used• scales effortlessly • best effort: loss rate ↑ degraded experience⇒

• Difficult to provide a scalable broadcast service on the Internet• it would be interesting to have reliability whilst

retaining UDP’s efficiency

S

R2

R1

R4 R3

Page 9: Raptor codes

LT code (the first fountain code!)

• Based on two random generators• One generates how many XORs should be made• The other generates (the IDs of) which symbols will be XORed

• 5%-10% extra symbols are usually needed

S : source symbol E : encoding symbol (+ is the XOR operation)

E0 = S2 + S4 + S5 E1 = S0 + S1 + S2 E2 = S0 + S3 E3 = S2

E4 = S0 + S5 E5 = S2 + S5 E6 = S1 + S3 + S4 + S5

S0 S5S4S3S2S1

E0 E1 E2 E3 E4 E5 E6

Page 10: Raptor codes

Raptor codes (finally!)

• Faster encoding/decoding algorithms• Pre-code• Steep overhead-failure probability curve

RaptorQ:• Systematic• Faster• Steeper

Page 11: Raptor codes

HOW CAN WE USE THIS!?!?

Data

Partition into Source Blocks

Source block i

RaptorQDecoder

Source block i

Data

Reconstruct the data

Put in packets &transmit through the network

Received Symbols ( ≥ K)

Some packets are lost in the network

RaptorQ Encoder

Source Symbols (K)

RepairGenerator

Repair Symbols (R)

Encoding Symbols

Can be used as overhead (extra symbols)

SENDER RECEIVER

Page 12: Raptor codes

How awesome is RaptorQ? Pretty awesome...

• Incredibly low probabilities of failure (for accidental faults)

K (number of source symbols)

0 Overhead [·10-3] 1 Overhead [·10-5] 2 Overhead [·10-7]

Loss 10 26 101 10 26 101 10 26 101

10% 0 5.4 5.7 0 0 3.8 0 0 2.5

20% 0 4.0 4.8 0 2.3 2.4 0 0 0.5

50% 0 3.9 4.9 0 1.6 2.5 0 0.9 1.2

60% 4.8 4.1 4.9 0 1.5 2.2 0 0 2.1

85% 0 12.7 4.7 0 0.8 2.4 0 0 1.3

Page 13: Raptor codes

Who’s using Raptor codes?

Page 14: Raptor codes

Where to now?

• José Lopes, “Communication with RaptorQ Erasure Codes in

Malicious Environments”, MSc thesis

• José Lopes and Nuno Neves, “Stopping a Rapid Tornado with a

Puff” (soon to be IEEE S&P)

• The OpenRQ Library (www.lasige.di.fc.ul.pt/openrq)

• Amin Shokrollahi, "Raptor codes”, IEEE Transactions on

Information Theory 52.6 (2006): 2551-2567.

• Amin Shokrollahi and Michael Luby, “Raptor Codes” Now

Publishers Inc 2011

• IETF RFC6330

Page 15: Raptor codes

RAPTOR CODESJosé Lopes (please call me Sá)

@zemanelsa

Thank you! Any questions?