Advertisement · 728 × 90

Posts by Aavtic

coding broler at night

coding broler at night

Just me, some quiet hours, and a bit of Broler magic. 🌙
github.com/aavtic/broler

8 months ago 2 0 0 0

Check my personal portfolio website!

aavtic.dev

11 months ago 0 0 0 0

I have created a personal website for my portfolio and more.

It's cool. Check it out at aavtic.dev

11 months ago 0 0 0 0

keybinding up on bluesky! :happy

1 year ago 0 0 0 0

infamous nob.h?

1 year ago 1 0 0 0

True!

1 year ago 0 0 0 0
Post image

#kawai :D

1 year ago 13 4 0 0

COAPI is public!

github.com/aavitc/coapi...

1 year ago 1 0 0 0

GUESS THE ALGORITHM
Hint: Secret Key Exchange

p, g

p = 10
g = 5

A
a = 4
A = g^a mod p
A = 5

B
b = 8
B = g^b mod p
B = 5

A -> B: A
B -> A: B

A
s = B ^ a mod p
s = 5

B
s = A ^ b mod p
s = 5

1 year ago 1 0 0 0

But what if the sender sends invalid Sequence Number or Acknowledgement number which is not expected?

Here the receiver knows data was not successfully sent and will re-transmit the data to correct the sequence number and acknowledgement numbers.

1 year ago 0 0 0 0
Advertisement

Here the seq number will be the same as the ack number of the sender's packet

but the ack number will be set to the sum of previous seq number and the length of the TCP packet frame.

This proves the sender that all the data was received by the receiver.

1 year ago 0 0 1 0

Receiver's ACK packet

Receier [ACK]:
Sequence Number: 2001
Acknowledgement Number: 1031 (Previous Sequence number + Length of data in TCP Frame)

1 year ago 0 0 1 0

The seq number and ack number are the same as the last ACK/packet. But how can receiver confirm data is received completely?

Here is where things get interesting.
Following the PSH, ACK packet the receiver will respond with the ACK packet

1 year ago 0 0 1 0


Here the sender will send a PSH, ACK packet. The PSH Flag is 'PUSH' for Informing the receiver that data is being send and the ACK is to let the receiver know to acknowledge when the data is received

1 year ago 0 0 1 0

Here is where things get interesting. The receiver should let the sender know all the data was received by the receiver

1 year ago 0 0 1 0

Let's send some data on the wire

Sequence Numbers and Acknowledgement numbers in Data Flow in TCP

`Right after the 3 way handshake:`
Sender [PSH, ACK]:
Sequence number: 1001
Acknowledgement number: 2001 (Receivers Sequence number + 1)
Data Length: 30 bytes

Let's break down this packet

1 year ago 0 0 1 0

Here we can see both parties are simultaneously acknowledging and confirming both sequence and acknowledgement numbers.
Let's see how this works after the connection is established.

Here things get interesting and shows why TCP is a "Reliable" protocol for data transfer.

1 year ago 0 0 1 0
Advertisement

To this the sender sends an ACK message which finishes the 3 way handshake and establishes the connection between both parties.

Sender [ACK]:
Sequence number: 1001
Acknowledgement number: 2001 (Receivers Sequence number + 1)

1 year ago 0 0 1 0

Then the receiver responds with a SYN, ACK packet to the sender as follows

Receiver [SYN, ACK]:
Sequence number(randomly generated): 2000
Acknowledgement number: 1001 (Senders Sequence number + 1)

1 year ago 0 0 1 0

First the sender sends SYN to the server with:

Sender [SYN]:
Sequence number(randomly generated): 1000
Acknowledgement number: 0

The sequence number is randomly generated and the acknowledgement number is set to 0 initially

1 year ago 0 0 1 0

Firstly the Exchange of Sequence numbers and Acknowledgement numbers in the 3 way TCP Handshake.
Here is how It is done.

1 year ago 0 0 1 0

Here is my understanding about TCP Sequence Number and Acknowledgement Numbers:

You'll learn about TCP (Transmission Control Protocol) 3 way handshake and how the sequence number and Acknowledgement numbers play important role in making TCP a Reliable protocol.

1 year ago 1 0 1 0

Feeling good about Rust Generics while learning about Java Generics in College

1 year ago 0 0 0 0

Exactly

1 year ago 1 0 0 0

Edging to the urge to learn new things during exam period is crazy!

1 year ago 0 0 0 0

I will make COAPI public mostly by new-year :sappy

1 year ago 0 0 0 0

I am making COAPI-rs private for some weeks due to some personal reasons...
in-case anyone need any details about this project. Please DM me

1 year ago 0 0 0 1
Advertisement

Be natural

1 year ago 0 0 0 0

Survive by cloning yourself

1 year ago 2 0 0 0

OMG!
Awesome work!

1 year ago 1 0 0 0