+ All Categories
Home > Documents > ECE 4331, Fall, 2009 Zhu Han Department of Electrical and Computer Engineering Class 21 Nov.5 th,...

ECE 4331, Fall, 2009 Zhu Han Department of Electrical and Computer Engineering Class 21 Nov.5 th,...

Date post: 13-Dec-2015
Category:
Upload: ross-hodges
View: 214 times
Download: 0 times
Share this document with a friend
38
ECE 4331, Fall, 2009 Zhu Han Department of Electrical and Computer Engineering Class 21 Nov.5 th , 2009
Transcript

ECE 4331, Fall, 2009

Zhu Han

Department of Electrical and Computer Engineering

Class 21

Nov.5th, 2009

                                                           

                                                           

EncryptionEncryption

Encryption is a translation of data into a secret code. Encryption is the most effective way to achieve data

security. To read an encrypted file, you must have access to a

secret key that enables you to decrypt it. Unencrypted data is called plain text; encrypted data

is referred to as cipher (text). Encryption can be used to ensure secrecy, but other

techniques are still needed to make communications secure: authentication, authorization, and message integrity.

                                                           

EncryptionEncryption

Message integrity - both parties will always wish to be confident that a message has not been altered during transmission. The encryption makes it difficult for a third party to read a message, but that third party may still be able to alter it in a useful way.

Authentication is a way to ensure users are who they say they are - that the user who attempts to perform functions in a system is in fact the user who is authorized to do so.

Authorization protects computer resources (data, files, programs, devices) by allowing those resources to be used by resource consumers having been granted authority to use them. Digital rights management etc.

                                                           

Encryption – cipher taxonomyEncryption – cipher taxonomy

CIPHERS

MODERNCIPHERS

CLASSICALCIPHERS

PUBLIC KEY

PRIVATE KEY

SUPERPOSITION

TRANSPOSITION

ROTORMACHINES

QuantumCIPHERS

Wireless PhysicalLayer Security

                                                           

Transposition MethodTransposition Method

Da Vinci’s code

Ex.

I am a student

I m s u e t

a a t d n

                                                           

Substitution MethodSubstitution Method

Shift Cipher (Caesar’s Cipher)

I CAME I SAW I CONQUERED

H BZLD H TZV H BNMPTDSDC

Julius Caesar to communicate with his army

Language, wind talker

                                                           

Rotor MachineRotor Machine The primary component is a set of rotors, also termed wheels or drums,

which are rotating disks with an array of electrical contacts on either side. The wiring between the contacts implements a fixed substitution of letters, scrambling them in some complex fashion. On its own, this would offer little security; however, after encrypting each letter, the rotors advance positions, changing the substitution. By this means, a rotor machine produces a complex polyalphabetic substitution cipher.

German Enigma machine used

during World War II for submarine.

Movie U571, Italian Job

                                                           

KeyKey

                                                           

Public Key System - RSAPublic Key System - RSA

Named after its inventors Ron Rivest, Adi Shamir and Len Adleman

Base on Number Theory

y=ex (mod N) => x=??

If the size of N is 100, it takes 100 billion years to decipher with 1GHz computer.

Applications– Digital Signatures

– Digital Cash: Movie, swordfish

– Timestamping Services: Movie, entrapment

– Election

Movie, mercury rising

                                                           

Encryption – cipher taxonomyEncryption – cipher taxonomy

Historical pen and paper ciphers used in the past are sometimes known as classical ciphers. They include substitution ciphers and transposition ciphers.

During the early 20th century, more sophisticated machines for encryption were used, rotor machines, which were more complex than previous schemes.

Encryption methods can be divided into symmetric key algorithms and asymmetric key algorithms. In a symmetric key algorithm (DES, AES), the sender and receiver must have a shared key set up in advance and kept secret from all other parties; the sender uses this key for encryption, and the receiver uses the same key for decryption.

In an asymmetric key algorithm (RSA), there are two separate keys: a public key is published and enables any sender to perform encryption, while a private key is kept secret by the receiver and enables him to perform decryption.

                                                           

Wireless Physical Layer Security Wireless Physical Layer Security

Achieve zero information for the eavesdropper– Source transmits data rate of max(C1-C2,0) – The eavesdropper can decode zero information about the source.– Limit due to the locations of source, destination and relay– Can cooperation help to improve

S D

E

C1

C2

                                                           

Quantum CryptographyQuantum Cryptography

Use physics law, if the signal is measured (eavesdropped), the receiver can always detected.

                                                           

Mission is really impossibleMission is really impossible

When you see it, the information has been already changed

                                                           

Automatic Repeat-reQuest (ARQ)Automatic Repeat-reQuest (ARQ)

Alice and Bob on their cell phones– Both Alice and Bob are talking

What if Alice couldn’t understand Bob?– Bob asks Alice to repeat what she said

What if Bob hasn’t heard Alice for a while?– Is Alice just being quiet?

– Or, have Bob and Alice lost reception?

– How long should Bob just keep on talking?

– Maybe Alice should periodically say “uh huh”

– … or Bob should ask “Can you hear me now?”

                                                           

ARQARQ Acknowledgments from receiver

– Positive: “okay” or “ACK”

– Negative: “please repeat that” or “NACK”

Timeout by the sender (“stop and wait”)– Don’t wait indefinitely without receiving some response

– … whether a positive or a negative acknowledgment

Retransmission by the sender– After receiving a “NACK” from the receiver

– After receiving no feedback from the receiver

                                                           

Error Correcting CodesError Correcting Codes

Adding redundancy to the original message To detect and correct errors Crucial when it’s impossible to resend the message

(interplanetary communications, storage..) and when the channel is very noisy (wireless communication)Information

Source

Message

Transmitter

Noise Source

Destination

Message

Reciever

ReceivedSignal

Signal

Message = [1 1 1 1]

Noise = [0 0 1 0]

Message = [1 1 0 1]

                                                           

Types of Error Correcting CodesTypes of Error Correcting Codes Repetition Code

Linear Block Code, e.g. Hamming

Cyclic Code, e.g. CRC

BCH and RS Code

Convolutional Code– Tradition, Viterbi Decoding

– Turbo Code

– LDPC Code

Coded Modulation– TCM

– BICM

                                                           

Repetition CodeRepetition Code

Simple Example: reduce the capacity by 3Simple Example: reduce the capacity by 3

Recovered state

                                                           

Parity CheckParity Check Add one bit so that xor of all bit is zero

– Send, correction, miss

– Add vertically or horizontally

Applications: ASCII, Serial port transmission

                                                           

ISDN NumberISDN Number ISBN 10

– a modulus 11 with weights 10 to 2, using X instead of 10 where ten would occur as a check digit

– ISBN 0-306-40615-2

ISBN 13– Calculating an ISBN 13 check digit requires

that each of the first twelve digits of the 13-digit ISBN be multiplied alternately by 1 or 3. Next, take the sum modulo 10 of these products. This result is subtracted from 10.

– ISBN 978-0-306-40615-7.

                                                           

Hammings SolutionHammings Solution

A type of Linear Block Code

Encoding: H(7,4)

Multiple ChecksumsMessage=[a b c d]

r= (a+b+d) mod 2s= (a+b+c) mod 2t= (b+c+d) mod 2

Code=[r s a t b c d]

Coding rate: 4/7– Smaller, more redundancy, the better protection.

– Difference between detection and correction

Message=[1 0 1 0] r=(1+0+0) mod 2 =1

s=(1+0+1) mod 2 =0

t=(0+1+0) mod 2 =1

Code=[ 1 0 1 1 0 1 0 ]

                                                           

Error Detection AbilityError Detection Ability

100,000 iterationsAdd Errors to (7,4) dataNo repeat randomsMeasure Error Detection

Error Detection•One Error: 100%•Two Errors: 100% •Three Errors: 83.43%•Four Errors: 79.76%

Stochastic Simulation:

Results:

Fig 1: Error Detection

50%

60%

70%

80%

90%

100%

1 2 3 4Errors Introduced

Per

cen

t E

rro

rs D

etec

ted

(%

)

                                                           

How it works: 3 dotsHow it works: 3 dots

Only 3 possible words

Distance Increment = 1

One Excluded State (red)

It is really a checksum.

Single Error Detection

No error correction

A B C

A B C

A C

Two valid code words (blue)

This is a graphic representation of the “Hamming Distance”

                                                           

Hamming DistanceHamming Distance

Definition: – The number of elements that need to be changed (corrupted) to turn one

codeword into another.

The hamming distance from:– [0101] to [0110] is 2 bits

– [1011101] to [1001001] is 2 bits

– “butter” to “ladder” is 4 characters

– “roses” to “toned” is 3 characters

                                                           

Another DotAnother Dot

The code space is now 4.

The hamming distance is still 1.

Allows:

Error DETECTION for Hamming Distance = 1.

Error CORRECTION for Hamming Distance =1

For Hamming distances greater than 1 an error gives a false correction.

                                                           

Even More DotsEven More Dots

Allows:Error DETECTION for Hamming Distance = 2.

Error CORRECTION for Hamming Distance =1.

• For Hamming distances greater than 2 an error gives a false correction.

• For Hamming distance of 2 there is an error detected, but it can not be corrected.

                                                           

Multi-dimensional CodesMulti-dimensional Codes

Code Space:

• 2-dimensional

• 5 element states

Circle packing makes more efficient use of the code-space

                                                           

Cannon BallsCannon Balls

http://wikisource.org/wiki/Cannonball_stacking

http://mathworld.wolfram.com/SpherePacking.html

Efficient Circle packing is the same as efficient 2-d code spacing

Efficient Sphere packing is the same as efficient 3-d code spacing

Efficient n-dimensional sphere packing is the same as n-code spacing

                                                           

ExampleExample Visualization of eight code words in a 6-typle space

                                                           

Another Example: EncodingAnother Example: Encoding

we multiply this matrix

1111000

0110100

1010010

1100001

H

But why?

You can verify that:

To encode our message

By our message

message code H

Hamming[1 0 0 0]=[1 0 0 0 0 1 1]Hamming[0 1 0 0]=[0 1 0 0 1 0 1]Hamming[0 0 1 0]=[0 0 1 0 1 1 0]Hamming[0 0 0 1]=[0 0 0 1 1 1 1]

Where multiplication is the logical ANDAnd addition is the logical XOR

                                                           

Example: Add noiseExample: Add noise If our message is

Message = [0 1 1 0] Our Multiplying yields

Code = [0 1 1 0 0 1 1]

Lets add an error,

so Pick a digit to mutate

1100110

0110100

1010010

11110000

01101001

10100101

11000010

0110

1111000

0110100

1010010

1100001

Code => [0 1 0 0 0 1 1]

                                                           

Example: Testing the messageExample: Testing the message

We receive the erroneous string:

Code = [0 1 0 0 0 1 1]

We test it:

Decoder*CodeT

=[0 1 1]

And indeed it has an error

The matrix used to decode is:

To test if a code is valid:

Does Decoder*CodeT

=[0 0 0]– Yes means its valid

– No means it has error/s

1010101

1100110

1111000

Decoder

                                                           

Example: Repairing the messageExample: Repairing the message

To repair the code we find the collumn in the decoder matrix whose elements are the row results of the test vector

We then change

We trim our received code by 3 elements and we have our original message.

[0 1 1 0 0 1 1] => [0 1 1 0]

Decoder*codeT is

[ 0 1 1]

This is the third element of our code

Our repaired code is

[0 1 1 0 0 1 1]

1010101

1100110

1111000

Decoder

                                                           

Coding Gain

Coding Rate R=k/n, k, no. of message symbol, n overall symbol

Word SNR and bit SNR

For a coding scheme, the coding gain at a given bit error probability is defined as the difference between the energy per information bit required by the coding scheme to achieve the given bit error probability and that by uncoded transmission.

                                                           

Coding Gain ExampleCoding Gain Example

                                                           

Encoder/Decoder of Linear CodeEncoder/Decoder of Linear Code Encoder: just xor gates

Decoder: Syndrome

                                                           

Interleaving Interleaving

Arrange data in a non-contiguous way in order to increase performance

Interleaving is mainly used in data communication, multimedia file formats, radio transmission (for example in satellites) or by ADSL

Protect the transmission against burst errors

Example– Without interleaving

– With interleaving

                                                           

ARQ, FEC, HECARQ, FEC, HEC

ARQ

Forward Error Correction (error correct coding)

Hybrid Error Correction

tx rxError detection code

ACK/NACK

tx rxError correction code

tx rx

Error detection/Correction code

ACK/NACK


Recommended