/freebsd/crypto/openssl/test/recipes/30-test_evp_data/ |
H A D | evpkdf_ss.txt | 20 Ctrl.digest = digest:SHA1 26 Ctrl.digest = digest:SHA1 32 Ctrl.digest = digest:SHA1 38 Ctrl.digest = digest:SHA1 44 Ctrl.digest = digest:SHA1 50 Ctrl.digest = digest:SHA1 56 Ctrl.digest = digest:SHA1 62 Ctrl.digest = digest:SHA1 68 Ctrl.digest = digest:SHA1 74 Ctrl.digest = digest:SHA1 [all …]
|
H A D | evpkdf_ssh.txt | 15 # The first one uses md instead of digest to test alias works 18 Ctrl.digest = digest:SHA1 26 Ctrl.digest = digest:SHA1 34 Ctrl.digest = digest:SHA1 42 Ctrl.digest = digest:SHA1 50 Ctrl.digest = digest:SHA1 58 Ctrl.digest = digest:SHA1 66 Ctrl.digest = digest:SHA1 74 Ctrl.digest = digest:SHA1 82 Ctrl.digest = digest:SHA1 [all …]
|
H A D | evpkdf_tls13_kdf.txt | 23 Ctrl.digest = digest:SHA2-256 29 Ctrl.digest = digest:SHA2-256 38 Ctrl.digest = digest:SHA2-256 47 Ctrl.digest = digest:SHA2-256 56 Ctrl.digest = digest:SHA2-256 65 Ctrl.digest = digest:SHA2-256 74 Ctrl.digest = digest:SHA2-256 82 Ctrl.digest = digest:SHA2-256 91 Ctrl.digest = digest:SHA2-256 100 Ctrl.digest = digest:SHA2-256 [all …]
|
H A D | evpkdf_hkdf.txt | 17 Ctrl.digest = digest:SHA256 25 Ctrl.digest = digest:SHA256 32 Ctrl.digest = digest:SHA256 38 Ctrl.digest = digest:SHA256 46 Ctrl.digest = digest:SHA256 53 Ctrl.digest = digest:SHA256 59 Ctrl.digest = digest:SHA256 67 Ctrl.digest = digest:SHA256 75 Ctrl.digest = digest:SHA256 81 Ctrl.digest = digest:SHA1 [all …]
|
H A D | evpkdf_x963.txt | 21 Ctrl.digest = digest:SHA1 27 Ctrl.digest = digest:SHA224 33 Ctrl.digest = digest:SHA256 39 Ctrl.digest = digest:SHA384 44 Ctrl.digest = digest:SHA384 50 Ctrl.digest = digest:SHA512 55 Ctrl.digest = digest:SHA512 61 Ctrl.digest = digest:SHA512 67 Ctrl.digest = digest:SHA512 73 Ctrl.digest = digest:SHA512 [all …]
|
H A D | evpkdf_pbkdf2.txt | 21 Ctrl.digest = digest:sha1 29 Ctrl.digest = digest:sha256 37 Ctrl.digest = digest:sha512 45 Ctrl.digest = digest:sha1 53 Ctrl.digest = digest:sha256 61 Ctrl.digest = digest:sha512 69 Ctrl.digest = digest:sha1 77 Ctrl.digest = digest:sha256 85 Ctrl.digest = digest:sha512 92 Ctrl.digest = digest:sha1 [all …]
|
H A D | evpkdf_pbkdf1.txt | 21 Ctrl.digest = digest:md2 29 Ctrl.digest = digest:md5 37 Ctrl.digest = digest:sha1 45 Ctrl.digest = digest:md2 53 Ctrl.digest = digest:md5 61 Ctrl.digest = digest:sha1 69 Ctrl.digest = digest:md2 77 Ctrl.digest = digest:md5 85 Ctrl.digest = digest:sha1 93 Ctrl.digest = digest:md2 [all …]
|
H A D | evpkdf_x942.txt | 17 Ctrl.digest = digest:SHA1 23 Ctrl.digest = digest:SHA1 32 Ctrl.digest = digest:SHA1 39 Ctrl.digest = digest:SHA1 47 Ctrl.digest = digest:SHA1 55 Ctrl.digest = digest:SHA1 62 Ctrl.digest = digest:SHA1 69 Ctrl.digest = digest:SHA1 81 Ctrl.digest = digest:SHA256 92 Ctrl.digest = digest:SHA256
|
/freebsd/crypto/heimdal/lib/krb5/ |
H A D | digest.c | 50 krb5_digest_alloc(krb5_context context, krb5_digest *digest) in krb5_digest_alloc() argument 56 *digest = NULL; in krb5_digest_alloc() 60 *digest = d; in krb5_digest_alloc() 66 krb5_digest_free(krb5_digest digest) in krb5_digest_free() argument 68 if (digest == NULL) in krb5_digest_free() 70 free_DigestInit(&digest->init); in krb5_digest_free() 71 free_DigestInitReply(&digest->initReply); in krb5_digest_free() 72 free_DigestRequest(&digest->request); in krb5_digest_free() 73 free_DigestResponse(&digest->response); in krb5_digest_free() 74 memset(digest, 0, sizeof(*digest)); in krb5_digest_free() [all …]
|
/freebsd/crypto/openssh/ |
H A D | digest-libc.c | 152 const struct ssh_digest *digest = ssh_digest_by_alg(alg); in ssh_digest_alg_name() local 154 return digest == NULL ? NULL : digest->name; in ssh_digest_alg_name() 160 const struct ssh_digest *digest = ssh_digest_by_alg(alg); in ssh_digest_bytes() local 162 return digest == NULL ? 0 : digest->digest_len; in ssh_digest_bytes() 168 const struct ssh_digest *digest = ssh_digest_by_alg(ctx->alg); in ssh_digest_blocksize() local 170 return digest == NULL ? 0 : digest->block_len; in ssh_digest_blocksize() 176 const struct ssh_digest *digest = ssh_digest_by_alg(alg); in ssh_digest_start() local 179 if (digest == NULL || (ret = calloc(1, sizeof(*ret))) == NULL) in ssh_digest_start() 181 if ((ret->mdctx = calloc(1, digest->ctx_len)) == NULL) { in ssh_digest_start() 186 digest->md_init(ret->mdctx); in ssh_digest_start() [all …]
|
H A D | digest-openssl.c | 94 const struct ssh_digest *digest = ssh_digest_by_alg(alg); in ssh_digest_alg_name() local 96 return digest == NULL ? NULL : digest->name; in ssh_digest_alg_name() 102 const struct ssh_digest *digest = ssh_digest_by_alg(alg); in ssh_digest_bytes() local 104 return digest == NULL ? 0 : digest->digest_len; in ssh_digest_bytes() 116 const struct ssh_digest *digest = ssh_digest_by_alg(alg); in ssh_digest_start() local 119 if (digest == NULL || ((ret = calloc(1, sizeof(*ret))) == NULL)) in ssh_digest_start() 126 if (EVP_DigestInit_ex(ret->mdctx, digest->mdfunc(), NULL) != 1) { in ssh_digest_start() 161 const struct ssh_digest *digest = ssh_digest_by_alg(ctx->alg); in ssh_digest_final() local 164 if (digest == NULL || dlen > UINT_MAX) in ssh_digest_final() 166 if (dlen < digest->digest_len) /* No truncation allowed */ in ssh_digest_final() [all …]
|
H A D | hmac.c | 33 struct ssh_digest_ctx *digest; member 54 (ret->digest = ssh_digest_start(alg)) == NULL) in ssh_hmac_start() 89 if (ssh_digest_copy_state(ctx->ictx, ctx->digest) < 0) in ssh_hmac_init() 97 return ssh_digest_update(ctx->digest, m, mlen); in ssh_hmac_update() 103 return ssh_digest_update_buffer(ctx->digest, b); in ssh_hmac_update_buffer() 113 ssh_digest_final(ctx->digest, ctx->buf, len)) in ssh_hmac_final() 116 if (ssh_digest_copy_state(ctx->octx, ctx->digest) < 0 || in ssh_hmac_final() 117 ssh_digest_update(ctx->digest, ctx->buf, len) < 0 || in ssh_hmac_final() 118 ssh_digest_final(ctx->digest, d, dlen) < 0) in ssh_hmac_final() 129 ssh_digest_free(ctx->digest); in ssh_hmac_free() [all …]
|
/freebsd/crypto/openssl/crypto/evp/ |
H A D | digest.c | 30 if (ctx->digest != NULL) { in cleanup_old_md_data() 31 if (ctx->digest->cleanup != NULL in cleanup_old_md_data() 33 ctx->digest->cleanup(ctx); in cleanup_old_md_data() 34 if (ctx->md_data != NULL && ctx->digest->ctx_size > 0 in cleanup_old_md_data() 37 OPENSSL_clear_free(ctx->md_data, ctx->digest->ctx_size); in cleanup_old_md_data() 46 if (ctx->digest != NULL && ctx->digest->freectx != NULL) in evp_md_ctx_clear_digest() 47 ctx->digest->freectx(ctx->algctx); in evp_md_ctx_clear_digest() 60 ctx->digest = NULL; in evp_md_ctx_clear_digest() 173 if (!ossl_assert(ctx->digest != NULL)) { in evp_md_init_internal() 177 if (ctx->digest->freectx != NULL) in evp_md_init_internal() [all …]
|
/freebsd/contrib/netbsd-tests/lib/libc/hash/ |
H A D | t_sha2.c | 148 digest2string(const uint8_t *digest, char *string, size_t len) in digest2string() argument 151 if (*digest / 16 < 10) in digest2string() 152 *string++ = '0' + *digest / 16; in digest2string() 154 *string++ = 'a' + *digest / 16 - 10; in digest2string() 155 if (*digest % 16 < 10) in digest2string() 156 *string++ = '0' + *digest % 16; in digest2string() 158 *string++ = 'a' + *digest % 16 - 10; in digest2string() 159 ++digest; in digest2string() 175 unsigned char digest[8 + SHA256_DIGEST_LENGTH]; in ATF_TC_BODY() local 184 SHA256_Final(digest + j, &ctx); in ATF_TC_BODY() [all …]
|
/freebsd/contrib/ntp/libntp/ |
H A D | a_md5encrypt.c | 2 * digest support for NTP, MD5 and with OpenSSL more 43 * Allocate and initialize a digest context. As a speed optimization, 75 const rwbuffT * digest, in make_mac() 82 * Compute digest of key concatenated with packet. Note: the in make_mac() 83 * key type and digest type have been verified when the key in make_mac() 115 if (cmac_ctx_size(ctx) > digest->len) { in make_mac() 123 if (!CMAC_Final(ctx, digest->buf, &retlen)) { in make_mac() 141 if ((size_t)EVP_MD_CTX_size(ctx) > digest->len) { in make_mac() 156 if (!EVP_DigestFinal(ctx, digest->buf, &uilen)) { in make_mac() 171 if (digest in make_mac() 45 make_mac(const rwbuffT * digest,int ktype,const robuffT * key,const robuffT * msg) make_mac() argument 201 u_char digest[EVP_MAX_MD_SIZE]; MD5authencrypt() local 232 u_char digest[EVP_MAX_MD_SIZE]; MD5authdecrypt() local 262 u_char digest[EVP_MAX_MD_SIZE]; addr2refid() local [all...] |
/freebsd/sys/contrib/openzfs/module/icp/io/ |
H A D | sha2_mod.c | 53 #define PROV_SHA2_DIGEST_KEY(mech, ctx, key, len, digest) { \ argument 56 SHA2Final(digest, ctx); \ 209 sha2_digest_final_uio(SHA2_CTX *sha2_ctx, crypto_data_t *digest, in sha2_digest_final_uio() argument 212 off_t offset = digest->cd_offset; in sha2_digest_final_uio() 216 if (zfs_uio_segflg(digest->cd_uio) != UIO_SYSSPACE) in sha2_digest_final_uio() 223 offset = zfs_uio_index_at_offset(digest->cd_uio, offset, &vec_idx); in sha2_digest_final_uio() 224 if (vec_idx == zfs_uio_iovcnt(digest->cd_uio)) { in sha2_digest_final_uio() 234 zfs_uio_iovlen(digest->cd_uio, vec_idx)) { in sha2_digest_final_uio() 249 zfs_uio_iovbase(digest->cd_uio, vec_idx) + offset, in sha2_digest_final_uio() 252 SHA2Final((uchar_t *)zfs_uio_iovbase(digest-> in sha2_digest_final_uio() [all …]
|
/freebsd/contrib/wpa/src/crypto/ |
H A D | fips_prf_wolfssl.c | 22 sha.digest[0] = state[0]; in sha1_transform() 23 sha.digest[1] = state[1]; in sha1_transform() 24 sha.digest[2] = state[2]; in sha1_transform() 25 sha.digest[3] = state[3]; in sha1_transform() 26 sha.digest[4] = state[4]; in sha1_transform() 28 state[0] = sha.digest[0]; in sha1_transform() 29 state[1] = sha.digest[1]; in sha1_transform() 30 state[2] = sha.digest[2]; in sha1_transform() 31 state[3] = sha.digest[3]; in sha1_transform() 32 state[4] = sha.digest[4]; in sha1_transform()
|
/freebsd/crypto/openssl/doc/man7/ |
H A D | provider-digest.pod | 5 provider-digest - The digest library E<lt>-E<gt> provider functions 53 The DIGEST operation enables providers to implement digest algorithms and make 93 A digest algorithm implementation may not implement all of these functions. 101 structure for holding context information during a digest operation. 102 A pointer to this context will be passed back in a number of the other digest 107 OSSL_FUNC_digest_freectx() is passed a pointer to the provider side digest context in 111 OSSL_FUNC_digest_dupctx() should duplicate the provider side digest context in the 116 OSSL_FUNC_digest_init() initialises a digest operation given a newly created 117 provider side digest context in the I<dctx> parameter. 122 previously initialised digest operation. [all …]
|
/freebsd/crypto/openssl/doc/man3/ |
H A D | BIO_f_md.pod | 5 BIO_f_md, BIO_set_md, BIO_get_md, BIO_get_md_ctx - message digest BIO filter 21 BIO_f_md() returns the message digest BIO method. This is a filter 23 for the digest routines EVP_DigestInit(), EVP_DigestUpdate() 26 Any data written or read through a digest BIO using BIO_read_ex() and 30 digest calculation and returns the digest value. BIO_puts() is 33 BIO_reset() reinitialises a digest BIO. 35 BIO_set_md() sets the message digest of BIO B<b> to B<md>: this 36 must be called to initialize a digest BIO before any data is 39 BIO_get_md() places a pointer to the digest BIOs digest method 42 BIO_get_md_ctx() returns the digest BIOs context into B<mdcp>. [all …]
|
H A D | EVP_DigestInit.pod | 28 - EVP digest routines 38 int EVP_MD_get_params(const EVP_MD *digest, OSSL_PARAM params[]); 39 const OSSL_PARAM *EVP_MD_gettable_params(const EVP_MD *digest); 135 The EVP digest routines are a high-level interface to message digests, 136 and should be used instead of the digest-specific functions. 138 The B<EVP_MD> type is a structure for digest method implementation. 144 Fetches the digest implementation for the given I<algorithm> from any 164 Allocates and returns a digest context. 168 Resets the digest context I<ctx>. This can be used to reuse an already 173 Cleans up digest context I<ctx> and frees up the space allocated to it. [all …]
|
/freebsd/crypto/heimdal/kuser/ |
H A D | kdigest.c | 92 krb5_digest digest; in digest_server_init() local 94 ret = krb5_digest_alloc(context, &digest); in digest_server_init() 98 ret = krb5_digest_set_type(context, digest, opt->type_string); in digest_server_init() 103 ret = krb5_digest_set_server_cb(context, digest, in digest_server_init() 110 digest, in digest_server_init() 118 krb5_digest_get_server_nonce(context, digest)); in digest_server_init() 120 const char *s = krb5_digest_get_identifier(context, digest); in digest_server_init() 124 printf("opaque=%s\n", krb5_digest_get_opaque(context, digest)); in digest_server_init() 126 krb5_digest_free(digest); in digest_server_init() 136 krb5_digest digest; in digest_server_request() local [all …]
|
/freebsd/crypto/openssl/demos/digest/ |
H A D | EVP_MD_xof.c | 52 unsigned char *digest = NULL; in main() local 98 digest = OPENSSL_malloc(digest_len); in main() 99 if (digest == NULL) { in main() 105 if (EVP_DigestFinalXOF(ctx, digest, digest_len) == 0) { in main() 111 BIO_dump_indent_fp(stdout, digest, digest_len, 2); in main() 119 if (CRYPTO_memcmp(digest, known_answer, sizeof(known_answer)) != 0) { in main() 127 OPENSSL_free(digest); in main()
|
/freebsd/crypto/openssl/providers/implementations/macs/ |
H A D | hmac_prov.c | 51 PROV_DIGEST digest; member 96 ossl_prov_digest_reset(&macctx->digest); in hmac_free() 118 memset(&dst->digest, 0, sizeof(dst->digest)); in hmac_dup() 121 || !ossl_prov_digest_copy(&dst->digest, &src->digest)) { in hmac_dup() 144 const EVP_MD *md = ossl_prov_digest_md(&macctx->digest); in hmac_block_size() 154 const EVP_MD *digest; in hmac_setkey() local 165 digest = ossl_prov_digest_md(&macctx->digest); in hmac_setkey() 167 if (key != NULL || (macctx->tls_data_size == 0 && digest != NULL)) in hmac_setkey() 168 return HMAC_Init_ex(macctx->ctx, key, keylen, digest, in hmac_setkey() 169 ossl_prov_digest_engine(&macctx->digest)); in hmac_setkey() [all …]
|
/freebsd/sys/crypto/ |
H A D | sha1.c | 247 uint8_t *digest; in sha1_result() local 249 digest = (uint8_t *)digest0; in sha1_result() 252 bcopy(&ctxt->h.b8[0], digest, SHA1_RESULTLEN); in sha1_result() 254 digest[0] = ctxt->h.b8[3]; digest[1] = ctxt->h.b8[2]; in sha1_result() 255 digest[2] = ctxt->h.b8[1]; digest[3] = ctxt->h.b8[0]; in sha1_result() 256 digest[4] = ctxt->h.b8[7]; digest[5] = ctxt->h.b8[6]; in sha1_result() 257 digest[6] = ctxt->h.b8[5]; digest[7] = ctxt->h.b8[4]; in sha1_result() 258 digest[8] = ctxt->h.b8[11]; digest[9] = ctxt->h.b8[10]; in sha1_result() 259 digest[10] = ctxt->h.b8[9]; digest[11] = ctxt->h.b8[8]; in sha1_result() 260 digest[12] = ctxt->h.b8[15]; digest[13] = ctxt->h.b8[14]; in sha1_result() [all …]
|
/freebsd/libexec/flua/libhash/ |
H A D | lhash.c | 53 unsigned char digest[SHA256_DIGEST_LEN]; in lua_sha256_digest() local 56 SHA256_Final(digest, ctx); in lua_sha256_digest() 57 lua_pushlstring(L, digest, sizeof(digest)); in lua_sha256_digest() 71 unsigned char digest[SHA256_DIGEST_LEN]; in lua_sha256_hexdigest() local 76 SHA256_Final(digest, ctx); in lua_sha256_hexdigest() 78 buf[i+i] = hex[digest[i] >> 4]; in lua_sha256_hexdigest() 79 buf[i+i+1] = hex[digest[i] & 0x0f]; in lua_sha256_hexdigest()
|