Home | History | Annotate | Download | only in netinet

Lines Matching refs:digest

931     uint8_t *digest)
935 SCTP_SHA1_FINAL(digest, &ctx->sha1);
939 SCTP_SHA256_FINAL(digest, &ctx->sha256);
952 * Compute the HMAC digest using the desired hash key, text, and HMAC
953 * algorithm. Resulting digest is placed in 'digest' and digest length
957 * resultant digest.
961 uint8_t *text, uint32_t textlen, uint8_t *digest)
972 (textlen == 0) || (digest == NULL)) {
973 /* can't do HMAC with empty key or text or digest store */
976 /* validate the hmac algo and get the digest length */
1013 sctp_hmac_final(hmac_algo, &ctx, digest);
1021 struct mbuf *m, uint32_t m_offset, uint8_t *digest, uint32_t trailer)
1032 if ((key == NULL) || (keylen == 0) || (m == NULL) || (digest == NULL)) {
1033 /* can't do HMAC with empty key or text or digest store */
1036 /* validate the hmac algo and get the digest length */
1092 sctp_hmac_final(hmac_algo, &ctx, digest);
1098 * verify the HMAC digest using the desired hash key, text, and HMAC
1105 uint8_t *digest, uint32_t digestlen)
1112 (text == NULL) || (textlen == 0) || (digest == NULL)) {
1113 /* can't do HMAC with empty key or text or digest */
1124 if (memcmp(digest, temp, digestlen) != 0)
1137 uint32_t textlen, uint8_t *digest)
1146 (digest == NULL)) {
1147 /* can't do HMAC with empty key or text or digest store */
1150 /* validate the hmac algo and get the digest length */
1166 digest));
1172 uint32_t m_offset, uint8_t *digest)
1180 if ((key == NULL) || (m == NULL) || (digest == NULL)) {
1181 /* can't do HMAC with empty key or text or digest store */
1184 /* validate the hmac algo and get the digest length */
1199 return (sctp_hmac_m(hmac_algo, key->key, key->keylen, m, m_offset, digest, 0));
1576 * compute and fill in the HMAC digest for a packet
1589 /* zero the digest + chunk padding */
1623 /* compute and fill in the digest */
1676 uint8_t digest[SCTP_AUTH_DIGEST_LEN_MAX];
1760 /* validate the digest length */
1763 /* invalid digest length */
1769 /* save a copy of the digest, zero the pseudo header, and validate */
1770 bcopy(auth->hmac, digest, digestlen);
1775 /* compare the computed digest with the one in the AUTH chunk */
1776 if (memcmp(digest, computed_digest, digestlen) != 0) {
1779 "SCTP Auth: HMAC digest check failed\n");
2074 sctp_print_digest(uint8_t *digest, uint32_t digestlen, const char *str)
2079 if (digest == NULL)
2083 SCTP_PRINTF("%02x", digest[i]);
2089 uint8_t *digest, uint32_t digestlen)
2095 sctp_print_digest(digest, digestlen, "Expected digest");
2096 sctp_print_digest(computed_digest, digestlen, "Computed digest");
2097 if (memcmp(digest, computed_digest, digestlen) != 0) {
2113 uint8_t *digest;
2127 * digest = 0xb617318655057264e28bc0b6fb378c8ef146be00
2133 digest = "\xb6\x17\x31\x86\x55\x05\x72\x64\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1\x46\xbe\x00";
2135 text, textlen, digest, digestlen) < 0)
2144 * digest = 0xeffcdf6ae5eb2fa2d27416d5f184df9c259a7c79
2150 digest = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74\x16\xd5\xf1\x84\xdf\x9c\x25\x9a\x7c\x79";
2152 text, textlen, digest, digestlen) < 0)
2161 * digest = 0x125d7342b9ac11cd91a39af48aa17b4f63f175d3
2167 digest = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3\x9a\xf4\x8a\xa1\x7b\x4f\x63\xf1\x75\xd3";
2169 text, textlen, digest, digestlen) < 0)
2178 * digest = 0x4c9007f4026250c6bc8414f9bf50c86c2d7235da
2184 digest = "\x4c\x90\x07\xf4\x02\x62\x50\xc6\xbc\x84\x14\xf9\xbf\x50\xc8\x6c\x2d\x72\x35\xda";
2186 text, textlen, digest, digestlen) < 0)
2195 * digest = 0x4c1a03424b55e07fe7f27be1d58bb9324a9a5a04
2196 * digest-96 = 0x4c1a03424b55e07fe7f27be1
2202 digest = "\x4c\x1a\x03\x42\x4b\x55\xe0\x7f\xe7\xf2\x7b\xe1\xd5\x8b\xb9\x32\x4a\x9a\x5a\x04";
2204 text, textlen, digest, digestlen) < 0)
2213 * digest = 0xaa4ae5e15272d00e95705637ce8a3b55ed402112
2219 digest = "\xaa\x4a\xe5\xe1\x52\x72\xd0\x0e\x95\x70\x56\x37\xce\x8a\x3b\x55\xed\x40\x21\x12";
2221 text, textlen, digest, digestlen) < 0)
2230 * digest = 0xe8e99d0f45237d786d6bbaa7965c7808bbff1a91
2236 digest = "\xe8\xe9\x9d\x0f\x45\x23\x7d\x78\x6d\x6b\xba\xa7\x96\x5c\x78\x08\xbb\xff\x1a\x91";
2238 text, textlen, digest, digestlen) < 0)