2011-12-21 119 views
11

我使用Linux命令行,我創建了一個私有密鑰使用以下命令:加密和解密與RSA的文字和DES3鑰匙串

openssl genrsa -des3 -out private.pem 2048 

我從私人提取的公共密鑰像這樣的關鍵:

openssl rsa -in private.pem -out public.pem -outform PEM -pubout 

我想用公鑰加密的文本字符串,可以說「富巴」,然後再解密此字符串。

我該如何解決這個問題?

感謝

回答

10

我想你想

openssl rsautl -encrypt -inkey public.pem -pubin -in unencrypted_file.txt -out encrypted_file.ssl 

多見於devco

+0

非常感謝! – JMK 2011-12-21 15:00:39