Got it. Thanks.
Sonia
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Marek Marcola
Sent: Tuesday, July 04, 2006 3:48 AM
To: openssl-users@openssl.org
Subject: RE: Private Key Type and PEM Length
Hello,
> One more question before I move to new age
Hello,
> One more question before I move to new agenda.
> Is siglen RSA_size? Should rsa_pv and rsa_pb the same size?
Yes, and this is size of modulus, RSA_size simply
returns BN_num_bytes(rsa->n);
Best regards,
--
Marek Marcola <[EMAIL PROTECTED]>
__
same size?
Thanks again.
Sonia
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Marek Marcola
Sent: Monday, July 03, 2006 2:13 PM
To: openssl-users@openssl.org
Subject: RE: Private Key Type and PEM Length
Hello,
> This is what I up to,
>
>
Hello,
> This is what I up to,
>
> $ openssl genrsa -out private.pem 2048
> $ openssl rsa -in private.pem -out public.pem -pubout
>
> to gen the private & public keys
>
> pvk_fd = fopen("private.pem","r");
> rsa_pv = PEM_read_RSAPrivateKey(pvk_fd,&rsa_pv,NULL,NULL);
> ret = RSA_sign(NID_md5,tes
keys, they
are the same. RSA_sign/verify does not work. What did I miss?
Thanks.
Sonia
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Marek Marcola
Sent: Monday, July 03, 2006 8:57 AM
To: openssl-users@openssl.org
Subject: RE: Private Key Type and PEM Len
Hello,
> I want to read public part of RSA.
> The input file is PEM format file generated by openssl genrsa
> for private and openssl rsa for public.
> Do you mean this is not the correct format for PEM_read_RSAPublicKey?
Yes, PEM_read_RSAPublicKey require PKCS#1 but if public key was
generated w
] Behalf Of Marek Marcola
Sent: Monday, July 03, 2006 8:25 AM
To: openssl-users@openssl.org
Subject: RE: Private Key Type and PEM Length
Hello,
> I tried the PEM_read_RSAPrivateKey and PEM_read_RSAPublicKey pair.
> PEM_read_RSAPrivateKey seems work fine.
> PEM_read_RSAPublicKey failed.
>
Hello,
> I tried the PEM_read_RSAPrivateKey and PEM_read_RSAPublicKey pair.
> PEM_read_RSAPrivateKey seems work fine.
> PEM_read_RSAPublicKey failed.
> By tracing, it failed in BIO_gets(), returning 0. Any idea?
PEM_read_RSAPublicKey reads from PKCS#1 ASN1 structure public
part of RSA key (n,e).
:[EMAIL PROTECTED] Behalf Of Marek Marcola
Sent: Friday, June 30, 2006 10:01 AM
To: openssl-users@openssl.org
Subject: RE: Private Key Type and PEM Length
Hello,
> I am working on something similar. if I generated a private key with no
> password,
> can I pass NULL to PEM_read_bio_privateKey(
Thanks Marek,I Got the function Wanted !!--sudhir
Hello,
> I think the modulus field of the rsa_t / dsa_t structure gives the
> Key Length in Bytes,
> am i correct ??
Oh, you mean size of RSA key, try RSA_size();
(and yes - this is size of modulus)
Best regards,
--
Marek Marcola <[EMAIL PROTECTED]>
__
Hi, I think the modulus field of the rsa_t / dsa_t structure gives the Key Length in Bytes, am i correct ??--SudhirOn 7/3/06,
Sudhir Voona <[EMAIL PROTECTED]> wrote:
Hi, Thanks for the suggestion Marek. As posted earlier, my requirement is to know the Private Key Type and its PEM Length
Hi, Thanks for the suggestion Marek. As posted earlier, my requirement is to know the Private Key Type and its PEM Length. EVP_PKEY would give me the private key Type and not its PEM Length. How do i extract the PEM Length of the EVP_PKEY ?
Is there an API for getting the EVP_PKEY
Hello,
> I am working on something similar. if I generated a private key with no
> password,
> can I pass NULL to PEM_read_bio_privateKey(bio,&pkey,NULL,NULL)?
Yes,
> Is there lib function that reads DER format?
Try d2i_RSAPrivateKey_bio();
Best regards,
--
Marek Marcola <[EMAIL PROTECTED]>
_
arek Marcola
Sent: Thursday, June 29, 2006 6:52 AM
To: openssl-users@openssl.org
Subject: Re: Private Key Type and PEM Length
Hello,
> > Can anyone tell me how to get the Private Key Type(DSA /RSA ) and its
> > PEM Length given the buffer containing the Private Key in PEM / DER
> >
Hello,
> > Can anyone tell me how to get the Private Key Type(DSA /RSA ) and its
> > PEM Length given the buffer containing the Private Key in PEM / DER
> > format.
> If you have buffer in PEM format, key tape can be read from
> first "line" (for example: -BEGIN DSA PRIVATE KEY-)
>
> If y
Hello,
> I am sending my Query again ..
>
> Is there any OpenSSL API which would give me the Key Type and its PEM
> Length if I pass the buffer containing the Private Key in DER /PEM
> format to it ??
>
> Can anyone tell me how to get the Private Key Type(DSA /RSA ) and its
> PEM Length given th
17 matches
Mail list logo