Zeth - Zerocash on Ethereum  0.8
Reference implementation of the Zeth protocol by Clearmatics
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
zeth.core.zeth_address.ZethAddress Class Reference

Public Member Functions

def __init__ (self, OwnershipPublicKey a_pk, EncryptionPublicKey k_pk, OwnershipSecretKey a_sk, EncryptionSecretKey k_sk)
 
OwnershipKeyPair ownership_keypair (self)
 

Static Public Member Functions

ZethAddress from_key_pairs (OwnershipKeyPair ownership, EncryptionKeyPair encryption)
 
ZethAddress from_secret_public (ZethAddressPriv js_secret, ZethAddressPub js_public)
 

Public Attributes

 addr_pk
 
 addr_sk
 

Detailed Description

Secret and public keys for both ownership and encryption (referrred to as
"zethAddress" in the paper).

Definition at line 75 of file zeth_address.py.

Constructor & Destructor Documentation

◆ __init__()

def zeth.core.zeth_address.ZethAddress.__init__ (   self,
OwnershipPublicKey  a_pk,
EncryptionPublicKey  k_pk,
OwnershipSecretKey  a_sk,
EncryptionSecretKey  k_sk 
)

Definition at line 80 of file zeth_address.py.

80  def __init__(
81  self,
82  a_pk: OwnershipPublicKey,
83  k_pk: EncryptionPublicKey,
84  a_sk: OwnershipSecretKey,
85  k_sk: EncryptionSecretKey):
86  self.addr_pk = ZethAddressPub(a_pk, k_pk)
87  self.addr_sk = ZethAddressPriv(a_sk, k_sk)
88 

Member Function Documentation

◆ from_key_pairs()

ZethAddress zeth.core.zeth_address.ZethAddress.from_key_pairs ( OwnershipKeyPair  ownership,
EncryptionKeyPair  encryption 
)
static

Definition at line 90 of file zeth_address.py.

90  def from_key_pairs(
91  ownership: OwnershipKeyPair,
92  encryption: EncryptionKeyPair) -> ZethAddress:
93  return ZethAddress(
94  ownership.a_pk,
95  encryption.k_pk,
96  ownership.a_sk,
97  encryption.k_sk)
98 

◆ from_secret_public()

ZethAddress zeth.core.zeth_address.ZethAddress.from_secret_public ( ZethAddressPriv  js_secret,
ZethAddressPub  js_public 
)
static

Definition at line 100 of file zeth_address.py.

100  def from_secret_public(
101  js_secret: ZethAddressPriv,
102  js_public: ZethAddressPub) -> ZethAddress:
103  return ZethAddress(
104  js_public.a_pk, js_public.k_pk, js_secret.a_sk, js_secret.k_sk)
105 

◆ ownership_keypair()

OwnershipKeyPair zeth.core.zeth_address.ZethAddress.ownership_keypair (   self)

Definition at line 106 of file zeth_address.py.

106  def ownership_keypair(self) -> OwnershipKeyPair:
107  return OwnershipKeyPair(self.addr_sk.a_sk, self.addr_pk.a_pk)
108 
109 

Member Data Documentation

◆ addr_pk

zeth.core.zeth_address.ZethAddress.addr_pk

Definition at line 81 of file zeth_address.py.

◆ addr_sk

zeth.core.zeth_address.ZethAddress.addr_sk

Definition at line 82 of file zeth_address.py.


The documentation for this class was generated from the following file: