Merge pull request #146 from tuxxy/pubkey

Make get_pubkey return the cached Umbral pubkey
pull/160/head
Tux 2018-05-28 11:22:24 -06:00 committed by GitHub
commit 0600f37246
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@ class UmbralPrivateKey(object):
self.params = params
self.bn_key = bn_key
self.pubkey = self.get_pubkey()
self.pubkey = UmbralPublicKey(self.bn_key * self.params.g)
@classmethod
def gen_key(cls, params: UmbralParameters=None):
@ -121,7 +121,7 @@ class UmbralPrivateKey(object):
"""
Calculates and returns the public key of the private key.
"""
return UmbralPublicKey(self.bn_key * self.params.g)
return self.pubkey
def to_cryptography_privkey(self):
"""