Add accurate asn.1 siganture/ciphertext size

This commit is contained in:
Zhi Guan
2018-12-04 15:56:21 +08:00
parent c0ee87b077
commit bc2bb8a335
13 changed files with 5628 additions and 131 deletions

View File

@@ -131,7 +131,7 @@ int SM2_decrypt(int type, const unsigned char *in, size_t inlen,
#define SM2_decrypt_with_recommended(in,inlen,out,outlen,ec_key) \
SM2_decrypt(NID_sm3,in,inlen,out,outlen,ec_key)
int SM2CiphertextValue_size(const EC_GROUP *group, int inlen);
int SM2CiphertextValue_size(const EC_GROUP *group, size_t inlen);
/* SM2 Key Exchange */
@@ -255,6 +255,7 @@ int ERR_load_SM2_strings(void);
/* Function codes. */
# define SM2_F_I2O_SM2CIPHERTEXTVALUE 107
# define SM2_F_O2I_SM2CIPHERTEXTVALUE 108
# define SM2_F_SM2CIPHERTEXTVALUE_SIZE 109
# define SM2_F_SM2_DECRYPT 100
# define SM2_F_SM2_DO_DECRYPT 101
# define SM2_F_SM2_DO_ENCRYPT 102
@@ -277,10 +278,11 @@ int ERR_load_SM2_strings(void);
# define SM2_R_KDF_FAILURE 109
# define SM2_R_MISSING_PARAMETERS 111
# define SM2_R_NEED_NEW_SETUP_VALUES 112
# define SM2_R_PLAINTEXT_TOO_LONG 114
# define SM2_R_RANDOM_NUMBER_GENERATION_FAILED 113
# ifdef __cplusplus
# ifdef __cplusplus
}
# endif
# endif
#endif
#endif