Lines Matching refs:signature

626 /* Computes the ECDSA signature (a concatenation of two values r and s)
631 ECDSA_SignDigestWithSeed(ECPrivateKey *key, SECItem *signature,
637 mp_int r, s; /* tuple (r, s) is the signature */
659 if (!key || !signature || !digest || !kb || (kblen < 0)) {
667 if (signature->data == NULL) {
668 /* a call to get the signature length only */
671 if (signature->len < 2*olen) {
793 CHECK_MPI_OK( mp_to_fixlen_octets(&r, signature->data, olen) );
794 CHECK_MPI_OK( mp_to_fixlen_octets(&s, signature->data + olen, olen) );
796 signature->len = 2*olen;
826 ** Computes the ECDSA signature on the digest using the given key
830 ECDSA_SignDigest(ECPrivateKey *key, SECItem *signature, const SECItem *digest,
848 /* Generate ECDSA signature with the specified k value */
849 rv = ECDSA_SignDigestWithSeed(key, signature, digest, kBytes, len, kmflag);
865 ** Checks the signature on the given digest using the key provided.
868 ECDSA_VerifyDigest(ECPublicKey *key, const SECItem *signature,
872 mp_int r_, s_; /* tuple (r', s') is received signature) */
879 int slen; /* length in bytes of a half signature (r or s) */
900 if (!key || !signature || !digest) {
908 if (signature->len == 0 || signature->len%2 != 0 ||
909 signature->len > 2*olen) {
913 slen = signature->len/2;
929 ** Convert received signature (r', s') into MPI integers.
931 CHECK_MPI_OK( mp_read_unsigned_octets(&r_, signature->data, slen) );
932 CHECK_MPI_OK( mp_read_unsigned_octets(&s_, signature->data + slen, slen) );
992 ** If the result, C, is the point at infinity, reject the signature