def generate_secrets(n, k, s):
    #_16byteNo_start = 1000000000000000
    #_16byteNo_end   = 9999999999999999
    #secret = random.randrange(_16byteNo_start,_16byteNo_end)
    prime = 18895749970915969007
    secret = s
    shares = sss.deal(n, k, prime, secret)
    return shares
def generate_secrets(n, k, s):
	#_16byteNo_start = 1000000000000000
	#_16byteNo_end   = 9999999999999999
	#secret = random.randrange(_16byteNo_start,_16byteNo_end)
	prime  = 18895749970915969007
	secret = s
	shares = sss.deal(n,k,prime,secret)
	return shares
示例#3
0
文件: toyapp.py 项目: vishnuvp/toyapp
def generate_secrets(file_name, n, k):
	_16byteNo_start = 1000000000000000
	_16byteNo_end   = 9999999999999999
	key = random.randrange(_16byteNo_start,_16byteNo_end)
	aes.encrypt_file(str(key),file_name)
	prime  = 18895749970915969007
	secret = key#int("1234567890123456")
	shares = sss.deal(n,k,prime,secret)
	return shares