Skip to main content

Tool for transparent logs

Project description

tlverifier

documentation

https://tlverifier.readthedocs.io/en/latest/

installation:

pip install --extra-index-url https://test.pypi.org/simple/ tlverifier

installation of specific version:

pip install --extra-index-url https://test.pypi.org/simple/ tlverifier==x.y.z

Environment:

dev: python==3.9

required: python>=3.7

libs required: pymerkle-logsTransparentes~=0.0.3 [https://pypi.org/project/pymerkle-logsTransparentes/]

Functions:

  • verify_inclusion_proof
  • verify_consistency_proof
  • verify_data_entry
  • verify_local_tree_history_consistency
  • verify_global_tree_history_consistency

Functions details:

verify_inclusion_proof(proof, root, data, expected_index=None)
  • proof: dictionary
  • root: string
  • data: bytes
  • return: dictionary
    • {"success": True}
    • {"success": False, "exception": InvalidProof}
    • {"success": False, "exception": InvalidChallenge}
    • {"success": False, "exception": Other}
verify_consistency_proof(first_root, second_root, proof)
  • first_root: bytes
  • second_root: bytes
  • proof: MerkleProof (pymerkle_logsTransparentes.proof.MerkleProof)
  • return: dictionary
    • {"success": True}
    • {"success": False, "exception": InvalidProof}
    • {"success": False, "exception": InvalidChallenge}
    • {"success": False, "exception": Other}
verify_data_entry(proof, global_root, data)
  • proof: dictionary
  • global_root: string
  • data: bytes
  • return: dictionary
    • {"success": True}
    • {"success": False, "exception": inclusion_proof_local}
    • {"success": False, "exception": inclusion_proof_global}
verify_local_tree_history_consistency(global_tree_data, consistency_proofs, trusted_global_root, tree_name)
  • global_tree_data: dictionary
  • consistency_proofs: dictionary
  • trusted_global_root: string
  • tree_name: string
  • return: dictionary
    • {"success": True}
    • {"success": False, "exception": "Global roots don't match"}
    • {"success": False, "exception": "Global tree data and Consistency proofs do not match"}
    • {"success": False, "exception": "Consistency proof is false"}
verify_global_tree_history_consistency(consistency_proofs, stored_global_roots=None)
  • consistency_proofs: dictionary
  • trusted_global_root: dictionary
  • return: dictionary
    • {"success": True}
    • {"success": False, "exception": "Consistency proof is false"}

Testing with testers.py and data_access.py

- testers.py

has 5 functions, each one gets data from "data_access.py" and calls only one function of tl_functions

- data_access.py

gets mocked data, you can change data here to create to test for failure, or to add your own mocked data

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tlverifier-0.0.28.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tlverifier-0.0.28-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file tlverifier-0.0.28.tar.gz.

File metadata

  • Download URL: tlverifier-0.0.28.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for tlverifier-0.0.28.tar.gz
Algorithm Hash digest
SHA256 4f8370c36e34f94ada4475e42c4beaeb469449db63a7c856dca61d6840c79348
MD5 c11ff03af650a547d97cf9dddbb9f193
BLAKE2b-256 2848cf341a66a052cb0bd26a625325eeb97d6ca0dcdacd2b8a9176fda389c43d

See more details on using hashes here.

File details

Details for the file tlverifier-0.0.28-py3-none-any.whl.

File metadata

  • Download URL: tlverifier-0.0.28-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for tlverifier-0.0.28-py3-none-any.whl
Algorithm Hash digest
SHA256 db8e6079f7404bea81933c5eced0e0a299e3077eec7669e2c54e40d476880d96
MD5 91baa5cf5994c2adc6c0f3a0f852010a
BLAKE2b-256 4ad7b9f2b9d48ef5300050bc84978b86259271e8f9e48ddb1c8b48ebab9119e4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page