Lines Matching refs:desc
27 const char *desc; /* Description of the curve. */ member
52 .desc = "sm2p256v1",
113 ec->name = ecp->desc; in sm2_ec_ctx_init()
222 static int sm2_z_digest_update(struct shash_desc *desc, in sm2_z_digest_update() argument
236 err = crypto_shash_update(desc, zero, pbytes - inlen) ?: in sm2_z_digest_update()
237 crypto_shash_update(desc, in, inlen); in sm2_z_digest_update()
240 err = crypto_shash_update(desc, in + inlen - pbytes, pbytes); in sm2_z_digest_update()
242 err = crypto_shash_update(desc, in, inlen); in sm2_z_digest_update()
249 static int sm2_z_digest_update_point(struct shash_desc *desc, in sm2_z_digest_update_point() argument
260 sm2_z_digest_update(desc, x, pbytes) ?: in sm2_z_digest_update_point()
261 sm2_z_digest_update(desc, y, pbytes); in sm2_z_digest_update_point()
268 int sm2_compute_z_digest(struct shash_desc *desc, in sm2_compute_z_digest() argument
296 err = crypto_shash_init(desc); in sm2_compute_z_digest()
300 err = crypto_shash_update(desc, entl, 2); in sm2_compute_z_digest()
304 err = crypto_shash_update(desc, SM2_DEFAULT_USERID, in sm2_compute_z_digest()
309 err = sm2_z_digest_update(desc, ec->a, pbytes) ?: in sm2_compute_z_digest()
310 sm2_z_digest_update(desc, ec->b, pbytes) ?: in sm2_compute_z_digest()
311 sm2_z_digest_update_point(desc, ec->G, ec, pbytes) ?: in sm2_compute_z_digest()
312 sm2_z_digest_update_point(desc, ec->Q, ec, pbytes); in sm2_compute_z_digest()
316 err = crypto_shash_final(desc, dgst); in sm2_compute_z_digest()