当前位置: 首页>>代码示例>>Python>>正文


Python MiniNero.publicFromInt方法代码示例

本文整理汇总了Python中MiniNero.publicFromInt方法的典型用法代码示例。如果您正苦于以下问题:Python MiniNero.publicFromInt方法的具体用法?Python MiniNero.publicFromInt怎么用?Python MiniNero.publicFromInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MiniNero的用法示例。


在下文中一共展示了MiniNero.publicFromInt方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: getHForCT

# 需要导入模块: import MiniNero [as 别名]
# 或者: from MiniNero import publicFromInt [as 别名]
def getHForCT():
    return "8b655970153799af2aeadc9ff1add0ea6c7251d54154cfa92c173a0dd39c1f94"
    A = MiniNero.publicFromInt(1)
    H = MiniNero.hashToPoint_ct(A)
    Translator.hexToC(H) 
    print(H)
    return H
开发者ID:ShenNoether,项目名称:research-lab,代码行数:9,代码来源:RingCT2.py

示例2: getH2ForCT

# 需要导入模块: import MiniNero [as 别名]
# 或者: from MiniNero import publicFromInt [as 别名]
def getH2ForCT():
    A = MiniNero.publicFromInt(1)
    HPow2 = MiniNero.hashToPoint_ct(A)
    two = MiniNero.intToHex(2)
    H2 = [None] * ATOMS
    for i in range(0, ATOMS):
        #Translator.hexToCComma(HPow2) 
        H2[i] = HPow2
        HPow2 = MiniNero.scalarmultKey(HPow2, two)
    return H2
开发者ID:ShenNoether,项目名称:research-lab,代码行数:12,代码来源:RingCT2.py

示例3: getHForCT

# 需要导入模块: import MiniNero [as 别名]
# 或者: from MiniNero import publicFromInt [as 别名]
def getHForCT():
    A = MiniNero.publicFromInt(123456)
    return MiniNero.hashToPoint_ct(A)
开发者ID:Coder420,项目名称:MiniNero,代码行数:5,代码来源:GenLookup.py

示例4: raw_input

# 需要导入模块: import MiniNero [as 别名]
# 或者: from MiniNero import publicFromInt [as 别名]
     t = raw_input("13 or 25 words?")
     a = MiniNero.electrumChecksum(t)
     print(a)
 if sys.argv[1] == "1224":
     #sohuld turn 12 word key to 24
     print("tbd")
     sk = "536313cc0a88457e3d3e5aadda8d204af20e480416cc522ebd5a67df00ce2503"
     print(MiniNero.getAddr(sk))
 if sys.argv[1] == "seed":
     seed = "3c817618dcbfed122a64e592bb441d73300da9123686224a84e0eab1f075117e";
     a = MiniNero.hexToInt(seed)
     b = a // l
     print(b)
 if sys.argv[1] == "HCT":
     for i in [1, 12, 123, 1234, 12345, 123456]:
         A = MiniNero.publicFromInt(i)
         print(i, MiniNero.hashToPoint_ct(A))
 if sys.argv[1] == "RingCTSimple":
     #see below for ring ct with sliding exponents
     exponent = 9
     H_ct = RingCT.getHForCT()
     print("H", H_ct)
     sr, Pr = PaperWallet.skpkGen() #receivers private/ public
     se, pe, ss1, ss2 = Ecdh.ecdhGen(Pr) #compute shared secret ss
     digits = 32 #in practice it could will be 32 (from .0001 monero to ~400k monero) all other amounts can be represented by full 64 if necessary, otherwise you can use the sliding implementation of RingCT given below.
     print("inputs")
     a = 10000
     Cia, L1a, s2a, sa, ska = RingCT.genRangeProof(10000, digits)
     print("outputs")
     b = 7000
     Cib, L1b, s2b, sb, skb = RingCT.genRangeProof(7000, digits)
开发者ID:ShenNoether,项目名称:research-lab,代码行数:33,代码来源:Test.py


注:本文中的MiniNero.publicFromInt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。