=pod =encoding utf8 =head1 NAME ECRS_SIG_new, ECRS_SIG_free, i2d_ECRS_SIG, d2i_ECRS_SIG, ECRS_do_sign, ECRS_do_verify, ECRS_size, ECRS_sign, ECRS_verify - EC Ring Signature Algorithm =head1 SYNOPSIS #include ECRS_SIG *ECRS_SIG_new(void); void ECRS_SIG_free(ECRS_SIG *sig); int i2d_ECRS_SIG(const ECRS_SIG *sig, unsigned char **pp); ECRS_SIG *d2i_ECRS_SIG(ECRS_SIG **sig, const unsigned char **pp, long len); ECRS_SIG *ECRS_do_sign(const EVP_MD *md, const unsigned char *dgst, int dgstlen, STACK_OF(EC_KEY) *pub_keys, EC_KEY *ec_key); int ECRS_do_verify(const EVP_MD *md, const unsigned char *dgst, int dgstlen, const ECRS_SIG *sig, STACK_OF(EC_KEY) *pub_keys); int ECRS_size(const EC_KEY *ec_key, int n); int ECRS_sign(int type, const unsigned char *dgst, int dgstlen, unsigned char *sig, unsigned int *siglen, STACK_OF(EC_KEY) *pub_keys, EC_KEY *ec_key); int ECRS_verify(int type, const unsigned char *dgst, int dgstlen, const unsigned char *sig, int siglen, STACK_OF(EC_KEY) *pub_keys); =head1 DESCRIPTION Applications should use the higher level functions L etc. instead of calling the hash functions directly. SM3 (ShangMi#3 Hash Algorithm) is a cryptographic hash function with a 256 bit output. sm3() computes the SM3 message digest of the B bytes at B and places it in B (which must have space for SHA_DIGEST_LENGTH == 20 bytes of output). If B is NULL, the digest is placed in a static array. Note: setting B to NULL is B. The following functions may be used if the message is not completely stored in memory: sm3_nit() initializes a B structure. sm3_update() can be called repeatedly with chunks of the message to be hashed (B bytes at B). sm3_final() places the message digest in B, which must have space for SM3_DIGEST_LENGTH == 32 bytes of output, and erases the B. =head1 RETURN VALUES sm3_init(), sm3_update(), sm3_final(), sm3_compress() and sm3() return void. =head1 CONFORMING TO GM/T 0004-2012 SM3 Cryptogrpahic Hash Algorithm. =head1 SEE ALSO L =head1 COPYRIGHT Copyright 2014-2019 The GmSSL Project. All Rights Reserved. Licensed under the GmSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at L. =cut