Hash

我可以僅將公鑰密碼系統基於散列算法嗎?

  • December 9, 2020

我可以將公鑰和私鑰系統建立在僅使用散列算法的基礎上嗎?例如:

privKey = sha256( randomGenerator() ) 
pubKey = sha256( privKey )

為什麼我需要使用不同的算法?例如,RSA 還是 ECC?

我可以使用散列算法建立一個公鑰和私鑰系統

基於散列的簽名,例如Sphincs+,本質上就是這樣(除了私鑰和公鑰之間的關係稍微複雜一點。

However, to answer the question you appear to be answering: the problem with developing a public key cryptosystem is not just the relationship between the public and the private key. For public key encryption systems, there has to be a way for someone with the public key to encrypt a message (so someone can decrypt it if and only if they have the private key).

Similarly, for a public key signature system, there has to be a way to generate a signature (that works only if you have the private key), and anyone with the public key can verify it.

With your simple relationship, there is no way to use the public key to encrypt a message. And, while you can devise a way to use hash functions to sign a message, it is considerably more involved (because the only trick you have in validating a signature is revealing preimages; you can only do that once for each preimage, and hence you need a rather lot of cleverness to sign a number of messages.

引用自:https://crypto.stackexchange.com/questions/86770