openssl-users Digest, Vol 98, Issue 8

Samiya Khanum samiya.khanum at broadcom.com
Thu Feb 16 14:33:59 UTC 2023


Hi Richard,

What is the default mode used for AES_encrypt/AES_decrypt calls. Is it GCM,
ECB or something else?
Because I wanted to pass the same mode for EVP api's.

Thanks & Regards,
Samiya khanum


On Fri, Jan 6, 2023 at 7:32 PM <openssl-users-request at openssl.org> wrote:

> Send openssl-users mailing list submissions to
>         openssl-users at openssl.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://mta.openssl.org/mailman/listinfo/openssl-users
> or, via email, send a message with subject or body 'help' to
>         openssl-users-request at openssl.org
>
> You can reach the person managing the list at
>         openssl-users-owner at openssl.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of openssl-users digest..."
>
>
> Today's Topics:
>
>    1. Re: openssl-users Digest, Vol 98, Issue 7 (Samiya Khanum)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 6 Jan 2023 19:30:54 +0530
> From: Samiya Khanum <samiya.khanum at broadcom.com>
> To: openssl-users at openssl.org, Richard Levitte <levitte at openssl.org>
> Cc: Kamlesh Agrawal <kamlesh.agrawal at broadcom.com>
> Subject: Re: openssl-users Digest, Vol 98, Issue 7
> Message-ID:
>         <
> CADmX34qTqeih9QX72WsCebsZDYbeGiW74u20ujBNkNnKEb7T5w at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Richard,
>
> Thanks for providing the information.
> I have one more query, please help.
>
> I have to compile an NTP application with below mentioned CFLAG to
> suppress the deprecated compilation errors, but still I see a couple of
> compilation issues.
> CFLAGSEXTRA += \
>         -DOPENSSL_API_COMPAT=0x010101000L
>
> For below EVP api's, const qualifier is added in openSSL3.0 code. To fix
> these errors, I have to do type casting in many places.
> We can't use "-Wdiscarded-qualifiers" FLAG in our environment, it is not
> supported.
> Is there any other way that I can avoid this?
>
> Checking 'open'
> ../../../../vendor/ntp/util/ntp-keygen.c: In function 'main':
> ../../../../vendor/ntp/util/ntp-keygen.c:644:7: error: assignment discards
> 'const' qualifier from pointer target type [-Werror]
>    rsa = EVP_PKEY_get0_RSA(pkey_gqkey);
>        ^
> ../../../../vendor/ntp/util/ntp-keygen.c:665:7: error: assignment discards
> 'const' qualifier from pointer target type [-Werror]
>    rsa = EVP_PKEY_get0_RSA(pkey_gqkey);
>        ^
> ../../../../vendor/ntp/util/ntp-keygen.c:688:7: error: assignment discards
> 'const' qualifier from pointer target type [-Werror]
>    rsa = EVP_PKEY_get0_RSA(pkey_gqkey);
>        ^
> ../../../../vendor/ntp/util/ntp-keygen.c:731:7: error: assignment discards
> 'const' qualifier from pointer target type [-Werror]
>    dsa = EVP_PKEY_get0_DSA(pkey_iffkey);
>        ^
> ../../../../vendor/ntp/util/ntp-keygen.c:754:7: error: assignment discards
> 'const' qualifier from pointer target type [-Werror]
>    dsa = EVP_PKEY_get0_DSA(pkey_iffkey);
>
>
> Thanks & Regards,
> Samiya khanum
>
>
> On Fri, Jan 6, 2023 at 5:30 PM <openssl-users-request at openssl.org> wrote:
>
> > Send openssl-users mailing list submissions to
> >         openssl-users at openssl.org
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> >         https://mta.openssl.org/mailman/listinfo/openssl-users
> > or, via email, send a message with subject or body 'help' to
> >         openssl-users-request at openssl.org
> >
> > You can reach the person managing the list at
> >         openssl-users-owner at openssl.org
> >
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of openssl-users digest..."
> >
> >
> > Today's Topics:
> >
> >    1. Replacement for AES_encrypt (Samiya Khanum)
> >    2. Re: Replacement for AES_encrypt (Richard Levitte)
> >
> >
> > ----------------------------------------------------------------------
> >
> > Message: 1
> > Date: Thu, 5 Jan 2023 17:42:57 +0530
> > From: Samiya Khanum <samiya.khanum at broadcom.com>
> > To: openssl-users at openssl.org
> > Cc: Kamlesh Agrawal <kamlesh.agrawal at broadcom.com>
> > Subject: Replacement for AES_encrypt
> > Message-ID:
> >         <
> > CADmX34oWPfjyP5j2q2xtgqr3d3TQQtfLGME4Fk5-rLr444EJsg at mail.gmail.com>
> > Content-Type: text/plain; charset="utf-8"
> >
> > Hi All,
> >
> > We are upgrading our code to openSSL 3.0.
> >
> > I have replaced  AES_set_encrypt_key  and AES_encrypt
> > with EVP_CipherInit_ex, EVP_CipherUpdate and EVP_CipherFinal_ex.
> > In the below function what should be the cipher parameter(second
> argument).
> > Because in AES_encryt api, we don't mention any block cipher.
> > Is it EVP_aes_128_cbc() algorithm that we should use?
> >
> > int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx,
> >                                  *const EVP_CIPHER *cipher,* ENGINE
> *impl,
> >                                  const unsigned char *key,
> >                                  const unsigned char *iv, int enc);
> >
> > Thanks & Regards,
> > Samiya khanum
> >
> > --
> > This electronic communication and the information and any files
> > transmitted
> > with it, or attached to it, are confidential and are intended solely for
> > the use of the individual or entity to whom it is addressed and may
> > contain
> > information that is confidential, legally privileged, protected by
> privacy
> > laws, or otherwise restricted from disclosure to anyone else. If you are
> > not the intended recipient or the person responsible for delivering the
> > e-mail to the intended recipient, you are hereby notified that any use,
> > copying, distributing, dissemination, forwarding, printing, or copying of
> > this e-mail is strictly prohibited. If you received this e-mail in error,
> > please return the e-mail to the sender, delete it from your computer, and
> > destroy any printed copy of it.
> > -------------- next part --------------
> > An HTML attachment was scrubbed...
> > URL: <
> >
> https://mta.openssl.org/pipermail/openssl-users/attachments/20230105/d2dd2a2f/attachment-0001.htm
> > >
> > -------------- next part --------------
> > A non-text attachment was scrubbed...
> > Name: smime.p7s
> > Type: application/pkcs7-signature
> > Size: 4212 bytes
> > Desc: S/MIME Cryptographic Signature
> > URL: <
> >
> https://mta.openssl.org/pipermail/openssl-users/attachments/20230105/d2dd2a2f/attachment-0001.p7s
> > >
> >
> > ------------------------------
> >
> > Message: 2
> > Date: Fri, 06 Jan 2023 08:19:33 +0100
> > From: Richard Levitte <levitte at openssl.org>
> > To: openssl-users at openssl.org, Kamlesh Agrawal
> >         <kamlesh.agrawal at broadcom.com>
> > Subject: Re: Replacement for AES_encrypt
> > Message-ID: <871qo8ruyi.wl-levitte at openssl.org>
> > Content-Type: text/plain; charset=ISO-8859-1
> >
> > EVP_aes_128_cbc() is still usable to get the appropriate EVP_CIPHER
> > reference, but is regarded legacy.
> >
> > With OpenSSL 3.0 and providers, the new method to get the algorithm
> > you want is by fetching, in this case using EVP_CIPHER_fetch().
> >
> > In
> https://www.openssl.org/docs/man3.0/man7/crypto.html#FETCHING-EXAMPLES,
> > there is an example that demonstrates fetching exactly the algorithm
> > your asking for, "AES-128-CBC".
> >
> > If you want to know exactly what algorithms are available to you (by
> name),
> > 'openssl list' is your friend.  For example, this command shows all
> > the default cipher algorithms:
> >
> >     openssl list -cipher-algorithms
> >
> > You will notice that the output is divided into two sections,
> > "Legacy:" and "Provided:".  The latter is more future proof set of
> > names.
> >
> > Cheers,
> > Richard
> >
> > On Thu, 05 Jan 2023 13:12:57 +0100,
> > Samiya Khanum via openssl-users wrote:
> > >
> > > Hi All,
> > >
> > > We are?upgrading our code to openSSL 3.0.
> > >
> > > I have?replaced? AES_set_encrypt_key? and?AES_encrypt
> > with?EVP_CipherInit_ex, EVP_CipherUpdate
> > > and?EVP_CipherFinal_ex.
> > > In the below function what should be the cipher parameter(second
> > argument). Because in AES_encryt
> > > api, we don't?mention any block cipher.?
> > > Is it?EVP_aes_128_cbc() algorithm that?we should use?
> > >
> > > int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx,
> > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?const EVP_CIPHER *cipher, ENGINE
> *impl,
> > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?const unsigned char *key,
> > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?const unsigned char *iv, int enc);
> > > ?
> > > Thanks & Regards,
> > > Samiya khanum
> > >
> > > This electronic communication and the information and any files
> > transmitted with it, or attached
> > > to it, are confidential and are intended solely for the use of the
> > individual or entity to whom it
> > > is addressed and may contain information that is confidential, legally
> > privileged, protected by
> > > privacy laws, or otherwise restricted from disclosure to anyone else.
> If
> > you are not the intended
> > > recipient or the person responsible for delivering the e-mail to the
> > intended recipient, you are
> > > hereby notified that any use, copying, distributing, dissemination,
> > forwarding, printing, or
> > > copying of this e-mail is strictly prohibited. If you received this
> > e-mail in error, please return
> > > the e-mail to the sender, delete it from your computer, and destroy any
> > printed copy of it.
> > >
> > > [2 S/MIME Cryptographic Signature <application/pkcs7-signature
> (base64)>]
> > > Good signature from 1E45BABBADAD646C644FE256D55EFC9561AABBFF /CN=Samiya
> > Khanum/O=Broadcom Inc./L=Bangalore/ST=Karnataka/C=IN/EMail=
> > samiya.khanum at broadcom.com (trust full)
> > --
> > Richard Levitte         levitte at openssl.org
> > OpenSSL Project         http://www.openssl.org/~levitte/
> >
> >
> > ------------------------------
> >
> > Subject: Digest Footer
> >
> > _______________________________________________
> > openssl-users mailing list
> > openssl-users at openssl.org
> > https://mta.openssl.org/mailman/listinfo/openssl-users
> >
> >
> > ------------------------------
> >
> > End of openssl-users Digest, Vol 98, Issue 7
> > ********************************************
> >
>
> --
> This electronic communication and the information and any files
> transmitted
> with it, or attached to it, are confidential and are intended solely for
> the use of the individual or entity to whom it is addressed and may
> contain
> information that is confidential, legally privileged, protected by privacy
> laws, or otherwise restricted from disclosure to anyone else. If you are
> not the intended recipient or the person responsible for delivering the
> e-mail to the intended recipient, you are hereby notified that any use,
> copying, distributing, dissemination, forwarding, printing, or copying of
> this e-mail is strictly prohibited. If you received this e-mail in error,
> please return the e-mail to the sender, delete it from your computer, and
> destroy any printed copy of it.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> https://mta.openssl.org/pipermail/openssl-users/attachments/20230106/5da28ac4/attachment.htm
> >
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: smime.p7s
> Type: application/pkcs7-signature
> Size: 4212 bytes
> Desc: S/MIME Cryptographic Signature
> URL: <
> https://mta.openssl.org/pipermail/openssl-users/attachments/20230106/5da28ac4/attachment.p7s
> >
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> openssl-users mailing list
> openssl-users at openssl.org
> https://mta.openssl.org/mailman/listinfo/openssl-users
>
>
> ------------------------------
>
> End of openssl-users Digest, Vol 98, Issue 8
> ********************************************
>

-- 
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mta.openssl.org/pipermail/openssl-users/attachments/20230216/2eef5fcf/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4212 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://mta.openssl.org/pipermail/openssl-users/attachments/20230216/2eef5fcf/attachment-0001.p7s>


More information about the openssl-users mailing list