Giter VIP home page Giter VIP logo

Comments (7)

Retropotenza avatar Retropotenza commented on July 18, 2024 1

Hello, I've created openssl/openssl#8911 for this.

from cryptodev-linux.

cristian-stoica avatar cristian-stoica commented on July 18, 2024

Such a patch looks extensive: I have no idea how clean it would be or what will break, if anything.

On the other hand OpenSSL moved to devcrypto where they added another check with !defined(CHECK_BSD_STYLE_MACROS). This looks like it should work as is. Doesn't it?

from cryptodev-linux.

cristian-stoica avatar cristian-stoica commented on July 18, 2024

I have no idea what was going on at the time but this looks like an OpenSSL issue:
Original commit openssl/openssl@6ecbc2b was cherry-picked and perpetuated ever since

from cryptodev-linux.

Retropotenza avatar Retropotenza commented on July 18, 2024

CHECK_BSD_STYLE_MACROS looks to be defined if CRYPTO_ALGORITHM_MIN is defined, but I'm not able to find anyplace where CRYPTO_ALGORITHM_MIN is :-(...

But yes, in the master branch of OpenSSL the engine should work as is.

Other versions of OpenSSL instead will be affected. The commit openssl/openssl@6ecbc2b was working correctly only with the BSD cryptodev.

from cryptodev-linux.

cristian-stoica avatar cristian-stoica commented on July 18, 2024

By the looks of it, this is an issue with (now) older versions of OpenSSL. If necessary they can be patched more easily than we can adapt cryptodev to make it work with them.
I'm sorry but an extensive patch on our part doesn't seem such a good idea right now.

from cryptodev-linux.

Retropotenza avatar Retropotenza commented on July 18, 2024

I agree that this is an issue with older versions of OpenSSL. I think that I found a way to keep both defines and enums, even if the final resulting code looks ugly (see https://github.com/Retropotenza/cryptodev-linux/blob/master/crypto/cryptodev.h).

This header aims to keep compatibility with both the original BSD header, and the enum definition of cryptodev-linux. It should allows to use cryptodev-linux with any source code that was existing before (whether expecting defines or enums).

from cryptodev-linux.

cristian-stoica avatar cristian-stoica commented on July 18, 2024

@Retropotenza I don't see a compelling reason for a fix in cryptodev.

Obviously the macro is defined in BSD so they have no problem and cryptodev-linux had support for AES-CTR when OpenSSL introduced the patch openssl/openssl@6ecbc2b . If they found it necessary to avoid offloading AES_CTR it was because of an non-obvious issue that I can only speculate on. Nikos was in charge so he could have made necessary fixes.

There is also the issue of API which was very loose: cryptodev-linux worked very well a long time without relying on macros instead of enums. OpenSSL even introduced in recent versions CHECK_BSD_STYLE_MACROS and that should make cryptodev-linux work as is.

This is an problem with OpenSSL1.0.2 and other older versions of OpenSSL.
If people find it necessary to incorporate such a change, OK. But I would like to hear more arguments before we proceed.

from cryptodev-linux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.