Skip to content
Snippets Groups Projects
Commit 76c46de2 authored by Karl Fogel's avatar Karl Fogel
Browse files

Get session hash pad input bytes after format seen

The use of some raw pad bytes as part of the input to the session hash
is a feature of internal format 0, and therefore those bytes must be
taken only after format indicator has been handled.  This follows up
to commit 6774b320 to fix that.

* onetime:
  (Design Overview): Update where the session hash input bytes live.
  (PadSession._digest_source_length): This is just a length, so don't
    try to document where the initialization bytes are located.
  (PadSession._session_hash): Update documentation here too.
  (PadSession.prepare_for_encryption): Don't initialize hash here, and...
  (PadSession.prepare_for_decryption): ...update related comment here.
  (PadSession.convert): Don't initialize hash here either.
  (PadSession._make_inner_header, PadSession._handle_inner_header):
    Initialize session hash right after the fuzz source length bytes.

* check.sh: Update accordingly.
parent ed6f1713
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment