我需要帮助来理解 php 和 android 上的椭圆曲线密码学。我已经阅读了有关 Spongy caSTLe 和 Bouncy CaSTLe 的内容……到目前为止我所了解的是每一方都需要生成一对 key (公钥和私钥)以及他们将用于加密和解密的共享 key 。我说得对吗?还是还有另一个 key ...我有点困惑..我也找不到任何关于 php 的东西...感谢任何帮助...
我也知道 ECDSA 仅用于生成签名,而 ECDH 用于消息的加密/解密,这正是我所需要的..
最佳答案
what I understood so far is that Each side needs to generate a pair of keys (public and private) and a shared secret key which they will use for the encryption and decryption.. am I right?
是的。每一方生成 key 对并将其公钥发送给对方。私钥必须妥善保管,不得泄露。
key 由接收方私钥和发送方公钥生成,反之亦然。
Elliptic Curve Digital Signature Algorithm (ECDSA)用于用私钥对数据进行签名,并用对应的公钥进行验证。
Elliptic curve Diffie–Hellman (ECDH) :
is an anonymous key agreement protocol that allows two parties, each having an elliptic curve public–private key pair, to establish a shared secret over an insecure channel.
所以如果你想加密和解密数据,你需要ECDH。
关于java - PHP 和 Android 上的椭圆曲线密码学,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43765718/