Skip to content

Add retained-key Hash.Real/Ideal presentations and one-query collision lifting #456

Done

Description

@MarcIlunga

Background

Commons.Definitions.Hash defines Hash.Real and Hash.Ideal as DSL programs that draw the hash key on the first query. Lifting collision resistance Hash.CR H ε to a derived construction G via a candidate-pair extractor extract : M' × M' → M × M requires moving the key draw to initialization and transporting both systems through a one-query routing converter.

Proposed change

Add src/Commons/Definitions/Hash/Keyed.lean (re-exported from src/Commons.lean):

  • Retained-key presentations Hash.Real.eq_sample and Hash.Ideal.eq_sample (via Hash.reply and TypedSystem.ofProbAutomaton_eq_keyed_of_optional_key).
  • Generic one-query extraction converter Hash.extractConverter with extractConverter_smul_ofFunction, extractConverter_smul_real, and extractConverter_smul_ideal.
  • Collision-lifting theorems Hash.CR.of_extractor and lossless Hash.CR.advantage_eq_of_extractor.

Advances #14, #413.

Acceptance criteria

  • Exercise domain extension by an injective map (Hash.CR.of_extractor and Hash.CR.advantage_eq_of_extractor) and audit axioms in src/Tests/HashExtractor.lean.
  • Pass lake build --wfail, scripts/check-sources.sh, scripts/check-axioms.sh, and Mathlib standard linters with zero warnings.

Activity

  1. added a commit that references this issue on Nov 24, 2026
    d5d779e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions