Skip to content

docs: add dev docs on handshake and io#5596

Merged
boquan-fang merged 5 commits intoaws:mainfrom
lrstewart:devdocs
Nov 6, 2025
Merged

docs: add dev docs on handshake and io#5596
boquan-fang merged 5 commits intoaws:mainfrom
lrstewart:devdocs

Conversation

@lrstewart
Copy link
Copy Markdown
Contributor

@lrstewart lrstewart commented Oct 31, 2025

Release Summary:

Resolved issues:

Description of changes:

New s2n-tls developers tend to struggle the most with the handshake and send/receive logic. Those sections are extremely important to how s2n-tls operates, but also somewhat complex. This PR adds some documentation aimed at s2n-tls developers trying to understand those sections.

Testing:

Just documentation.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@github-actions github-actions bot added the s2n-core team label Oct 31, 2025
@lrstewart lrstewart marked this pull request as ready for review October 31, 2025 01:59
@boquan-fang
Copy link
Copy Markdown
Contributor

Sorry, Click on the wrong button. I didn't mean to approve this revision.


## Fragmentation

TLS records may only contain a limited amount of data. If an application wants to send a large amount of data, that data will be broken into "fragments" and each fragment will be sent in a separate record.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this is a very confusing way of introducing fragments. Like, why do both TLS records and TLS fragments have a max length of 2^14? It's because they're literally the same thing. Fragmentation is just what happens when a message is > 2^14 and you have to split it up across multiple records, or you've artificially set your "max record length" to be smaller than the spec for optimization reasons.

"The record layer fragments information blocks into TLSPlaintext
records carrying data in chunks of 2^14 bytes or less."

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't want to say words like TLSPlaintext here. But "record" refers to a fragment + header.

lrstewart and others added 2 commits October 31, 2025 15:08
Co-authored-by: Boquan Fang <boquanfang3@gmail.com>
Co-authored-by: maddeleine <59030281+maddeleine@users.noreply.github.com>
@boquan-fang boquan-fang self-assigned this Nov 5, 2025
@boquan-fang boquan-fang enabled auto-merge November 5, 2025 23:53
@boquan-fang boquan-fang disabled auto-merge November 5, 2025 23:55
@boquan-fang boquan-fang enabled auto-merge November 5, 2025 23:59
@boquan-fang boquan-fang added this pull request to the merge queue Nov 6, 2025
Merged via the queue into aws:main with commit ee6db23 Nov 6, 2025
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants