Home
last modified time | relevance | path

Searched refs:sig (Results 1 – 25 of 129) sorted by relevance

123456

/openssl/crypto/dsa/
H A Ddsa_sign.c36 DSA_SIG *sig = OPENSSL_zalloc(sizeof(*sig)); in DSA_SIG_new() local
38 return sig; in DSA_SIG_new()
43 if (sig == NULL) in DSA_SIG_free()
52 DSA_SIG *sig; in d2i_DSA_SIG() local
67 if (sig->r == NULL || sig->s == NULL in d2i_DSA_SIG()
75 return sig; in d2i_DSA_SIG()
98 if (!ossl_encode_der_dsa_sig(&pkt, sig->r, sig->s) in i2d_DSA_SIG()
122 DSA_SIG sig; in DSA_size() local
125 sig.r = sig.s = dsa->params.q; in DSA_size()
148 sig->r = r; in DSA_SIG_set0()
[all …]
/openssl/crypto/rsa/
H A Drsa_saos.c28 ASN1_OCTET_STRING sig; in RSA_sign_ASN1_OCTET_STRING() local
32 sig.type = V_ASN1_OCTET_STRING; in RSA_sign_ASN1_OCTET_STRING()
33 sig.length = m_len; in RSA_sign_ASN1_OCTET_STRING()
34 sig.data = (unsigned char *)m; in RSA_sign_ASN1_OCTET_STRING()
36 i = i2d_ASN1_OCTET_STRING(&sig, NULL); in RSA_sign_ASN1_OCTET_STRING()
46 i2d_ASN1_OCTET_STRING(&sig, &p); in RSA_sign_ASN1_OCTET_STRING()
65 ASN1_OCTET_STRING *sig = NULL; in RSA_verify_ASN1_OCTET_STRING() local
82 if (sig == NULL) in RSA_verify_ASN1_OCTET_STRING()
85 if (((unsigned int)sig->length != m_len) || in RSA_verify_ASN1_OCTET_STRING()
86 (memcmp(m, sig->data, m_len) != 0)) { in RSA_verify_ASN1_OCTET_STRING()
[all …]
/openssl/crypto/evp/
H A Dsignature.c470 if (sig == NULL || sig->gettable_ctx_params == NULL) in EVP_SIGNATURE_gettable_ctx_params()
481 if (sig == NULL || sig->settable_ctx_params == NULL) in EVP_SIGNATURE_settable_ctx_params()
700 ctx->op.sig.algctx = in evp_pkey_signature_init()
756 ctx->op.sig.algctx = NULL; in evp_pkey_signature_init()
856 return ctx->op.sig.signature->sign_message_update(ctx->op.sig.algctx, in EVP_PKEY_sign_message_update()
878 return ctx->op.sig.signature->sign_message_final(ctx->op.sig.algctx, in EVP_PKEY_sign_message_final()
908 ret = ctx->op.sig.signature->sign(ctx->op.sig.algctx, sig, siglen, in EVP_PKEY_sign()
984 return ctx->op.sig.signature->verify_message_update(ctx->op.sig.algctx, in EVP_PKEY_verify_message_update()
1006 return ctx->op.sig.signature->verify_message_final(ctx->op.sig.algctx); in EVP_PKEY_verify_message_final()
1034 ret = ctx->op.sig.signature->verify(ctx->op.sig.algctx, sig, siglen, in EVP_PKEY_verify()
[all …]
H A Dm_sigver.c195 locpctx->op.sig.signature = signature; in do_sigver_init()
198 locpctx->op.sig.algctx in do_sigver_init()
200 if (locpctx->op.sig.algctx == NULL) { in do_sigver_init()
407 || pctx->op.sig.algctx == NULL in EVP_DigestSignUpdate()
416 return pctx->op.sig.signature->digest_sign_update(pctx->op.sig.algctx, in EVP_DigestSignUpdate()
442 || pctx->op.sig.algctx == NULL in EVP_DigestVerifyUpdate()
451 return pctx->op.sig.signature->digest_verify_update(pctx->op.sig.algctx, in EVP_DigestVerifyUpdate()
490 r = pctx->op.sig.signature->digest_sign_final(pctx->op.sig.algctx, in EVP_DigestSignFinal()
590 return pctx->op.sig.signature->digest_sign(pctx->op.sig.algctx, in EVP_DigestSign()
632 r = pctx->op.sig.signature->digest_verify_final(pctx->op.sig.algctx, in EVP_DigestVerifyFinal()
[all …]
H A Dpmeth_lib.c357 if (ctx->op.sig.algctx != NULL && ctx->op.sig.signature != NULL) in evp_pkey_ctx_free_old_ops()
358 ctx->op.sig.signature->freectx(ctx->op.sig.algctx); in evp_pkey_ctx_free_old_ops()
360 ctx->op.sig.algctx = NULL; in evp_pkey_ctx_free_old_ops()
501 rctx->op.sig.signature = pctx->op.sig.signature; in EVP_PKEY_CTX_dup()
510 rctx->op.sig.algctx in EVP_PKEY_CTX_dup()
511 = pctx->op.sig.signature->dupctx(pctx->op.sig.algctx); in EVP_PKEY_CTX_dup()
677 ctx->op.sig.signature->set_ctx_params(ctx->op.sig.algctx, in EVP_PKEY_CTX_set_params()
721 ctx->op.sig.signature->get_ctx_params(ctx->op.sig.algctx, in EVP_PKEY_CTX_get_params()
768 return ctx->op.sig.signature->gettable_ctx_params(ctx->op.sig.algctx, in EVP_PKEY_CTX_gettable_params()
812 return ctx->op.sig.signature->settable_ctx_params(ctx->op.sig.algctx, in EVP_PKEY_CTX_settable_params()
[all …]
/openssl/demos/signature/
H A Drsa_pss_hash.c33 static int sign(OSSL_LIB_CTX *libctx, unsigned char **sig, size_t *sig_len) in sign() argument
41 *sig = NULL; in sign()
86 *sig = OPENSSL_malloc(*sig_len); in sign()
87 if (*sig == NULL) { in sign()
93 if (EVP_DigestSignFinal(mctx, *sig, sig_len) == 0) { in sign()
104 OPENSSL_free(*sig); in sign()
158 if (EVP_DigestVerifyFinal(mctx, sig, sig_len) == 0) { in verify()
175 unsigned char *sig = NULL; in main() local
178 if (sign(libctx, &sig, &sig_len) == 0) in main()
181 if (verify(libctx, sig, sig_len) == 0) in main()
[all …]
H A Drsa_pss_direct.c38 static int sign(OSSL_LIB_CTX *libctx, unsigned char **sig, size_t *sig_len) in sign() argument
46 *sig = NULL; in sign()
95 *sig = OPENSSL_malloc(*sig_len); in sign()
96 if (*sig == NULL) { in sign()
102 if (EVP_PKEY_sign(ctx, *sig, sig_len, in sign()
115 OPENSSL_free(*sig); in sign()
171 if (EVP_PKEY_verify(ctx, sig, sig_len, in verify()
190 unsigned char *sig = NULL; in main() local
193 if (sign(libctx, &sig, &sig_len) == 0) in main()
196 if (verify(libctx, sig, sig_len) == 0) in main()
[all …]
/openssl/crypto/asn1/
H A Dx_sig.c23 void X509_SIG_get0(const X509_SIG *sig, const X509_ALGOR **palg,
27 *palg = sig->algor;
29 *pdigest = sig->digest;
32 void X509_SIG_getm(X509_SIG *sig, X509_ALGOR **palg, in X509_SIG_getm() argument
36 *palg = sig->algor; in X509_SIG_getm()
38 *pdigest = sig->digest; in X509_SIG_getm()
/openssl/providers/implementations/signature/
H A Deddsa_sig.c1067 s390x_flip_endian32(sig, param.ed25519.sig); in s390x_ed25519_digestsign()
1068 s390x_flip_endian32(sig + 32, param.ed25519.sig + 32); in s390x_ed25519_digestsign()
1092 s390x_flip_endian64(param.ed448.sig, param.ed448.sig); in s390x_ed448_digestsign()
1093 s390x_flip_endian64(param.ed448.sig + 64, param.ed448.sig + 64); in s390x_ed448_digestsign()
1094 memcpy(sig, param.ed448.sig, 57); in s390x_ed448_digestsign()
1095 memcpy(sig + 57, param.ed448.sig + 64, 57); in s390x_ed448_digestsign()
1112 s390x_flip_endian32(param.ed25519.sig, sig); in s390x_ed25519_digestverify()
1113 s390x_flip_endian32(param.ed25519.sig + 32, sig + 32); in s390x_ed25519_digestverify()
1134 memcpy(param.ed448.sig, sig, 57); in s390x_ed448_digestverify()
1135 s390x_flip_endian64(param.ed448.sig, param.ed448.sig); in s390x_ed448_digestverify()
[all …]
H A Ddsa_sig.c109 unsigned char *sig; member
345 if (sig == NULL) { in dsa_sign_directly()
391 if (sig != NULL) { in dsa_sign_message_final()
419 if (sig == NULL) in dsa_sign()
490 const unsigned char *sig, size_t siglen, in dsa_verify() argument
496 if (dsa_verify_set_sig(pdsactx, sig, siglen) <= 0) in dsa_verify()
579 ok = dsa_sign_message_final(pdsactx, sig, siglen, sigsize); in dsa_digest_sign_final()
606 if (dsa_verify_set_sig(pdsactx, sig, siglen)) in dsa_digest_verify_final()
620 OPENSSL_free(ctx->sig); in dsa_freectx()
967 OPENSSL_free(pdsactx->sig); in dsa_sigalg_set_ctx_params()
[all …]
H A Decdsa_sig.c107 unsigned char *sig; member
327 if (sig == NULL) { in ecdsa_sign_directly()
390 if (sig != NULL in ecdsa_sign_message_final()
410 if (sig == NULL) in ecdsa_sign()
472 return ecdsa_verify_directly(vctx, ctx->sig, ctx->siglen, in ecdsa_verify_message_final()
487 if (ecdsa_verify_set_sig(ctx, sig, siglen) <= 0) in ecdsa_verify()
571 ok = ecdsa_sign_message_final(ctx, sig, siglen, sigsize); in ecdsa_digest_sign_final()
599 if (ecdsa_verify_set_sig(ctx, sig, siglen)) in ecdsa_digest_verify_final()
614 OPENSSL_free(ctx->sig); in ecdsa_freectx()
985 OPENSSL_free(ctx->sig); in ecdsa_sigalg_set_ctx_params()
[all …]
H A Drsa_sig.c142 unsigned char *sig; member
687 if (sig == NULL) { in rsa_sign_directly()
868 if (sig != NULL) { in rsa_sign_message_final()
905 if (sig == NULL) in rsa_sign()
1049 sig, siglen) <= 0) in rsa_verify_directly()
1166 const unsigned char *sig, size_t siglen, in rsa_verify() argument
1179 return rsa_verify_set_sig(prsactx, sig, siglen) in rsa_verify()
1307 if (rsa_verify_set_sig(prsactx, sig, siglen) in rsa_digest_verify_final()
1326 OPENSSL_free(prsactx->sig); in rsa_freectx()
1999 OPENSSL_free(prsactx->sig); in rsa_sigalg_set_ctx_params()
[all …]
/openssl/crypto/bn/asm/
H A Dia64.S694 { .mfi; getf.sig r16=f40
698 { .mfi; getf.sig r24=f50
715 { .mfi; getf.sig r25=f41
718 { .mfi; getf.sig r16=f60
721 { .mfi; getf.sig r17=f51
1446 { .mii; setf.sig f7=DH
1462 { .mlx; setf.sig f14=D
1465 { .mii; setf.sig f6=H
1469 (p6) setf.sig f8=AT
1495 { .mii; setf.sig f6=H
[all …]
/openssl/crypto/ct/
H A Dct_sct.c41 OPENSSL_free(sct->sig); in SCT_free()
165 OPENSSL_free(sct->sig); in SCT_set0_signature()
166 sct->sig = sig; in SCT_set0_signature()
173 OPENSSL_free(sct->sig); in SCT_set1_signature()
174 sct->sig = NULL; in SCT_set1_signature()
178 if (sig != NULL && sig_len > 0) { in SCT_set1_signature()
179 sct->sig = OPENSSL_memdup(sig, sig_len); in SCT_set1_signature()
180 if (sct->sig == NULL) in SCT_set1_signature()
231 size_t SCT_get0_signature(const SCT *sct, unsigned char **sig) in SCT_get0_signature() argument
233 *sig = sct->sig; in SCT_get0_signature()
[all …]
/openssl/test/
H A Decdsatest.c192 unsigned char *sig = NULL; in test_builtin() local
247 || !TEST_ptr(sig = OPENSSL_malloc(sig_len = (size_t)temp)) in test_builtin()
314 sig[offset] ^= dirt; in test_builtin()
321 sig[offset] ^= dirt; in test_builtin()
334 OPENSSL_free(sig); in test_builtin()
357 unsigned char *sig = NULL; in test_ecdsa_sig_NULL() local
365 && TEST_ptr(sig = OPENSSL_malloc(siglen0)) in test_ecdsa_sig_NULL()
366 && TEST_int_eq(ECDSA_sign(0, dgst, sizeof(dgst), sig, &siglen, in test_ecdsa_sig_NULL()
370 && TEST_int_eq(ECDSA_verify(0, dgst, sizeof(dgst), sig, siglen, in test_ecdsa_sig_NULL()
380 && TEST_int_eq(ECDSA_verify(0, dgst, sizeof(dgst), sig, siglen, in test_ecdsa_sig_NULL()
[all …]
/openssl/crypto/ec/
H A Decx_meth.c1225 s390x_flip_endian32(sig, param.ed25519.sig); in s390x_pkey_ecd_digestsign25519()
1226 s390x_flip_endian32(sig + 32, param.ed25519.sig + 32); in s390x_pkey_ecd_digestsign25519()
1270 s390x_flip_endian64(param.ed448.sig, param.ed448.sig); in s390x_pkey_ecd_digestsign448()
1271 s390x_flip_endian64(param.ed448.sig + 64, param.ed448.sig + 64); in s390x_pkey_ecd_digestsign448()
1272 memcpy(sig, param.ed448.sig, 57); in s390x_pkey_ecd_digestsign448()
1273 memcpy(sig + 57, param.ed448.sig + 64, 57); in s390x_pkey_ecd_digestsign448()
1303 s390x_flip_endian32(param.ed25519.sig, sig); in s390x_pkey_ecd_digestverify25519()
1304 s390x_flip_endian32(param.ed25519.sig + 32, sig + 32); in s390x_pkey_ecd_digestverify25519()
1335 memcpy(param.ed448.sig, sig, 57); in s390x_pkey_ecd_digestverify448()
1336 s390x_flip_endian64(param.ed448.sig, param.ed448.sig); in s390x_pkey_ecd_digestverify448()
[all …]
H A Decp_s390x_nistp.c135 ECDSA_SIG *sig; in ecdsa_s390x_nistp_sign_sig() local
153 sig = ECDSA_SIG_new(); in ecdsa_s390x_nistp_sign_sig()
154 if (k == NULL || sig == NULL) { in ecdsa_s390x_nistp_sign_sig()
159 sig->r = BN_new(); in ecdsa_s390x_nistp_sign_sig()
160 sig->s = BN_new(); in ecdsa_s390x_nistp_sign_sig()
161 if (sig->r == NULL || sig->s == NULL) { in ecdsa_s390x_nistp_sign_sig()
207 if (BN_bin2bn(param + S390X_OFF_R(len), len, sig->r) == NULL in ecdsa_s390x_nistp_sign_sig()
217 ECDSA_SIG_free(sig); in ecdsa_s390x_nistp_sign_sig()
218 sig = NULL; in ecdsa_s390x_nistp_sign_sig()
221 return sig; in ecdsa_s390x_nistp_sign_sig()
[all …]
H A Dec_asn1.c1197 ECDSA_SIG *sig = OPENSSL_zalloc(sizeof(*sig)); in DECLARE_ASN1_ENCODE_FUNCTIONS_name() local
1199 return sig; in DECLARE_ASN1_ENCODE_FUNCTIONS_name()
1228 if (sig->r == NULL || sig->s == NULL in d2i_ECDSA_SIG()
1236 return sig; in d2i_ECDSA_SIG()
1259 if (!ossl_encode_der_dsa_sig(&pkt, sig->r, sig->s) in i2d_ECDSA_SIG()
1290 return sig->r; in ECDSA_SIG_get0_r()
1295 return sig->s; in ECDSA_SIG_get0_s()
1304 sig->r = r; in ECDSA_SIG_set0()
1305 sig->s = s; in ECDSA_SIG_set0()
1312 ECDSA_SIG sig; in ECDSA_size() local
[all …]
H A Decdsa_ossl.c64 const ECDSA_SIG *sig, EC_KEY *eckey) in ossl_ecdsa_verify_sig() argument
75 unsigned char *sig, unsigned int *siglen, in ossl_ecdsa_sign() argument
80 if (sig == NULL && (kinv == NULL || r == NULL)) { in ossl_ecdsa_sign()
90 *siglen = i2d_ECDSA_SIG(s, sig != NULL ? &sig : NULL); in ossl_ecdsa_sign()
105 if (sig == NULL) { in ossl_ecdsa_deterministic_sign()
123 *siglen = i2d_ECDSA_SIG(s, &sig); in ossl_ecdsa_deterministic_sign()
488 if (BN_is_zero(sig->r) || BN_is_negative(sig->r) || in ossl_ecdsa_simple_verify_sig()
489 BN_ucmp(sig->r, order) >= 0 || BN_is_zero(sig->s) || in ossl_ecdsa_simple_verify_sig()
490 BN_is_negative(sig->s) || BN_ucmp(sig->s, order) >= 0) { in ossl_ecdsa_simple_verify_sig()
522 if (!BN_mod_mul(u2, sig->r, u2, order, ctx)) { in ossl_ecdsa_simple_verify_sig()
[all …]
H A Decdsa_sign.c36 *sig, unsigned int *siglen, EC_KEY *eckey) in ECDSA_sign() argument
38 return ECDSA_sign_ex(type, dgst, dlen, sig, siglen, NULL, NULL, eckey); in ECDSA_sign()
42 unsigned char *sig, unsigned int *siglen, const BIGNUM *kinv, in ECDSA_sign_ex() argument
46 return eckey->meth->sign(type, dgst, dlen, sig, siglen, kinv, r, eckey); in ECDSA_sign_ex()
/openssl/util/perl/TLSProxy/
H A DCertificateVerify.pm62 my $sig = substr($remdata, 2);
64 die "Invalid CertificateVerify signature length" if length($sig) != $siglen;
70 $self->signature($sig);
78 my $sig = $self->signature();
82 $data .= pack("n", length($sig));
83 $data .= $sig;
H A DServerKeyExchange.pm45 $self->{sig} = "";
84 my $sig = "";
89 $sig = substr($self->data, $ptr, $sig_len);
98 $self->signature($sig);
161 $self->{sig} = shift;
163 return $self->{sig};
/openssl/crypto/sm2/
H A Dsm2_sign.c212 ECDSA_SIG *sig = NULL; in sm2_sig_gen() local
304 sig = ECDSA_SIG_new(); in sm2_sig_gen()
305 if (sig == NULL) { in sm2_sig_gen()
316 if (sig == NULL) { in sm2_sig_gen()
323 return sig; in sm2_sig_gen()
369 ECDSA_SIG_get0(sig, &r, &s); in sm2_sig_verify()
417 ECDSA_SIG *sig = NULL; in ossl_sm2_do_sign() local
425 sig = sm2_sig_gen(key, e); in ossl_sm2_do_sign()
429 return sig; in ossl_sm2_do_sign()
464 if (sig == NULL) { in ossl_sm2_internal_sign()
[all …]
/openssl/doc/man3/
H A DEVP_PKEY_sign.pod158 unsigned char *md, *sig;
181 sig = OPENSSL_malloc(siglen);
183 if (sig == NULL)
203 unsigned char *md, *sig;
224 sig = OPENSSL_malloc(siglen);
226 if (sig == NULL)
247 unsigned char *in, *sig;
271 sig = OPENSSL_malloc(siglen);
273 if (sig == NULL)
292 unsigned char *in, *sig;
[all …]
H A DECDSA_sign.pod21 unsigned char *sig, unsigned int *siglen, EC_KEY *eckey);
26 const unsigned char *sig, int siglen, EC_KEY *eckey);
28 const ECDSA_SIG *sig, EC_KEY* eckey);
35 unsigned char *sig, unsigned int *siglen,
51 size use L<EVP_PKEY_sign(3)> with a NULL I<sig> parameter.
55 stored in I<sig> and its length is returned in I<siglen>. Note: I<sig> must
84 I<kinv> and I<rp>. The DER encoded signature is stored in I<sig> and its
115 ECDSA_SIG *sig;
127 sig = ECDSA_do_sign(digest, 32, eckey);
128 if (sig == NULL)
[all …]

Completed in 161 milliseconds

123456