如何从XZ坐标创建x25519公钥?

问题描述 投票:1回答:1

据我了解,Curve25519上使用的x25519 DH函数仅使用X坐标,正如我在wikipedia definition中可以看到的:

The protocol uses compressed elliptic point (only X coordinates), so it allows efficient use of the Montgomery ladder for ECDH, using only XZ coordinates.[5]

[XZ坐标[数据库条目]表示x y为X Z,满足以下公式:]]

x=X/Z

根据此documentation

我在此stack exchange answer中找到了这些等式:

enter image description here

enter image description here

enter image description here

我查看了X25519_public_from_private函数并发现:

X25519_public_from_private

我想知道的是如何从u,v或x,y(或X,Y)坐标创建公共密钥。尤其是如果有可能的话?

例如,使用经典ecdsa,由于x,y坐标和曲线,因此可以创建公用数字,因此可以从它们创建公用密钥。使用 /* * We only need the u-coordinate of the curve25519 point. * The map is u=(y+1)/(1-y). Since y=Y/Z, this gives * u=(Z+Y)/(Z-Y). */ 的示例:

cryptography python library

我想用Curve25519实现相同的目的。

参考:public_numbers = ec.EllipticCurvePublicNumbers(x, y, curve) public_key = public_numbers.public_key(backend) https://medium.com/@chain_66731/a-deep-dive-into-x25519-7a926e8a91c7https://hackernoon.com/what-is-the-math-behind-elliptic-curve-cryptography-f61b25253da3

据我了解,Curve25519上使用的x25519 DH函数仅使用Xcoordinates,正如我在维基百科定义中可以读到的:该协议使用压缩的椭圆点(仅X坐标),所以它是...]]

openssl cryptography ecdsa libcrypto x25519
1个回答
0
投票
不,您不能生成带有任意x和y的公共密钥。公钥是从私钥

n

派生的。通过将预定义基点G
© www.soinside.com 2019 - 2024. All rights reserved.