MCPcopy Index your code
hub / github.com/secdev/scapy / compute_sslv2_key_material

Method compute_sslv2_key_material

scapy/layers/tls/session.py:656–671  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

654 # Secrets management for SSLv2
655
656 def compute_sslv2_key_material(self):
657 if self.master_secret is None:
658 warning("Missing master_secret while computing key_material!")
659 if self.sslv2_challenge is None:
660 warning("Missing challenge while computing key_material!")
661 if self.sslv2_connection_id is None:
662 warning("Missing connection_id while computing key_material!")
663
664 km = self.pwcs.prf.derive_key_block(self.master_secret,
665 self.sslv2_challenge,
666 self.sslv2_connection_id,
667 2 * self.pwcs.cipher.key_len)
668 self.sslv2_key_material = km
669 if conf.debug_tls:
670 log_runtime.debug("TLS: master secret: %s", repr_hex(self.master_secret)) # noqa: E501
671 log_runtime.debug("TLS: key material: %s", repr_hex(km))
672
673 def compute_sslv2_km_and_derive_keys(self):
674 self.compute_sslv2_key_material()

Callers 1

Calls 4

warningFunction · 0.90
repr_hexFunction · 0.90
derive_key_blockMethod · 0.80
debugMethod · 0.80

Tested by

no test coverage detected