Endianness of EVP_PKEY_encryp output

Viken Kondakji Viken.Kondakji at Instinet.com
Wed Apr 5 13:06:53 UTC 2023


Thank you Viktor!

-----Original Message-----
From: openssl-users <openssl-users-bounces at openssl.org> On Behalf Of Viktor Dukhovni
Sent: Wednesday, April 5, 2023 9:03 AM
To: openssl-users at openssl.org
Subject: Re: Endianness of EVP_PKEY_encryp output

Caution: External EmailThis email originated from an external source. If this email appears suspicious or you are uncertain of its authenticity, do not click any links or attachments or otherwise act upon it until you have consulted your local Instinet Help Desk.

On Wed, Apr 05, 2023 at 12:34:09PM +0000, Viken Kondakji wrote:
> Re my question about endianness, I am not in control.
> I am required to do what the target destination tells me to do.  It is that simple.
> 
> So, I ask again:
> Will the binary output of the EVP_PKEY_encrypt on a small-endian host produce binary data in big-endian?
> Can anyone help, please.

The output is a bytestring not an integer, so the endianness question is not applicable.  That said, the serialisation of primitive RSA encryption operation results is "big-endian" per various specifications.

You still should not use (or at least treat with great scepticisim) any protocol where you're performing raw RSA encryption operations.

-- 
    Viktor.

****Disclaimer****This message, including all attachments, is private and confidential, may contain proprietary or privileged information and material and is intended solely for use by the named addressee(s). If you receive this transmission in error, please immediately notify the sender and destroy this message in its entirety, whether in electronic or hard copy format. Any unauthorized use (and reliance thereon), copying, disclosure, retention, or distribution of this transmission or the material herein is forbidden. We reserve the right to retain, monitor, intercept and archive electronic communications. This message does not constitute an offer or solicitation with respect to the purchase or sale of any security. It should not be construed to contain any recommendation regarding any security or strategy unless expressly stated therein. Any reference to the terms of executed transactions should be treated as preliminary only and subject to formal written confirmation. Any views expressed are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity. This message is provided on an “as is” basis. It contains material that is owned by Instinet Incorporated, its subsidiaries or its or their licensors, and may not, in whole or in part, be (i) copied, photocopied or duplicated in any form, by any means, or (ii) redistributed, posted, published, excerpted, or quoted without Instinet Incorporated's prior written consent. No confidentiality or privilege is waived or lost by any mistransmission of this message. Instinet, LLC (member SIPC) and Instinet Canada Limited, Member – Canadian Investor Protection Fund are subsidiaries of Instinet Incorporated that are locally registered or otherwise authorized to provide securities brokerage products and services. Please refer to the following links for additional disclosures and disclaimers that apply to this message. In the United States: http://instinet.com/docs/legal/le_disclaimers.html. In Canada: http://www.instinet.com/docs/legal/le_ca_disclosures.html. Canadian residents: You are receiving this electronic communication because of your existing relationship with Instinet Canada Limited or an authorized affiliate. Canadian residents who wish to unsubscribe from commercial electronic messages: please e-mail iclcompliance at instinet.com. Please note that you will continue to receive non-commercial electronic messages, such as account statements, invoices, client communications, and other similar factual electronic communications.
For recipients of Wolfe research, please see https://www.nomuranow.com/research/globalresearchportal/pages/disclosures/disclosures.aspx. for important research-related disclosures.


More information about the openssl-users mailing list