2
我想用橢圓曲線簽署並驗證pdf。我有一些代碼,但它不起作用。OpenSSL ECDSA簽名和驗證文件
創建私有密鑰:
openssl ecparam -genkey -name secp384r1 -noout -out private.pem
創建公共密鑰:
openssl ec -in private.pem -pubout -out public.pem
註冊文件:
openssl dgst -ecdsa-with-SHA1 test.pdf > hash openssl dgst
openssl dgst -ecdsa-with-SHA1 -inkey private.pem -keyform PEM -in hash > signature
驗證文件:
openssl dgst -ecdsa-with-SHA1 -verify public.pem -signature signature.bin data
要簽名和驗證的部分不起作用。
這個問題似乎是題外話,因爲它要求的超級用戶/回答 - http://superuser.com/questions/ 737574/OpenSSL的-ECDSA點登錄和驗證文件 – Taryn