Lines Matching defs:signature

622 /* Computes the ECDSA signature (a concatenation of two values r and s)
627 ECDSA_SignDigestWithSeed(ECPrivateKey *key, SECItem *signature,
633 mp_int r, s; /* tuple (r, s) is the signature */
655 if (!key || !signature || !digest || !kb || (kblen < 0)) {
663 if (signature->data == NULL) {
664 /* a call to get the signature length only */
667 if (signature->len < 2*olen) {
789 CHECK_MPI_OK( mp_to_fixlen_octets(&r, signature->data, olen) );
790 CHECK_MPI_OK( mp_to_fixlen_octets(&s, signature->data + olen, olen) );
792 signature->len = 2*olen;
822 ** Computes the ECDSA signature on the digest using the given key
826 ECDSA_SignDigest(ECPrivateKey *key, SECItem *signature, const SECItem *digest,
844 /* Generate ECDSA signature with the specified k value */
845 rv = ECDSA_SignDigestWithSeed(key, signature, digest, kBytes, len, kmflag);
861 ** Checks the signature on the given digest using the key provided.
864 ECDSA_VerifyDigest(ECPublicKey *key, const SECItem *signature,
868 mp_int r_, s_; /* tuple (r', s') is received signature) */
875 int slen; /* length in bytes of a half signature (r or s) */
896 if (!key || !signature || !digest) {
904 if (signature->len == 0 || signature->len%2 != 0 ||
905 signature->len > 2*olen) {
909 slen = signature->len/2;
925 ** Convert received signature (r', s') into MPI integers.
927 CHECK_MPI_OK( mp_read_unsigned_octets(&r_, signature->data, slen) );
928 CHECK_MPI_OK( mp_read_unsigned_octets(&s_, signature->data + slen, slen) );
988 ** If the result, C, is the point at infinity, reject the signature