acvpparser
acvpparser copied to clipboard
Build acvp for Mac Arm
Hi, there,
I have been able to build acvp for x86 mac with:
- brew install gcc
- make clean make CC=/usr/local/bin/gcc-11 openssl
I could build with editing the source file to change some compilation errors.
Then I want to build the Mac Arm:
-
brew tap ArmMbed/homebrew-formulae brew install arm-none-eabi-gcc
-
make clean
make CC=/usr/local/bin/arm-none-eabi-gcc openssl
But I have tones of undefined symbol for my openssl lib functions.
My openssl library was built with cc(clang) complier. But if I tried clang with acvp source code, it is not working.
Do u have any suggestions how to make it work?
Thanks.
Am Donnerstag, 15. Dezember 2022, 01:19:47 CET schrieb amywww:
Hi amywww,
Hi, there,
I have been able to build acvp for x86 mac with:
- brew install gcc
- make clean make CC=/usr/local/bin/gcc-11 openssl
I could build with editing the source file to change some compilation errors.
The builds without changes when using Xcode. Only for the backend of your choice, you need the respective development environment to be present.
Then I want to build the Mac Arm:
brew tap ArmMbed/homebrew-formulae brew install arm-none-eabi-gcc
make clean
make CC=/usr/local/bin/arm-none-eabi-gcc openssl
But I have tones of undefined symbol for my openssl lib functions.
My openssl library was built with cc(clang) complier. But if I tried clang with acvp source code, it is not working.
Do u have any suggestions how to make it work?
What about simply install your fipsified(!) OpenSSL including the associated header files with, say, brew.
And then compile the parser with the Xcode command line tool: make openssl
Thanks.
Ciao Stephan
Hi Stephan,
Thanks for your reply.
Actually we did some testing running the x86 build on Arm. Some test cases are ok and some return error -22 or -14.
Can you help to take a look why there is error and how to fix it?
Thanks, Yanhua
parsed_flags 1, entry flags 1)
\cf3 ACVPParser (10:41:55) Debug [backends/backend_openssl_common.c:openssl_md_convert:394]: \cf2 SHA = HMAC-SHA-1
\cf3 ACVPParser (10:41:55) Debug [backends/backend_openssl.c:openssl_hmac_generate:1019]: \cf2 taglen = 20
ACVPParser (10:41:55) Debug [backends/backend_openssl.c:openssl_hmac_generate:1020]: key = 223bf593c3b7d9b0cc7620726dce436e0921ee49438674d864dbc903e9b5182e57572a299560d30b2ccd16e53b1b72b4ac360e7d3b50c84c648af397c3067de3
ACVPParser (10:41:55) Debug [backends/backend_openssl.c:openssl_hmac_generate:1021]: msg = 1de389907062b797eaa84c59650cf870
\cf5 ACVPParser (10:41:55) Warning [backends/backend_openssl.c:openssl_hmac_generate:1026]: \cf2 HMAC failed: error:2D06C071:FIPS routines:func(108):reason(113)
\cf3 ACVPParser (10:41:55) Debug [parser/parser_common.c:exec_test:406]: \cf2 Failure with return code -22
\cf5 ACVPParser (10:41:55) Warning [parser/parser_common.c:exec_test:442]: \cf2 Test execution failed with error -22
\cf6 ACVPParser (10:41:55) Error [parser/parser_common.c:parse_array:824]: \cf2 Test execution failed
\cf3 ACVPParser (10:41:55) Debug [parser/parser_common.c:vector_free_entry:83]: \cf2 Freeing entry msg with data type 0
\cf3 ACVPParser (10:41:55) Debug [parser/parser_common.c:vector_free_entry:83]: \cf2 Freeing entry key with data type 0
\cf3 ACVPParser (10:41:55) Debug [parser/parser_common.c:vector_free_entry:83]: \cf2 Freeing entry mac with data type 13
\cf5 ACVPParser (10:41:55) Warning [parser/parser_common.c:parse_one_entry:1081]: \cf2 Searched object: tests
\cf3 ACVPParser (10:41:55) Debug [parser/parser_common.c:parse_all_processdata:1137]: \cf2 Failure with return code -22\
43D35BB799412CACDE846322FB292CB0F97DCF49F46012608E9C6798BC2EDECF
\cf3 ACVPParser (10:41:55) Debug [parser/parser_common.c:match_entry:54]: \cf2 Matching ephemeralPublicServerY (parsed_flags 281749854617601, entry flags 862291994083329)
\cf3 ACVPParser (10:41:55) Debug [parser/parser_common.c:parse_one_entry:952]: \cf2 Get binary data for ephemeralPublicServerY
\cf3 ACVPParser (10:41:55) Debug [parser/read_json.c:json_get_bin:181]: \cf2 Found binary data for key ephemeralPublicServerY with value E76C9E609375A6A68CBE2BD790AAC4FE92E649DCA3F51DB32EAC93D3023B410A
\cf3 ACVPParser (10:41:55) Debug [parser/parser_common.c:match_entry:54]: \cf2 Matching callback (parsed_flags 281749854617601, entry flags 879540582744065)
\cf3 ACVPParser (10:41:55) Debug [backends/backend_openssl_common.c:_openssl_ecdsa_curves:547]: \cf2 curve : 18014398543036416
\cf6 ACVPParser (10:41:55) Error [backends/backend_openssl.c:openssl_ecdh_ss_common:3572]: \cf2 Cannot generate local key error:1011C099:elliptic curve routines:ec_scalar_mul_ladder:ladder pre failure
\cf3 ACVPParser (10:41:55) Debug [parser/parser_ecdh.c:kas_ecc_r3_ssc_helper:306]: \cf2 Failure with return code -14
\cf3 ACVPParser (10:41:55) Debug [parser/parser_common.c:exec_test:393]: \cf2 Failure with return code -14
\cf5 ACVPParser (10:41:55) Warning [parser/parser_common.c:exec_test:442]: \cf2 Test execution failed with error -14
\cf6 ACVPParser (10:41:55) Error [parser/parser_common.c:parse_array:824]: \cf2 Test execution failed
\cf3 ACVPParser (10:41:55) Debug [parser/parser_common.c:vector_free_entry:83]: \cf2 Freeing entry ephemeralPublicServerX with data type 0
\cf3 ACVPParser (10:41:55) Debug [parser/parser_common.c:vector_free_entry:83]: \cf2 Freeing entry ephemeralPublicServerY with data type 0
\cf3 ACVPParser (10:41:55) Debug [parser/parser_common.c:vector_free_entry:83]: \cf2 Freeing entry ephemeralPublicIutX with data type 13
\cf3 ACVPParser (10:41:55) Debug [parser/parser_common.c:vector_free_entry:83]: \cf2 Freeing entry ephemeralPublicIutY with data type 13
\cf3 ACVPParser (10:41:55) Debug [parser/parser_common.c:vector_free_entry:83]: \cf2 Freeing entry ephemeralPrivateIut with data type 13
\cf5 ACVPParser (10:41:55) Warning [parser/parser_common.c:parse_one_entry:1081]: \cf2 Searched object: tests
\cf3 ACVPParser (10:41:55) Debug [parser/parser_common.c:parse_all_processdata:1137]: \cf2 Failure with return code -14
\cf6 ACVPParser (10:41:55) Error [parser/parser_common.c:parse_array:819]: \cf2 Parsing processdata failed
\cf3 ACVPParser (10:41:55) Debug [parser/parser_common.c:vector_free_entry:114]: \cf2 Freeing entry domainParameterGenerationMode with data type 6
\cf3 ACVPParser (10:41:55) Debug [parser/parser_common.c:vector_free_entry:114]: \cf2 Freeing entry hashFunctionZ with data type 6
\cf3 ACVPParser (10:41:55) Debug [parser/parser_common.c:vector_free_entry:114]: \cf2 Freeing entry domainParameterGenerationMode with data type 6
\cf3 ACVPParser (10:41:55) Debug [parser/parser_common.c:vector_free_entry:114]: \cf2 Freeing entry hashFunctionZ with data type 6\
The parser requires the OpenSSL FIPS bits.