Home
last modified time | relevance | path

Searched refs:dsa (Results 1 – 25 of 154) sorted by relevance

1234567

/third_party/openssl/crypto/dsa/
Ddsa_ossl.c18 static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);
19 static int dsa_sign_setup_no_digest(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp,
21 static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp,
24 DSA_SIG *sig, DSA *dsa);
25 static int dsa_init(DSA *dsa);
26 static int dsa_finish(DSA *dsa);
62 static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) in dsa_do_sign() argument
71 if (dsa->p == NULL || dsa->q == NULL || dsa->g == NULL) { in dsa_do_sign()
75 if (dsa->priv_key == NULL) { in dsa_do_sign()
99 if (!dsa_sign_setup(dsa, ctx, &kinv, &ret->r, dgst, dlen)) in dsa_do_sign()
[all …]
Ddsa_ameth.c30 DSA *dsa = NULL; in dsa_pub_decode() local
41 if ((dsa = d2i_DSAparams(NULL, &pm, pmlen)) == NULL) { in dsa_pub_decode()
47 if ((dsa = DSA_new()) == NULL) { in dsa_pub_decode()
61 if ((dsa->pub_key = ASN1_INTEGER_to_BN(public_key, NULL)) == NULL) { in dsa_pub_decode()
67 EVP_PKEY_assign_DSA(pkey, dsa); in dsa_pub_decode()
72 DSA_free(dsa); in dsa_pub_decode()
79 DSA *dsa; in dsa_pub_encode() local
87 dsa = pkey->pkey.dsa; in dsa_pub_encode()
88 if (pkey->save_parameters && dsa->p && dsa->q && dsa->g) { in dsa_pub_encode()
94 str->length = i2d_DSAparams(dsa, &str->data); in dsa_pub_encode()
[all …]
Ddsa_key.c16 static int dsa_builtin_keygen(DSA *dsa);
18 int DSA_generate_key(DSA *dsa) in DSA_generate_key() argument
20 if (dsa->meth->dsa_keygen) in DSA_generate_key()
21 return dsa->meth->dsa_keygen(dsa); in DSA_generate_key()
22 return dsa_builtin_keygen(dsa); in DSA_generate_key()
25 static int dsa_builtin_keygen(DSA *dsa) in dsa_builtin_keygen() argument
34 if (dsa->priv_key == NULL) { in dsa_builtin_keygen()
38 priv_key = dsa->priv_key; in dsa_builtin_keygen()
41 if (!BN_priv_rand_range(priv_key, dsa->q)) in dsa_builtin_keygen()
45 if (dsa->pub_key == NULL) { in dsa_builtin_keygen()
[all …]
Ddsa_pmeth.c78 DSA *dsa = ctx->pkey->pkey.dsa; in pkey_dsa_sign() local
83 ret = DSA_sign(0, tbs, tbslen, sig, &sltmp, dsa); in pkey_dsa_sign()
97 DSA *dsa = ctx->pkey->pkey.dsa; in pkey_dsa_verify() local
102 ret = DSA_verify(0, tbs, tbslen, sig, siglen, dsa); in pkey_dsa_verify()
197 DSA *dsa = NULL; in pkey_dsa_paramgen() local
209 dsa = DSA_new(); in pkey_dsa_paramgen()
210 if (dsa == NULL) { in pkey_dsa_paramgen()
214 ret = dsa_builtin_paramgen(dsa, dctx->nbits, dctx->qbits, dctx->pmd, in pkey_dsa_paramgen()
218 EVP_PKEY_assign_DSA(pkey, dsa); in pkey_dsa_paramgen()
220 DSA_free(dsa); in pkey_dsa_paramgen()
[all …]
Ddsa_local.h43 DSA_SIG *(*dsa_do_sign) (const unsigned char *dgst, int dlen, DSA *dsa);
44 int (*dsa_sign_setup) (DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp,
47 DSA_SIG *sig, DSA *dsa);
48 int (*dsa_mod_exp) (DSA *dsa, BIGNUM *rr, const BIGNUM *a1,
52 int (*bn_mod_exp) (DSA *dsa, BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
54 int (*init) (DSA *dsa);
55 int (*finish) (DSA *dsa);
59 int (*dsa_paramgen) (DSA *dsa, int bits,
64 int (*dsa_keygen) (DSA *dsa);
Ddsa_sign.c14 DSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) in DSA_do_sign() argument
16 return dsa->meth->dsa_do_sign(dgst, dlen, dsa); in DSA_do_sign()
20 int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp) in DSA_sign_setup() argument
22 return dsa->meth->dsa_sign_setup(dsa, ctx_in, kinvp, rp); in DSA_sign_setup()
Ddsa_asn1.c105 DSA *DSAparams_dup(DSA *dsa)
107 return ASN1_item_dup(ASN1_ITEM_rptr(DSAparams), dsa);
111 unsigned char *sig, unsigned int *siglen, DSA *dsa) in DSA_sign() argument
115 s = DSA_do_sign(dgst, dlen, dsa); in DSA_sign()
133 const unsigned char *sigbuf, int siglen, DSA *dsa) in DSA_verify() argument
150 ret = DSA_do_verify(dgst, dgst_len, s, dsa); in DSA_verify()
Ddsa_vrf.c14 DSA *dsa) in DSA_do_verify() argument
16 return dsa->meth->dsa_do_verify(dgst, dgst_len, sig, dsa); in DSA_do_verify()
Ddsa_lib.c24 int DSA_set_method(DSA *dsa, const DSA_METHOD *meth) in DSA_set_method() argument
31 mtmp = dsa->meth; in DSA_set_method()
33 mtmp->finish(dsa); in DSA_set_method()
35 ENGINE_finish(dsa->engine); in DSA_set_method()
36 dsa->engine = NULL; in DSA_set_method()
38 dsa->meth = meth; in DSA_set_method()
40 meth->init(dsa); in DSA_set_method()
355 int DSA_bits(const DSA *dsa) in DSA_bits() argument
357 return BN_num_bits(dsa->p); in DSA_bits()
/third_party/mesa3d/src/mesa/state_tracker/
Dst_atom_depth.c79 struct pipe_depth_stencil_alpha_state *dsa = &st->state.depth_stencil; in st_update_depth_stencil_alpha() local
83 memset(dsa, 0, sizeof(*dsa)); in st_update_depth_stencil_alpha()
88 dsa->depth_enabled = 1; in st_update_depth_stencil_alpha()
89 dsa->depth_func = func_to_gallium(ctx->Depth.Func); in st_update_depth_stencil_alpha()
90 if (dsa->depth_func != PIPE_FUNC_EQUAL) in st_update_depth_stencil_alpha()
91 dsa->depth_writemask = ctx->Depth.Mask; in st_update_depth_stencil_alpha()
94 dsa->depth_bounds_test = 1; in st_update_depth_stencil_alpha()
95 dsa->depth_bounds_min = ctx->Depth.BoundsMin; in st_update_depth_stencil_alpha()
96 dsa->depth_bounds_max = ctx->Depth.BoundsMax; in st_update_depth_stencil_alpha()
101 dsa->stencil[0].enabled = 1; in st_update_depth_stencil_alpha()
[all …]
/third_party/mesa3d/src/gallium/drivers/r300/
Dr300_hyperz.c43 struct r300_dsa_state *dsa = r300->dsa_state.state; in r300_get_hiz_func() local
45 switch (dsa->dsa.depth_func) { in r300_get_hiz_func()
65 struct r300_dsa_state *dsa = r300->dsa_state.state; in r300_get_sc_hz_max() local
66 unsigned func = dsa->dsa.depth_func; in r300_get_sc_hz_max()
73 struct r300_dsa_state *dsa = r300->dsa_state.state; in r300_is_hiz_func_valid() local
74 unsigned func = dsa->dsa.depth_func; in r300_is_hiz_func_valid()
100 struct r300_dsa_state *dsa = r300->dsa_state.state; in r300_hiz_allowed() local
114 if (r300_dsa_stencil_op_not_keep(&dsa->dsa.stencil[0]) || in r300_hiz_allowed()
115 r300_dsa_stencil_op_not_keep(&dsa->dsa.stencil[1])) in r300_hiz_allowed()
118 if (dsa->dsa.depth_enabled) { in r300_hiz_allowed()
[all …]
Dr300_render_stencilref.c51 struct r300_dsa_state *dsa = (struct r300_dsa_state*)r300->dsa_state.state; in r300_stencilref_needed() local
53 return dsa->two_sided_stencil_ref || in r300_stencilref_needed()
54 (dsa->two_sided && in r300_stencilref_needed()
63 struct r300_dsa_state *dsa = (struct r300_dsa_state*)r300->dsa_state.state; in r300_stencilref_begin() local
67 sr->zb_stencilrefmask = dsa->stencil_ref_mask; in r300_stencilref_begin()
81 struct r300_dsa_state *dsa = (struct r300_dsa_state*)r300->dsa_state.state; in r300_stencilref_switch_side() local
84 dsa->stencil_ref_mask = dsa->stencil_ref_bf; in r300_stencilref_switch_side()
96 struct r300_dsa_state *dsa = (struct r300_dsa_state*)r300->dsa_state.state; in r300_stencilref_end() local
100 dsa->stencil_ref_mask = sr->zb_stencilrefmask; in r300_stencilref_end()
/third_party/openssl/apps/
Dtestdsa.h202 st.priv = dsa##bits##_priv; \
203 st.pub = dsa##bits##_pub; \
204 st.p = dsa##bits##_p; \
205 st.g = dsa##bits##_g; \
206 st.q = dsa##bits##_q; \
207 st.priv_l = sizeof(dsa##bits##_priv); \
208 st.pub_l = sizeof(dsa##bits##_pub); \
209 st.p_l = sizeof(dsa##bits##_p); \
210 st.g_l = sizeof(dsa##bits##_g); \
211 st.q_l = sizeof(dsa##bits##_q); \
[all …]
Ddsaparam.c52 DSA *dsa = NULL; in dsaparam_main() local
139 dsa = DSA_new(); in dsaparam_main()
140 if (dsa == NULL) { in dsaparam_main()
147 if (!DSA_generate_parameters_ex(dsa, num, NULL, 0, NULL, NULL, cb)) { in dsaparam_main()
153 dsa = d2i_DSAparams_bio(in, NULL); in dsaparam_main()
155 dsa = PEM_read_bio_DSAparams(in, NULL, NULL, NULL); in dsaparam_main()
157 if (dsa == NULL) { in dsaparam_main()
164 DSAparams_print(out, dsa); in dsaparam_main()
172 DSA_get0_pqg(dsa, &p, &q, &g); in dsaparam_main()
208 i = i2d_DSAparams_bio(out, dsa); in dsaparam_main()
[all …]
Ddsa.c62 DSA *dsa = NULL; in dsa_main() local
162 dsa = EVP_PKEY_get1_DSA(pkey); in dsa_main()
166 if (dsa == NULL) { in dsa_main()
178 if (!DSA_print(out, dsa, 0)) { in dsa_main()
187 DSA_get0_key(dsa, &pub_key, NULL); in dsa_main()
200 i = i2d_DSA_PUBKEY_bio(out, dsa); in dsa_main()
203 i = i2d_DSAPrivateKey_bio(out, dsa); in dsa_main()
207 i = PEM_write_bio_DSA_PUBKEY(out, dsa); in dsa_main()
210 i = PEM_write_bio_DSAPrivateKey(out, dsa, enc, in dsa_main()
220 EVP_PKEY_set1_DSA(pk, dsa); in dsa_main()
[all …]
Ddhparam.c174 DSA *dsa = DSA_new(); in dhparam_main() local
178 if (dsa == NULL in dhparam_main()
179 || !DSA_generate_parameters_ex(dsa, num, NULL, 0, NULL, NULL, in dhparam_main()
181 DSA_free(dsa); in dhparam_main()
187 dh = DSA_dup_DH(dsa); in dhparam_main()
188 DSA_free(dsa); in dhparam_main()
218 DSA *dsa; in dhparam_main() local
221 dsa = d2i_DSAparams_bio(in, NULL); in dhparam_main()
223 dsa = PEM_read_bio_DSAparams(in, NULL, NULL, NULL); in dhparam_main()
225 if (dsa == NULL) { in dhparam_main()
[all …]
Dgendsa.c48 DSA *dsa = NULL; in gendsa_main() local
104 if ((dsa = PEM_read_bio_DSAparams(in, NULL, NULL, NULL)) == NULL) { in gendsa_main()
115 DSA_get0_pqg(dsa, &p, NULL, NULL); in gendsa_main()
124 if (!DSA_generate_key(dsa)) in gendsa_main()
128 if (!PEM_write_bio_DSAPrivateKey(out, dsa, enc, NULL, 0, NULL, passout)) in gendsa_main()
137 DSA_free(dsa); in gendsa_main()
/third_party/mesa3d/src/gallium/frontends/nine/
Dnine_pipe.c33 struct pipe_depth_stencil_alpha_state dsa; in nine_convert_dsa_state() local
35 memset(&dsa, 0, sizeof(dsa)); /* memcmp safety */ in nine_convert_dsa_state()
38 dsa.depth_enabled = 1; in nine_convert_dsa_state()
39 dsa.depth_func = d3dcmpfunc_to_pipe_func(rs[D3DRS_ZFUNC]); in nine_convert_dsa_state()
41 dsa.depth_writemask = !!rs[D3DRS_ZWRITEENABLE] && in nine_convert_dsa_state()
42 dsa.depth_func != PIPE_FUNC_EQUAL && in nine_convert_dsa_state()
43 dsa.depth_func != PIPE_FUNC_NEVER; in nine_convert_dsa_state()
47 dsa.stencil[0].enabled = 1; in nine_convert_dsa_state()
48 dsa.stencil[0].func = d3dcmpfunc_to_pipe_func(rs[D3DRS_STENCILFUNC]); in nine_convert_dsa_state()
49 dsa.stencil[0].fail_op = d3dstencilop_to_pipe_stencil_op(rs[D3DRS_STENCILFAIL]); in nine_convert_dsa_state()
[all …]
/third_party/openssl/test/
Ddsatest.c69 DSA *dsa = NULL; in dsa_test() local
81 if (!TEST_ptr(dsa = DSA_new()) in dsa_test()
82 || !TEST_true(DSA_generate_parameters_ex(dsa, 512, seed, 20, in dsa_test()
91 DSA_get0_pqg(dsa, &p, &q, &g); in dsa_test()
107 DSA_generate_key(dsa); in dsa_test()
108 DSA_sign(0, str1, 20, sig, &siglen, dsa); in dsa_test()
109 if (TEST_true(DSA_verify(0, str1, 20, sig, siglen, dsa))) in dsa_test()
113 DSA_free(dsa); in dsa_test()
Ddsa_no_digest_size_test.c92 DSA *dsa = DSA_new(); in load_dsa_params() local
95 if (dsa == NULL) in load_dsa_params()
97 if (!DSA_set0_pqg(dsa, p = BN_bin2bn(dsap_2048, sizeof(dsap_2048), NULL), in load_dsa_params()
100 DSA_free(dsa); in load_dsa_params()
106 return dsa; in load_dsa_params()
/third_party/openssl/doc/man3/
DDSA_size.pod9 #include <openssl/dsa.h>
11 int DSA_size(const DSA *dsa);
12 int DSA_bits(const DSA *dsa);
13 int DSA_security_bits(const DSA *dsa);
18 for key B<dsa> in bytes. It can be used to determine how much memory must
21 B<dsa-E<gt>q> must not be B<NULL>.
23 DSA_bits() returns the number of bits in key B<dsa>: this is the number
26 DSA_security_bits() returns the number of security bits of the given B<dsa>
DDSA_sign.pod9 #include <openssl/dsa.h>
12 unsigned char *sigret, unsigned int *siglen, DSA *dsa);
14 int DSA_sign_setup(DSA *dsa, BN_CTX *ctx, BIGNUM **kinvp, BIGNUM **rp);
17 unsigned char *sigbuf, int siglen, DSA *dsa);
22 digest B<dgst> using the private key B<dsa> and places its ASN.1 DER
24 *B<siglen>. B<sigret> must point to DSA_size(B<dsa>) bytes of memory.
35 B<dsa> is the signer's public key.
/third_party/openssl/crypto/pem/
Dpem_all.c25 static DSA *pkey_get_dsa(EVP_PKEY *key, DSA **dsa);
91 static DSA *pkey_get_dsa(EVP_PKEY *key, DSA **dsa) in IMPLEMENT_PEM_write_cb_const()
100 if (dsa) { in IMPLEMENT_PEM_write_cb_const()
101 DSA_free(*dsa); in IMPLEMENT_PEM_write_cb_const()
102 *dsa = dtmp; in IMPLEMENT_PEM_write_cb_const()
107 DSA *PEM_read_bio_DSAPrivateKey(BIO *bp, DSA **dsa, pem_password_cb *cb, in PEM_read_bio_DSAPrivateKey() argument
112 return pkey_get_dsa(pktmp, dsa); /* will free pktmp */ in PEM_read_bio_DSAPrivateKey()
119 DSA *PEM_read_DSAPrivateKey(FILE *fp, DSA **dsa, pem_password_cb *cb, void *u) in IMPLEMENT_PEM_write_cb_const()
123 return pkey_get_dsa(pktmp, dsa); /* will free pktmp */ in IMPLEMENT_PEM_write_cb_const()
/third_party/mesa3d/src/gallium/drivers/radeonsi/
Dsi_state_binning.c179 struct si_state_dsa *dsa = sctx->queued.named.dsa; in si_get_depth_bin_size() local
181 if (!sctx->framebuffer.state.zsbuf || (!dsa->depth_enabled && !dsa->stencil_enabled)) { in si_get_depth_bin_size()
188 unsigned depth_coeff = dsa->depth_enabled ? 5 : 0; in si_get_depth_bin_size()
189 unsigned stencil_coeff = tex->surface.has_stencil && dsa->stencil_enabled ? 1 : 0; in si_get_depth_bin_size()
389 struct si_state_dsa *dsa = sctx->queued.named.dsa; in gfx10_get_bin_sizes() local
391 const unsigned cPerDepthSample = dsa->depth_enabled ? 5 : 0; in gfx10_get_bin_sizes()
392 const unsigned cPerStencilSample = dsa->stencil_enabled ? 1 : 0; in gfx10_get_bin_sizes()
447 struct si_state_dsa *dsa = sctx->queued.named.dsa; in si_emit_dpbb_state() local
467 sctx->framebuffer.state.zsbuf && dsa->db_can_write) { in si_emit_dpbb_state()
/third_party/openssl/crypto/x509/
Dx_all.c266 DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa) in d2i_DSAPrivateKey_fp() argument
268 return ASN1_d2i_fp_of(DSA, DSA_new, d2i_DSAPrivateKey, fp, dsa); in d2i_DSAPrivateKey_fp()
271 int i2d_DSAPrivateKey_fp(FILE *fp, DSA *dsa) in i2d_DSAPrivateKey_fp() argument
273 return ASN1_i2d_fp_of_const(DSA, i2d_DSAPrivateKey, fp, dsa); in i2d_DSAPrivateKey_fp()
276 DSA *d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa) in d2i_DSA_PUBKEY_fp() argument
278 return ASN1_d2i_fp_of(DSA, DSA_new, d2i_DSA_PUBKEY, fp, dsa); in d2i_DSA_PUBKEY_fp()
281 int i2d_DSA_PUBKEY_fp(FILE *fp, DSA *dsa) in i2d_DSA_PUBKEY_fp() argument
283 return ASN1_i2d_fp_of(DSA, i2d_DSA_PUBKEY, fp, dsa); in i2d_DSA_PUBKEY_fp()
287 DSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa) in d2i_DSAPrivateKey_bio() argument
289 return ASN1_d2i_bio_of(DSA, DSA_new, d2i_DSAPrivateKey, bp, dsa); in d2i_DSAPrivateKey_bio()
[all …]

1234567