1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * sm2.h - SM2 asymmetric public-key algorithm
4 * as specified by OSCCA GM/T 0003.1-2012 -- 0003.5-2012 SM2 and
5 * described at https://tools.ietf.org/html/draft-shen-sm2-ecdsa-02
7 * Copyright (c) 2020, Alibaba Group.
8 * Written by Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
14 #include <crypto/sm3.h>
15 #include <crypto/akcipher.h>
17 /* The default user id as specified in GM/T 0009-2012 */
18 #define SM2_DEFAULT_USERID "1234567812345678"
19 #define SM2_DEFAULT_USERID_LEN 16
21 extern int sm2_compute_z_digest(struct crypto_akcipher *tfm,
22 const unsigned char *id, size_t id_len,
23 unsigned char dgst[SM3_DIGEST_SIZE]);
25 #endif /* _CRYPTO_SM2_H */