Re: [openssl-users] One question about RSA decrypt with private key

2017-03-23 Thread Salz, Rich via openssl-users
> For encrypting user data such as user's password, could I use PKCS#1 or OAEP > padding mode? If you do not know what you are doing, use the defaults. -- openssl-users mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users

Re: [openssl-users] One question about RSA decrypt with private key

2017-03-23 Thread Yu Wei
From: openssl-users <openssl-users-boun...@openssl.org> on behalf of Matt Caswell <m...@openssl.org> Sent: Thursday, March 23, 2017 6:05:43 PM To: openssl-users@openssl.org Subject: Re: [openssl-users] One question about RSA decrypt with private key On 23/03/17 05:29,

Re: [openssl-users] One question about RSA decrypt with private key

2017-03-23 Thread Salz, Rich via openssl-users
> After commented out the line "EVP_PKEY_CTX_set_rsa_padding(ctx, > RSA_NO_PADDING)",? it worked well. You need to do some reading about basic RSA cryptography. Signatures are padded out to the keysize. -- openssl-users mailing list To unsubscribe:

Re: [openssl-users] One question about RSA decrypt with private key

2017-03-23 Thread Matt Caswell
tware developer > Interested in open source software, big data, Linux > > > *From:* openssl-users <openssl-users-boun...@openssl.org> on behalf of > Yu Wei <yu20...@hotmail.com> > *Sent:* Thursday, March 23, 2017 1:20:42 AM > *To:* openssl-users@openssl.org > *Subjec

Re: [openssl-users] One question about RSA decrypt with private key

2017-03-23 Thread Yu Wei
are, big data, Linux From: openssl-users <openssl-users-boun...@openssl.org> on behalf of Yu Wei <yu20...@hotmail.com> Sent: Thursday, March 23, 2017 1:20:42 AM To: openssl-users@openssl.org Subject: [openssl-users] One question about RSA decrypt with priv

[openssl-users] One question about RSA decrypt with private key

2017-03-22 Thread Yu Wei
Hi guys, I generated RSA private key and public key as below, openssl genpkey -algorithm RSA -out key.pem -pkeyopt rsa_keygen_bits:2048 openssl rsa -pubout -in pri.key -out pub.key And encrypted text file as below, openssl pkeyutl -encrypt -pubin -inkey ~/pub.key -in ~/1.txt -out ~/1e.txt