GithubHelp home page GithubHelp logo

Comments (8)

Hippeys avatar Hippeys commented on May 26, 2024

this is also my user_settings.h:

#undef  NO_AES
#define NO_AES

#undef  NO_DSA
#define NO_DSA

#undef  HAVE_ECC
#define HAVE_ECC

#undef  HAVE_HASHDRBG
#define HAVE_HASHDRBG

#undef  WOLFSSL_HAVE_SP_ECC
#define WOLFSSL_HAVE_SP_ECC

#undef  WC_NO_ASYNC_THREADING
#define WC_NO_ASYNC_THREADING

#undef  NO_ERROR_STRINGS
#define NO_ERROR_STRINGS

#undef  NO_OLD_TLS
#define NO_OLD_TLS

#undef  WOLFSSL_NO_TLS12
#define WOLFSSL_NO_TLS12

#undef  WC_NO_RSA_OAEP
#define WC_NO_RSA_OAEP

#undef  NO_DH
#define NO_DH

#undef  WOLFSSL_NO_SHAKE128
#define WOLFSSL_NO_SHAKE128

#undef  WOLFSSL_NO_SHAKE256
#define WOLFSSL_NO_SHAKE256

#undef  NO_FILESYSTEM
#define NO_FILESYSTEM

#undef  NO_RC4
#define NO_RC4

#undef  NO_PSK
#define NO_PSK

#undef  NO_MD4
#define NO_MD4

#undef  WOLFCRYPT_ONLY
#define WOLFCRYPT_ONLY

#undef  NO_DES3
#define NO_DES3

#undef  NO_DO178
#define NO_DO178

#undef  NO_KDF
#define NO_KDF

#undef  NO_PWDBASED
#define NO_PWDBASED

#undef  NO_SIG_WRAPPER
#define NO_SIG_WRAPPER

#undef  USE_INTEL_SPEEDUP
#define USE_INTEL_SPEEDUP

#undef  WOLFSSL_HAVE_ATOMIC_H
#define WOLFSSL_HAVE_ATOMIC_H

#undef  HAVE_THREAD_LS
#define HAVE_THREAD_LS

#undef  ERROR_QUEUE_PER_THREAD
#define ERROR_QUEUE_PER_THREAD

#undef  TFM_TIMING_RESISTANT
#define TFM_TIMING_RESISTANT

#undef  ECC_TIMING_RESISTANT
#define ECC_TIMING_RESISTANT

#undef  WC_RSA_BLINDING
#define WC_RSA_BLINDING

#undef  WOLFSSL_USE_ALIGN
#define WOLFSSL_USE_ALIGN

#undef  WOLFSSL_ASN_TEMPLATE
#define WOLFSSL_ASN_TEMPLATE

#undef  HAVE_CHACHA
#define HAVE_CHACHA

#undef  HAVE_POLY1305
#define HAVE_POLY1305

#undef  HAVE_TLS_EXTENSIONS
#define HAVE_TLS_EXTENSIONS

#undef  HAVE_SNI
#define HAVE_SNI

#undef  HAVE_ENCRYPT_THEN_MAC
#define HAVE_ENCRYPT_THEN_MAC

#undef  WOLFSSL_HAVE_SP_RSA
#define WOLFSSL_HAVE_SP_RSA

#undef  WOLFSSL_SP_LARGE_CODE
#define WOLFSSL_SP_LARGE_CODE

#undef  WOLFSSL_SP
#define WOLFSSL_SP

#undef  WOLFSSL_SP_MATH_ALL
#define WOLFSSL_SP_MATH_ALL

#undef  WOLFSSL_SP_X86_64
#define WOLFSSL_SP_X86_64

#undef  GCM_TABLE_4BIT
#define GCM_TABLE_4BIT

#undef  WOLFSSL_TEST_STATIC_BUILD
#define WOLFSSL_TEST_STATIC_BUILD

#undef  HAVE_WC_INTROSPECTION
#define HAVE_WC_INTROSPECTION

#if defined (_WIN64 )
#undef  WOLFSSL_X86_64_BUILD
#define WOLFSSL_X86_64_BUILD

#undef  WOLFSSL_SP_ASM
#define WOLFSSL_SP_ASM

#undef  WOLFSSL_SP_X86_64_ASM
#define WOLFSSL_SP_X86_64_ASM

#undef  WOLFSSL_AESNI
#define WOLFSSL_AESNI
#endif

from wolfssl.

kareem-wolfssl avatar kareem-wolfssl commented on May 26, 2024

Thanks for the report and the additional information. I'm working on reproducing this here. Will keep you updated.

from wolfssl.

kareem-wolfssl avatar kareem-wolfssl commented on May 26, 2024

Hi @Hippeys ,

I tried reproducing your issue on Linux and I was not able to reproduce it here. I am working on getting everything set up on Windows + Visual Studio to try reproducing it there.
Can you print the tags from wolf and OpenSSL and attach them here?

from wolfssl.

Hippeys avatar Hippeys commented on May 26, 2024

@kareem-wolfssl yes, on x64 linux, x86 windows all is ok, issue exists when targeting x64 windows.
I will send tag examples soon

from wolfssl.

kareem-wolfssl avatar kareem-wolfssl commented on May 26, 2024

@Hippeys I'm also unable to reproduce on Windows x64, using Visual Studio 2022, wolfSSL 5.6.6 + OpenSSL 3.2.0.
I did have to modify your user_settings.h to not use Chacha/Poly assembly as these aren't supported in Visual Studio:

#define NO_CHACHA_ASM
#undef USE_INTEL_SPEEDUP

Can you confirm if you are using Chacha/Poly assembly in Visual Studio somehow? Are you using Clang in VS?

from wolfssl.

kareem-wolfssl avatar kareem-wolfssl commented on May 26, 2024

@Hippeys I was informed about your previous issue for Chacha/Poly assembly on Windows and I see my colleage Sean's PR for it. I will give it a try here.

from wolfssl.

Hippeys avatar Hippeys commented on May 26, 2024

@kareem-wolfssl I dont use masm code for chacha20 yet, so you dont need to try this yet. Yes, i tried now to undef USE_INTEL_SPEEDUP and works correctly. But the strange thing is that even if i remove asm code for chacha and poly1305 manually problem still exists. Steps to reproduce:

  1. Clone current WolfSSL repository
  2. inside sha256.c add line #undef USE_INTEL_SPEEDUP
  3. inside poly1305.c add line #undef USE_INTEL_SPEEDUP
  4. in user_settings.h add lines from my previous post and also add #define NO_CHACHA_ASM

So this will keep intel speedup for the rest of library, like for sp_x86_64 etc, but will remove asm code from sha256, poly1305 and chacha20 and will compile ok, but still WolfSSL generate different tag than OpenSSL.
So question is why even if remove manually speedup for chacha20 and poly1305 it still generate wrong tag?

from wolfssl.

kareem-wolfssl avatar kareem-wolfssl commented on May 26, 2024

Thanks, I'm able to reproduce the issue here with your instructions. I'm looking into this with the team.

from wolfssl.

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.