scapy.layers.tls.keyexchange_tls13

TLS 1.3密钥交换逻辑.

class scapy.layers.tls.keyexchange_tls13.KeyShareEntry(*args, **kargs)

Bases: scapy.packet.Packet

从头开始构建时,我们创建DH私钥,而在解剖时,我们创建DH公钥. 默认组是secp256r1.

aliastypes
create_privkey(**kwargs)
do_build()

我们需要这种技巧,否则" self"将被__iter __.next()代替.

extract_padding(s)
fields_desc
KeyShareEntry字段

group

ShortEnumField

None

kxlen

FieldLenField

None

key_exchange

StrLenField

b''

post_build(pkt, pay)
post_dissection(r)
privkey
pubkey
register_pubkey(**kwargs)
class scapy.layers.tls.keyexchange_tls13.PSKBinderEntry

Bases: scapy.packet.Packet

aliastypes
fields_desc
PSKBinderEntry字段

binder_len

FieldLenField

None

binder

StrLenField

b''

class scapy.layers.tls.keyexchange_tls13.PSKIdentity

Bases: scapy.packet.Packet

aliastypes
fields_desc
PSKI身份字段

identity_len

FieldLenField

None

identity

TicketField

b''

obfuscated_ticket_age

IntField

0

class scapy.layers.tls.keyexchange_tls13.TLS_Ext_KeyShare_CH(_pkt='', post_transform=None, _internal=0, _underlayer=None, tls_session=None, **fields)

Bases: scapy.layers.tls.extensions.TLS_Ext_Unknown

aliastypes
fields_desc
TLS_Ext_KeyShare_CH字段

type

ShortEnumField

51

len

ShortField

None

client_shares_len

FieldLenField

None

client_shares

PacketListField

[]

post_build(pkt, pay)
post_dissection(r)
class scapy.layers.tls.keyexchange_tls13.TLS_Ext_KeyShare_HRR(_pkt='', post_transform=None, _internal=0, _underlayer=None, tls_session=None, **fields)

Bases: scapy.layers.tls.extensions.TLS_Ext_Unknown

aliastypes
fields_desc
TLS_Ext_KeyShare_HRR字段

type

ShortEnumField

51

len

ShortField

None

selected_group

ShortEnumField

None

class scapy.layers.tls.keyexchange_tls13.TLS_Ext_KeyShare_SH(_pkt='', post_transform=None, _internal=0, _underlayer=None, tls_session=None, **fields)

Bases: scapy.layers.tls.extensions.TLS_Ext_Unknown

aliastypes
fields_desc
TLS_Ext_KeyShare_SH字段

type

ShortEnumField

51

len

ShortField

None

server_share

PacketField

None

post_build(pkt, pay)
post_dissection(r)
class scapy.layers.tls.keyexchange_tls13.TLS_Ext_PreSharedKey_CH(_pkt='', post_transform=None, _internal=0, _underlayer=None, tls_session=None, **fields)

Bases: scapy.layers.tls.extensions.TLS_Ext_Unknown

aliastypes
fields_desc
TLS_Ext_PreSharedKey_CH字段

type

ShortEnumField

41

len

ShortField

None

identities_len

FieldLenField

None

identities

PacketListField

[]

binders_len

FieldLenField

None

binders

PacketListField

[]

class scapy.layers.tls.keyexchange_tls13.TLS_Ext_PreSharedKey_SH(_pkt='', post_transform=None, _internal=0, _underlayer=None, tls_session=None, **fields)

Bases: scapy.layers.tls.extensions.TLS_Ext_Unknown

aliastypes
fields_desc
TLS_Ext_PreSharedKey_SH字段

type

ShortEnumField

41

len

ShortField

None

selected_identity

ShortField

None

class scapy.layers.tls.keyexchange_tls13.Ticket

Bases: scapy.packet.Packet

aliastypes
fields_desc
票务字段

key_name

StrFixedLenField

None

iv

StrFixedLenField

None

encstatelen

FieldLenField

None

encstate

StrLenField

b''

mac

StrFixedLenField

None

class scapy.layers.tls.keyexchange_tls13.TicketField(name, default, length_from=None, **kargs)

Bases: scapy.fields.PacketField

length_from
m2i(pkt, m)