sm2 test vector

This commit is contained in:
Zhi Guan
2016-05-02 17:56:14 +02:00
parent d8072491bc
commit addcac4896
34 changed files with 1245 additions and 3023 deletions

View File

@@ -1,6 +1,6 @@
/* crypto/sm2/sm2_locl.h */
/* ====================================================================
* Copyright (c) 2015 The GmSSL Project. All rights reserved.
* Copyright (c) 2015-2016 The GmSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -58,15 +58,16 @@
extern "C" {
#endif
typedef struct sm2_data_st {
int (*init)(EC_KEY *);
ENGINE *engine;
int flags;
const ECDSA_METHOD *sign_meth;
const ECDH_METHOD *kap_meth; /* FIXME: SM2 KAP is different from ECDH */
CRYPTO_EX_DATA ex_data;
} SM2_DATA;
struct sm2sign_method {
const char *name;
SM2_SIG *(*sm2_do_sign)(const unsigned char *dgst, int dgstlen);
int (*sm2_sign_setup)(void);
int (*sm2_do_verify)(void);
int flag;
void *app_data;
};
SM2_DATA *sm2_check(EC_KEY *eckey);
#ifdef __cplusplus