标签: sqrl

有哪些Ed25519的实现?

新SQRL认证方案依赖于曲线Ed25519由丹尼尔·伯恩斯坦开发的加密.但是,为了开始实施该方案,首先需要成熟的Curve Ed25519实现.

有谁知道任何成熟的实现?对于Java,.NET或任何其他流行的平台?

cryptography sqrl curve-25519 ed25519

23
推荐指数
2
解决办法
1万
查看次数

如何确保函数在Go中占用一定的时间?

我正在Go中为SQRL客户端实施EnScrypt.该函数需要运行,直到它使用最少的CPU时间.我的Python代码如下所示:

def enscrypt_time(salt, password, seconds, n=9, r=256):
    N = 1 << n
    start = time.process_time()
    end = start + seconds
    data = acc = scrypt.hash(password, salt, N, r, 1, 32)
    i = 1
    while time.process_time() < end:
        data = scrypt.hash(password, data, N, r, 1, 32)
        acc = xor_bytes(acc, data)
        i += 1
    return i, time.process_time() - start, acc
Run Code Online (Sandbox Code Playgroud)

除了process_time函数之外,将其转换为Go非常简单.我不能使用time.Time/ Timer因为那些测量挂钟时间(受到系统上可能运行的其他所有内容的影响).我需要实际使用的CPU时间,理想情况是函数,或者至少需要运行的线程或进程.

什么是Go相当于process_time

https://docs.python.org/3/library/time.html#time.process_time

python time go sqrl

5
推荐指数
1
解决办法
191
查看次数

标签 统计

sqrl ×2

cryptography ×1

curve-25519 ×1

ed25519 ×1

go ×1

python ×1

time ×1