Open ElenaTyuleneva opened 1 year ago
The version 8.3.1 you have used is correct an it sees the building process was successful as well. The problem is that the functions you want to use are internal functions so they are not exported from the library. Instead, you need to use the EVP interface.
Here is an example on how to use SM2 for encryption/decryption: https://www.yuque.com/tsdoc/ts/zx1bok
For sm2_compute_z_digest and SM2_compute_key, I don't think there is a way to call them outside the library yet.
Note: if you don't want to follow the normal sttyle (using EVP interface), you can always do some modification to your application and Tongsuo library to break the internal fence to use those sm2_ prefixed functions directly. You could probably refer to test/sm2_internal_test.c
in branch 8.3-stable to find out how to do that.
Thank you very much for the answer! I'll try to follow your instructions.
Hello! I'm struggling with the build of the BabaSSL library under Windows. I need the support of the following functions: _sm2_ciphertext_size sm2_encrypt sm2_plaintext_size sm2_decrypt sm2_compute_z_digest SM2_computekey
And I cannot identify the right version of BabaSSL to use (the one which has support for the specified algorithms). I can see, that these functions exist in BabaSSL8.3.1 (at least, I see them in the source code). I tried to build the library with the following commands:
The library was built successfully, but when I try to link it to my application, I can see linkage errors: (there are the same errors for all other SM2 API)
Could you please help me to identify what I do wrong? (another version to use? another build command to execute?)
Thanks in advance, Elena