示例#1
0
def initNodeKeysForBothStacks(name, baseDir, sigseed, override=False):
    # `sigseed` is initialised to keep the seed same for both stacks.
    # Both node and client stacks need to have same keys
    sigseed = sigseed or randomSeed()

    nodeStackClass.initLocalKeys(name + CLIENT_STACK_SUFFIX, baseDir, sigseed,
                                 override=override)
    return nodeStackClass.initLocalKeys(name, baseDir, sigseed,
                                        override=override)
示例#2
0
def initNodeKeysForBothStacks(name,
                              baseDir,
                              sigseed,
                              override=False,
                              config=None):
    nodeStackClass.initLocalKeys(name, baseDir, sigseed, override=override)
    nodeStackClass.initLocalKeys(name + CLIENT_STACK_SUFFIX,
                                 baseDir,
                                 sigseed,
                                 override=override)
def initLocalKeys(name, keys_dir, sigseed, *, use_bls, override=False):
    # * forces usage of names for args on the right hand side
    pubkey, verkey = nodeStackClass.initLocalKeys(name, keys_dir, sigseed, override=override)
    print("Public key is", pubkey)
    print("Verification key is", verkey)
    blspk = init_bls_keys(keys_dir, name, sigseed) if use_bls else None
    return pubkey, verkey, blspk
示例#4
0
def initLocalKeys(name, baseDir, sigseed, override=False, config=None):
    pubkey, verkey = nodeStackClass.initLocalKeys(name,
                                                  baseDir,
                                                  sigseed,
                                                  override=override)
    print("Public key is", pubkey)
    print("Verification key is", verkey)
    return pubkey, verkey
示例#5
0
def initLocalKeys(name, keys_dir, sigseed, *, use_bls, override=False):
    # * forces usage of names for args on the right hand side
    pubkey, verkey = nodeStackClass.initLocalKeys(name, keys_dir, sigseed, override=override)
    print("Public key is", hexToFriendly(pubkey))
    print("Verification key is", hexToFriendly(verkey))
    blspk, key_proof = init_bls_keys(keys_dir, name, sigseed) if use_bls \
        else (None, None)
    return pubkey, verkey, blspk, key_proof
示例#6
0
def initLocalKeys(name, keys_dir, sigseed, *, use_bls, override=False):
    # * forces usage of names for args on the right hand side
    pubkey, verkey = nodeStackClass.initLocalKeys(name,
                                                  keys_dir,
                                                  sigseed,
                                                  override=override)
    print("Public key is", hexToFriendly(pubkey))
    print("Verification key is", hexToFriendly(verkey))
    blspk, key_proof = init_bls_keys(keys_dir, name, sigseed) if use_bls \
        else (None, None)
    return pubkey, verkey, blspk, key_proof