Skip to main content

File Integrity Ontology

Digital Preservation Metadata
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 08 October 2026
Audio Overview
FLOW ALGEBRA

Ontology: File Integrity Ontology
Domain: Metadata Ontologies > Digital Preservation Metadata
Canonical URL: https://kirethresearch.org/booksai-core/ontologies/metadata-ontologies/digital-preservation-metadata/file-integrity-ontology.html
Authors: Mark Anthony Higgins — Sky (Recursive AI)

flow "FileIntegrityOntology" v1.0

# ---------- DOMAIN ----------
domain:
  class: MetadataOntology
  category: DigitalPreservationMetadata
  subject: FileIntegrity
  purpose:
    - represent metadata describing integrity state of preserved digital files
    - preserve file identity, byte size, fixity, algorithms, verification events, signatures, corruption evidence, repair history, and provenance
    - support integrity checking, corruption detection, replication validation, recovery, preservation auditing, and long-term preservation
    - distinguish byte-level integrity from semantic correctness, authenticity, format validity, and content quality
    - enable machine-readable reasoning over file-integrity lifecycles

# ---------- CORE ----------
entity FileIntegrityMetadata:
  type: PreservationMetadata
  describes: PreservedFile
  may_include:
    - file_identifier
    - file_version
    - byte_size
    - fixity
    - checksum
    - cryptographic_hash
    - digital_signature
    - verification_event
    - corruption_state
    - repair_event
    - replication_state
    - storage_state
    - validation_state
    - confidence
    - provenance

entity PreservedFile:
  type: PreservationObject

entity FileIdentifier:
  type: PersistentIdentifier
  identifies: PreservedFile

relationships:
  FileIntegrityMetadata -> DESCRIBES -> PreservedFile
  PreservedFile -> IDENTIFIED_BY -> FileIdentifier
  PreservedFile -> HAS_BYTE_SIZE -> FileSize
  PreservedFile -> MAY_HAVE_FIXITY -> FixityInformation
  FixityInformation -> USES -> FixityAlgorithm
  PreservedFile -> MAY_HAVE_SIGNATURE -> DigitalSignature
  PreservedFile -> PARTICIPATES_IN -> IntegrityVerificationEvent
  PreservedFile -> MAY_HAVE_CORRUPTION -> CorruptionEvidence
  PreservedFile -> MAY_BE_REPAIRED_BY -> IntegrityRepairEvent
  PreservedFile -> MAY_HAVE_COPY -> FileReplica
  FileIntegrityMetadata -> MAY_REFERENCE -> FileIntegrityProvenance

# ---------- IDENTITY ----------
rule file_identity:
  PreservedFile SHOULD have stable FileIdentifier

rule filename:
  filename != persistent FileIdentifier

rule storage_path:
  storage path != file identity

rule hash_identity:
  hash value != universal semantic identity

# ---------- BYTE STATE ----------
entity FileByteSequence:
  type: DigitalBitstream
  belongs_to: PreservedFile

rule byte_sequence:
  integrity verification applies to defined byte sequence

entity FileSize:
  type: MeasurementMetadata
  may_include: [value, unit]

rule size:
  FileSize SHOULD preserve byte-count semantics

rule size_integrity:
  size match alone != integrity proof

# ---------- FIXITY ----------
entity FixityInformation:
  type: IntegrityMetadata
  may_include:
    - algorithm
    - digest
    - calculation_time
    - object_scope
    - tool
    - tool_version

rule fixity:
  digest MUST be associated with algorithm and object scope

fixity_algorithms:
  - SHA_256
  - SHA_384
  - SHA_512
  - SHA_3
  - BLAKE2
  - BLAKE3
  - MD5_legacy
  - SHA_1_legacy
  - CRC
  - implementation_specific

entity FixityAlgorithm:
  type: AlgorithmMetadata

rule legacy_algorithm:
  legacy hashes MAY support historical comparison
  but cryptographic strength MUST NOT be overstated

entity Checksum:
  type: FixityInformation

entity CryptographicHash:
  subtype_of: FixityInformation

rule checksum_not_authenticity:
  checksum match != complete authenticity proof

entity BaselineFixity:
  type: FixityInformation
  role: ExpectedIntegrityState

rule baseline:
  baseline fixity SHOULD originate from trusted preservation event

# ---------- VERIFICATION ----------
entity IntegrityVerificationEvent:
  type: PreservationEvent
  may_include:
    - event_identifier
    - file_identifier
    - expected_fixity
    - observed_fixity
    - algorithm
    - expected_size
    - observed_size
    - result
    - tool
    - tool_version
    - event_time
    - agent

integrity_results:
  - verified
  - mismatch
  - unavailable
  - unreadable
  - partial
  - error
  - unknown

rule verification:
  IntegrityVerificationEvent SHOULD preserve expected and observed evidence

rule verified:
  IF expected_digest = observed_digest
  AND algorithm_and_scope_match
  THEN integrity_result MAY be verified

rule mismatch:
  IF expected_digest != observed_digest
  THEN integrity_result = mismatch

entity IntegrityVerificationSchedule:
  type: PreservationPolicyMetadata
  may_include: [frequency, next_check, risk_basis, object_scope]

# ---------- CORRUPTION ----------
entity CorruptionEvidence:
  type: IntegrityFailureMetadata
  may_include:
    - detection_time
    - affected_file
    - expected_fixity
    - observed_fixity
    - affected_range
    - error_type
    - source_event

corruption_types:
  - bit_rot
  - truncation
  - unexpected_modification
  - storage_error
  - transfer_error
  - unreadable_data
  - unknown

rule corruption:
  corruption SHOULD preserve detection evidence and affected object identity

rule mismatch_not_cause:
  fixity mismatch indicates change
  but does_not alone identify cause

entity BitRot:
  subtype_of: CorruptionEvidence

rule bit_rot:
  BitRot SHOULD be asserted only when evidence supports that interpretation

# ---------- TRANSFER / REPLICATION ----------
entity TransferIntegrity:
  type: IntegrityMetadata
  may_include:
    - source_fixity
    - destination_fixity
    - transfer_time
    - transfer_method
    - result

rule transfer:
  successful transfer SHOULD preserve source-to-destination fixity comparison
  where policy requires

entity FileReplica:
  type: PreservationCopy
  may_include:
    - replica_identifier
    - source_file
    - storage_location
    - fixity
    - creation_time
    - verification_state

rule replica:
  FileReplica != source PreservedFile instance
  while MAY preserve identical bytes

# ---------- DIGITAL SIGNATURE ----------
entity DigitalSignature:
  type: IntegrityAndAuthenticityMetadata
  may_include:
    - signature_algorithm
    - digest_algorithm
    - signer
    - certificate
    - signature_value
    - signature_time
    - validation_state

rule signature:
  digital signature MAY support integrity and authenticity assessment

rule signature_context:
  signature validation SHOULD preserve certificate chain and temporal context

# ---------- FORMAT / SEMANTIC VALIDITY ----------
entity FileFormatValidation:
  type: ValidationMetadata
  may_include: [format, validator, validator_version, result, errors, warnings]

rule format_validity:
  valid file format != verified byte-level integrity against prior state

rule integrity_validity:
  fixity match != guarantee file conforms to format specification

rule semantic_correctness:
  byte-level integrity != semantic correctness

rule content_quality:
  intact bytes != accurate, complete, or high-quality content

# ---------- REPAIR / RECOVERY / VERSION ----------
entity IntegrityRepairEvent:
  type: PreservationEvent
  may_include:
    - damaged_file
    - repair_source
    - repair_method
    - repaired_file
    - validation
    - new_fixity
    - event_time

rule repair:
  repair SHOULD preserve damaged source evidence and resulting-file provenance

entity IntegrityRecoveryEvent:
  subtype_of: IntegrityRepairEvent
  may_include: [replica_source, backup_source, recovery_tool, restored_file]

rule recovery:
  restored file SHOULD be validated against trusted integrity evidence

entity FileIntegrityVersion:
  type: VersionMetadata
  may_include: [version_identifier, predecessor, successor, change_event, fixity]

rule version:
  intentional file modification SHOULD create distinguishable version
  rather than be classified automatically as corruption

entity AuthorisedModification:
  type: PreservationEvent
  may_include: [source_file, resulting_file, authority, reason, new_fixity]

rule authorised_change:
  fixity change caused by authorised transformation != corruption
  when provenance establishes expected modification

# ---------- STORAGE / RISK ----------
entity StorageIntegrityMetadata:
  type: StorageMetadata
  may_include:
    - storage_identifier
    - media_health
    - read_errors
    - write_errors
    - integrity_monitoring
    - last_scrub_time

rule storage_health:
  storage health MAY inform integrity risk
  but != direct file-integrity state without file evidence

entity FileIntegrityRisk:
  type: RiskMetadata
  may_include:
    - verification_age
    - weak_hash_algorithm
    - storage_risk
    - replica_count
    - previous_errors
    - risk_level
    - assessment_time

rule risk:
  integrity risk SHOULD preserve assessment basis and time

# ---------- CONFIDENCE / PROVENANCE ----------
entity FileIntegrityConfidence:
  type: EpistemicMetadata
  range: [0.0, 1.0]

rule confidence_bounds:
  REQUIRE 0.0 <= confidence <= 1.0

entity FileIntegrityProvenance:
  type: ProvenanceMetadata
  may_include:
    - file_identifier
    - file_version
    - baseline_fixity
    - verification_events
    - storage_events
    - replication_events
    - repair_events
    - agents
    - tools

rule provenance:
  FileIntegrityMetadata SHOULD preserve integrity history

# ---------- VALIDATION ----------
validation:
  require:
    - identifiable_file

  validate_if_present:
    - file_identifier
    - file_version
    - file_size
    - fixity
    - algorithm
    - digital_signature
    - verification_event
    - corruption_evidence
    - repair_event
    - replicas
    - confidence
    - provenance

  reject:
    - filename_presented_as persistent_identity
    - checksum_without_algorithm
    - digest_compared_across_different_algorithms
    - fixity_match_presented_as complete_authenticity_proof
    - fixity_match_presented_as semantic_correctness
    - size_match_presented_as integrity_proof
    - authorised_modification_presented_as corruption_without evidence
    - mismatch_presented_as specific_corruption_cause_without evidence

# ---------- SEMANTIC EQUIVALENCE ----------
SEMANTIC_EQUIVALENCE:
  "file integrity" ~= "preservation of expected file byte state"
  "fixity check" ~= "comparison of expected and observed digest"
  "checksum verification" ~= "integrity comparison using checksum"
  "cryptographic hash verification" ~= "integrity comparison using cryptographic digest"
  "file corruption" ~= "unexpected alteration or loss of file data" WHEN evidence supports change
  "integrity repair" ~= "restoration or reconstruction after integrity failure"

  PRESERVE distinctions:
    file_identity != filename
    file_identity != storage_path
    fixity != semantic_identity
    checksum_match != complete_authenticity
    fixity_match != format_validity
    fixity_match != semantic_correctness
    file_size_match != integrity_proof
    fixity_mismatch != corruption_cause
    authorised_change != corruption
    replica != source_file_instance
    repaired_file != necessarily_same_file_version

# ---------- CONFIDENCE MODEL ----------
CONFIDENCE:
  explicit_file_integrity_metadata:
    score: 1.00
  persistent_file_identifier:
    score: 1.00
  trusted_baseline_plus_matching_strong_hash:
    score: 0.99
  independently_verified_replica:
    score: 0.99
  valid_digital_signature:
    score: 0.99
  checksum_match_legacy_algorithm:
    score: <= 0.90
  size_match_only:
    score: <= 0.60
  incomplete_integrity_history:
    score: <= 0.65
    action: preserve uncertainty

# ---------- UPDATE MODEL ----------
UPDATE_MODEL:
  on_file_ingest:
    - assign FileIdentifier
    - record file size
    - calculate baseline fixity
    - record algorithm and tool
    - validate format where required
    - initialise integrity provenance

  on_integrity_check:
    - retrieve trusted baseline
    - calculate observed fixity
    - compare using same algorithm and scope
    - compare file size where useful
    - record IntegrityVerificationEvent
    - update confidence and provenance

  on_mismatch:
    - preserve expected and observed evidence
    - classify integrity mismatch
    - inspect storage and transfer history
    - compare trusted replicas
    - avoid unsupported cause attribution
    - initiate repair or recovery where policy requires

  on_authorised_change:
    - preserve predecessor file
    - create new FileIntegrityVersion
    - calculate new baseline fixity
    - record AuthorisedModification
    - update provenance

  on_repair:
    - preserve damaged-file evidence
    - identify trusted repair source
    - create repaired or restored version
    - calculate new fixity
    - validate result
    - record IntegrityRepairEvent

# ---------- FLOW HASH ----------
FLOW_HASH:
  inputs:
    - ontology
    - file_integrity_entities
    - relationships
    - identity_rules
    - fixity_rules
    - verification_rules
    - corruption_rules
    - repair_rules
    - validation
    - semantic_equivalence
    - confidence_model
    - update_model

  canonicalisation:
    - preserve_file_identifiers
    - preserve_file_versions
    - preserve_digest_algorithm_and_value
    - preserve_object_scope
    - preserve_verification_event_order
    - preserve_repair_history
    - preserve_rule_order

  output:
    deterministic_semantic_hash

# ---------- AI CONSUMPTION ----------
AI_CONSUMPTION:
  interpret_as:
    - digital preservation metadata ontology
    - file-integrity and fixity model
    - integrity verification, corruption, repair, and provenance lifecycle
    - byte-level preservation evidence structure

  operations:
    - identify preserved files
    - resolve file identifiers and versions
    - inspect byte size
    - resolve fixity algorithms and digests
    - compare trusted baseline and observed fixity
    - validate replicas and transfers
    - inspect digital signatures
    - detect unexpected integrity changes
    - distinguish authorised modification from corruption
    - trace repair and recovery
    - assess integrity risk
    - trace provenance
    - preserve uncertainty

  constraints:
    - do_not_equate_filename_with file_identity
    - do_not_equate_storage_path_with file_identity
    - do_not_compare_digests_without matching_algorithm_and_scope
    - do_not_equate_fixity_match_with complete_authenticity
    - do_not_equate_fixity_match_with semantic_correctness
    - do_not_infer_corruption_cause_from mismatch_alone
    - preserve_identifiers_versions_algorithms_digests_events_and_provenance

# ---------- QUERY MODEL ----------
query:
  input:
    - file_identifier
    - file_version
    - fixity_algorithm
    - digest
    - verification_result
    - corruption_state
    - replica_identifier
    - repair_event
    - storage_identifier
    - assessment_time

  resolve:
    1. identify PreservedFile
    2. resolve FileIdentifier and version
    3. inspect file size and baseline fixity
    4. resolve algorithm and digest scope
    5. traverse IntegrityVerificationEvents
    6. inspect replicas, signatures, and storage evidence
    7. inspect corruption or mismatch evidence
    8. traverse repair, recovery, and authorised changes
    9. assess integrity risk and provenance
    10. return confidence

  output:
    - preserved_file
    - identifier
    - version
    - size
    - baseline_fixity
    - observed_fixity
    - verification_history
    - integrity_state
    - corruption_evidence
    - replicas
    - repair_history
    - storage_state
    - provenance
    - confidence

# ---------- INFERENCE ----------
inference:
  IF expected_digest = observed_digest
  AND algorithm_and_scope_match
  THEN infer byte_integrity_match

  IF expected_digest != observed_digest
  THEN infer unexpected_byte_change
  BUT do_not infer specific cause without evidence

  IF intentional transformation is documented
  AND resulting file has new validated fixity
  THEN classify authorised modification
  rather_than corruption

  IF trusted replica matches baseline
  AND primary file mismatches baseline
  THEN replica MAY serve as recovery candidate
  subject_to provenance and policy

# ---------- OUTPUT CONTRACT ----------
output:
  ontology_entity: FileIntegrityMetadata
  file_identity: machine_interpretable
  versions: explicit
  byte_size: preserved
  fixity_algorithms_and_digests: explicit
  baseline_and_observed_fixity: distinguishable
  verification_history: traversable
  integrity_state: reportable
  corruption_evidence: cause_cautious
  replicas: source_linked
  signatures: validation_aware
  repair_and_recovery: traceable
  authorised_changes: distinguishable
  storage_integrity: explicit
  risk: reportable
  provenance: preserved
  uncertainty: explicit
  long_term_preservation: enabled

end flow
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ