Sunteți pe pagina 1din 20

 Ethernet is a standard communication protocol embedded in

software and hardware devices

 It is used for building a local area network

 The local area network is a computer network that interconnects a


group of computers

 And it shares the information through cables or wires

 Each station on an ethernet network has its own network interface


card(NIC)

 Ethernet is based on the method of Carrier Sense Multiple Access


with Collision Detection (CSMA/CD) algorithm
 Ethernet uses the Carrier Sense Multiple Access with Collision
Detection algorithm

 A network station wishing to transmit will first check the cables to


ensure that no other station is currently transmitting (CARRIER SENSE)

 The communications medium is one cable, it does allow multiple


stations access to it with all being able to transmit and receive on the
same cable (MULTIPLE ACCESS)

 Two or more stations transmitting causes a collision (COLLISION


DETECTION)

 A jam signal is transmitted to network by the transmitting stations


that detected the collision, to ensure that all stations know of the
collision. All stations will "backoff" for a random time
 Detection and retransmission is accomplished in microseconds
 Preamble:
- The preamble consists of a 56-bit (seven-byte) pattern of
alternating 1 and 0 bits
- Allowing devices on the network to synchronize easily their
receiver clocks
- Provides bit-level synchronization

 SFD(Start of Frame Delimiter):


- The SFD is the eight-bit (one-byte) value that marks the
end of the preamble, which is the first field of an Ethernet packet
- Indicates the beginning of the Ethernet frame
- SFD is the binary sequence 10101011
 Destination Address:
- Destination address consists of 6-bytes(48-bits)
- The first bit of the destination address indicates if the
address is unicast or a multicast address
- If a 48-bit address of all 1’s will indicate a broadcast
address

 Source Address:
- Source address consists of 6-bytes(48-bits)
- It contains the physical address of the sender of the packet

 TYPE/LENGTH:
- Length is a 2-Byte field, which indicates the length of
entire Ethernet frame
- This 16-bit field can hold the length value between 0 to
65534
- Values of 1500 and below mean that it is used to indicate
the size of the payload in bytes
- But length cannot be larger than 1500 because of some
own limitations of Ethernet

 Data:
- This is the place where actual data is inserted, also known
as Payload
- Both IP header and data will be inserted here if Internet
Protocol is used over Ethernet
- The minimum data length can be of 46-bytes and
maximum of 1500-bytes
- In case data length is less than 46-bytes then 0’s padding
is added to meet the minimum length
 FCS:
- FCS is 4 Byte field. This field contains a 32-bits hash code
of data, which is generated over the Destination Address, Source
Address, Length, and Data field
- If the sum computed by destination is not the same as
sent sum value, data received is corrupted

 Size of frame of Ethernet varies 64 bytes to 1518 bytes including data


length (46 to 1500 bytes)

 Interpacket Gap:
- Is idle time between packets. After a packet has been
sent, transmitters needs to transmit a minimum of 96 bits of idle line
state before transmitting the next packet
 It is used for building a LAN.

 The LAN is a computer network that interconnects a group of


computers and shares the information through cables or wires.

 The basic idea of its design is that multiple computers have access to
it and can send data at any time

 Ethernet provides a fast, efficient, and direct connection to a router


Crytography

 The study of techniques for secure communication in the presence of


third parties

 Cryptography enables us to store sensitive information or transmit it


across insecure networks so that it cannot be read by anyone except
the intended recipient

Asymmetric –key cryptography


 Encryption and decryption are carried out using two different keys.

Symmetric –key cryptography


 Uses same secret key for Encryption and decryption

Key: A key is a complex value that is determined using an algorthim


RSA algorithm (Rivest-Shamir-Adleman)

 RSA was first publicly described in 1977 by Ron Rivest, Adi Shamir
and Leonard Adleman

 In RSA cryptography, both the public and the private keys can encrypt
a message; the opposite key from the one used to encrypt a message
is used to decrypt it.

 The public key can be shared with everyone, whereas the private
key must be kept secret.
Plaintext: the original message
Cipher text: the transformed message
Encryption: The process of converting plaintext to cipher text
Decryption: The process of converting cipher text back into plaintext

Encrypting message
 Alice gives her public key (n & e) to Bob and keeps her private key secret.
Bob wants to send message Hello to Alice.
 First he turns Hello into a number m smaller than n.

 He then computes the ciphertext c corresponding to c=m^e mod n .

 Bob then sends c to Alice.

Decrypting message
 Alice can recover m from c by using her private key d by m= c^d mod n
The keys for the RSA algorithm are generated the following way:
 Choose two different large random prime numbers p and q

 Calculate n= pq

 N is the modulus for the public key and the private keys

 Calculate the totient Φ (n)=(p-1)(q-1)

 Choose an integer e such that 1 < e< Φ(n) and e is co-prime


to Φ(n)
i.e: e and Φ(n) share no factors other than 1; gcd( e, Φ(n)) = 1
 e is released as the public key exponent

 Compute d to satisfy the congruence relation de ≡ 1 (mod Φ(n))

i.e: de=1+x Φ(n) for some integer x.


 Simply Calculate by d=(1+x Φ(n))/e to be integer

 d is kept as the private key exponent


Example 1

 Choose two random prime numbers p=11 and q=13


 Compute n=pq
 n=11*13=143
 Compute the totient Φ (n)=(p-1)(q-1)
 Φ (n)=(11-1)(13-1)=120
 Choose e>1 coprime to 120
 e=7
 Choose d to satisfy de mod Φ (n) ≡ 1 => d=(1+x Φ(n))/e
 d=103
 The public key is (n=143 ,e=7) For a padded message m the
encryption function c=m^e mod n becomes c=m^7 mod 143
 The private key is (n=143 ,d=103) The decryption function m=c^d
mod n becomes m=c^103 mod 143
Let say,
 to encrypt m=9, we calculate c=9^7 mod 143=48
 To decrypt c=48, we calculate m=48^103 mod 143=9
THANK YOU

S-ar putea să vă placă și