[英]tweetnacl -- What input does nacl.box.keyPair.fromSecretKey expect?
I am little bit confused about the API of tweetnacl.我对 tweenacl 的 API 有点困惑。 Does the function nacl.box.keyPair.fromSecretKey
except the secretKey argument to be already clamped? function nacl.box.keyPair.fromSecretKey
除了 secretKey 参数是否已经被夹住? Or it is it fine to provide a random byte string?或者提供一个随机字节串就可以了? The way I read the code, tweetnacl does the clamping later on, correct?我阅读代码的方式,tweetnacl 稍后进行钳位,对吗? So is the secretKey
in tweetNacl always a random byte string and the clamping is done in internal library functions?那么secretKey
中的 secretKey 是否始终是随机字节字符串并且钳位是在内部库函数中完成的?
Correct, you don't need to be concerned with 25519 clamping.正确,您无需担心 25519 夹紧。
The library handles this.图书馆处理这个。 You simply need to supply a uniformly random 256-bit string.您只需提供一个统一随机的 256 位字符串。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.