-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a sample of SM2 encryption and decryption? #59
Comments
Hello @xiaonan-INTC ! Unfortunately, IPP Crypto doesn't have such a sample now. I can provide you here at least a brief pseudo-code showing this functionality usage, but I need one more detail from your side. Are you interested in FYI: |
Thanks for the reply, ElenaTyuleneva, In fact what I want to learn is, how to write a program realizing SM2 encryption and decryption,
|
The choice of the API highly depends on your use case. The underlying algorithms for these APIs are different, so to do the right choice I highly recommend you get familiar with the standards, that I've provided above.
Here are the steps specified in IPP Crypto developer reference :
|
hi, @ElenaTyuleneva , I learned that ippsGFpECEncryptSM2_Ext()/ippsGFpECDecryptSM2_Ext() are in GM/T 0003.4-2012 SM2(CSTC) But another standard NISSTC is the same as CSTC: https://gist.github.com/romen/d752b8d1897bc1a0009017511770de06. But for ippsGFpECESEncrypt_SM2()/ippsGFpECESDecrypt_SM2() I didn't find they are in any standard... So what are their differences? |
ippsGFpECESEncrypt_SM2/ippsGFpECESDecrypt_SM2 and ippsGFpECEncryptSM2_Ext/ippsGFpECDecryptSM2_Ext are two sets of APIs for SM2 encryption and decryption. The main difference between them is the different standards they are based on. ippsGFpECESEncrypt_SM2/ippsGFpECESDecrypt_SM2: These APIs are based on IEEE Std 1363A-2004 standard1. ippsGFpECEncryptSM2_Ext/ippsGFpECDecryptSM2_Ext: These APIs are based on GM/T 0003-2012 standard2. The implementation of IEEE Std 1363A-2004 standard may be more suitable for international encryption needs. |
dear ipp-crypto guys,
Does ipp-crypto have a sample code of SM2 encryption and decryption? Since it is different from RSA and its algorithm is too complicated...
The text was updated successfully, but these errors were encountered: