Skip to content

Commit

Permalink
remove redundancy
Browse files Browse the repository at this point in the history
  • Loading branch information
youngjoon-lee committed Jan 9, 2024
1 parent 561afd4 commit a6ec1b6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mixnet/bls.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
from random import randint
from typing import TypeAlias

import blspy

from mixnet.utils import random_bytes

BlsPrivateKey: TypeAlias = blspy.PrivateKey
BlsPublicKey: TypeAlias = blspy.G1Element


def generate_bls() -> BlsPrivateKey:
seed = bytes([randint(0, 255) for _ in range(32)])
seed = bytes(random_bytes(32))
return blspy.BasicSchemeMPL.key_gen(seed)

0 comments on commit a6ec1b6

Please sign in to comment.