Hello,

> The rsautl utility can do this using the -sign and -verify options. In rsautl
> "verify" does a public decrypt and writes the result rather than a memcmp
> and a Yes/No answer.
You are right:
--------------

$ openssl genrsa -out rsa.pem 1024
Generating RSA private key, 1024 bit long modulus
...............................................++++++
...................++++++
e is 65537 (0x10001)

$ openssl rsa -in rsa.pem -out rsa_pub.pem -pubout
writing RSA key

$ dd if=/dev/random of=key.bin bs=1 count=16
16+0 records in
16+0 records out

$ od -x key.bin
0000000 f06a cc91 ae4a 2112 e8e7 08ef 928c 10e2
0000020

$ openssl rsautl -sign -inkey rsa.pem -in key.bin -out key_enc.bin

$ openssl rsautl -verify -inkey rsa_pub.pem -pubin -in key_enc.bin -out
key_dec.bin

$ od -x key_dec.bin
0000000 f06a cc91 ae4a 2112 e8e7 08ef 928c 10e2
0000020

I should check this before.

Best regards,
-- 
Marek Marcola <[EMAIL PROTECTED]>

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to