Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save D-Nice/092e3f1e5f08b1acccf8aee20b006ed1 to your computer and use it in GitHub Desktop.
Save D-Nice/092e3f1e5f08b1acccf8aee20b006ed1 to your computer and use it in GitHub Desktop.
TLSNotary notarization file format

Data format: binary. Default file extension: '.tlsn'

Contents

Field description (size in bytes) code in Python version
Header (29) 'tlsnotary notarization file\n\n'
File Version (2) '\x00\x01' version 0.1
Chosen cipher suite (2) shared.bi2ba(tlsn_session.chosen_cipher_suite,fixed=2)
Client random (32) tlsn_session.client_random
Server random (32) tlsn_session.server_random
Premaster secret 1st half (24) tlsn_session.pms1
Premaster secret 2nd half (24) tlsn_session.pms2
Audited site server cert length (3)
Audited site server cert (var)
Audit TLS version used (2) tlsn_session.tlsver
Audit TLS version initially requested (2) tlsn_session.initial_tlsver
Server response length (8) shared.bi2ba(len(response),fixed=8)
Encrypted server response (var) response
IV after finished length (2) len(IV)
IV after finished ([16|258]) IV
Notary signature length (2) len(signature)
Notary signature ([2048|4096..]) signature
Commit sha256 hash (32) commit_hash
Notary pubkey (same as Notary signature) (N as bytearray)
OPTIONAL decrypted server response (to EOF)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment