Zeth - Zerocash on Ethereum  0.8
Reference implementation of the Zeth protocol by Clearmatics
Namespaces | Functions | Variables
crypto.py File Reference

Go to the source code of this file.

Namespaces

 coordinator.crypto
 

Functions

str coordinator.crypto.export_digest (bytes digest)
 
bytes coordinator.crypto.import_digest (str digest_s)
 
ecdsa.SigningKey coordinator.crypto.generate_signing_key ()
 
bytes coordinator.crypto.export_signing_key (ecdsa.SigningKey sk)
 
ecdsa.SigningKey coordinator.crypto.import_signing_key (bytes sk_b)
 
ecdsa.VerifyingKey coordinator.crypto.get_verification_key (ecdsa.SigningKey sk)
 
str coordinator.crypto.export_verification_key (ecdsa.VerifyingKey vk)
 
ecdsa.VerifyingKey coordinator.crypto.import_verification_key (str vk_s)
 
str coordinator.crypto.export_signature (bytes sig)
 
bytes coordinator.crypto.import_signature (str sig_s)
 
bytes coordinator.crypto.compute_file_digest (str file_name)
 
bytes coordinator.crypto.sign (ecdsa.SigningKey sk, bytes digest)
 
bool coordinator.crypto.verify (bytes sig, ecdsa.VerifyingKey vk, bytes digest)
 
Signature coordinator.crypto.create_key_evidence (ecdsa.SigningKey key)
 
bool coordinator.crypto.check_key_evidence (ecdsa.VerificationKey verification_key, Signature key_evidence)
 

Variables

 coordinator.crypto.HASH = SHA512
 
int coordinator.crypto.HASH_BYTE_LENGTH = 64
 
 coordinator.crypto.CURVE = ecdsa.NIST521p
 
 coordinator.crypto.VerificationKey = ecdsa.VerifyingKey
 
 coordinator.crypto.SigningKey = ecdsa.SigningKey
 
 coordinator.crypto.Signature = bytes
 
int coordinator.crypto.HASH_FILE_BLOCK_SIZE = 4096