Displaying 15 results from an estimated 15 matches for "md5_update".
2004 Aug 09
1
[PATCH] RPA authentication mechanism
...nst char *str, size_t *size);
+
+/*
+ * Compute client -> server authentication response.
+ */
+static void rpa_user_response(struct rpa_auth_request *auth,
+ unsigned char *digest)
+{
+ struct md5_context ctx;
+ unsigned char z[48];
+
+ memset(z, 0, sizeof(z));
+
+ md5_init(&ctx);
+ md5_update(&ctx, auth->pwd_md5, 16);
+ md5_update(&ctx, z, sizeof(z));
+ md5_update(&ctx, auth->username_ucs2be, auth->username_len);
+ md5_update(&ctx, auth->service_ucs2be, auth->service_len);
+ md5_update(&ctx, auth->realm_ucs2be, auth->realm_len);
+ md5_update(&...
2020 Feb 09
2
[RFC PATCH] Add SHA1 support
..., sum);
+ mdlib_free_ctx(mdctx);
+}
+
void get_checksum2(char *buf, int32 len, char *sum)
{
md_context m;
switch (xfersum_type) {
- case CSUM_MD5: {
- uchar seedbuf[4];
- md5_begin(&m);
- if (proper_seed_order) {
- if (checksum_seed) {
- SIVALu(seedbuf, 0, checksum_seed);
- md5_update(&m, seedbuf, 4);
- }
- md5_update(&m, (uchar *)buf, len);
- } else {
- md5_update(&m, (uchar *)buf, len);
- if (checksum_seed) {
- SIVALu(seedbuf, 0, checksum_seed);
- md5_update(&m, seedbuf, 4);
- }
- }
- md5_result(&m, (uchar *)sum);
+ case CSUM_SHA1:
+...
2001 Jun 06
0
snk authentication
...(char *)&iv;
+ for(i=0; i < 8; i++)*p++ = 130-i;
+
+ des_cbc_encrypt((des_cblock *)data, (des_cblock *)kbuf, 16l,
+ keysched, &iv, DES_DECRYPT);
+ j = (kbuf[8]&0xff) + (kbuf[9]&0xff) * 256;
+ if( j < 0 || j >=reslen){
+ return 1;
+ }
+ MD5_Init(&ctx);
+ MD5_Update(&ctx, (unsigned char *)&kbuf[8], 2);
+ MD5_Update(&ctx, (unsigned char *)&kbuf[10], (j<=6) ? j : 6);
+
+ strncpy(res, &kbuf[10], 6);
+ res[6] = '\0';
+ j -= 6;
+ if( j > 0){
+ i = (j+7)& 0xf8;
+ des_cbc_encrypt((des_cblock *)&data[16],
+ (des_c...
2020 May 24
3
[PATCH] file_checksum() optimization
...MAP_SIZE, CSUM_CHUNK);
+ buf = map_file(fd, len, MAX_MAP_SIZE, CHUNK_SIZE);
switch (checksum_type) {
case CSUM_MD5: {
@@ -302,8 +302,8 @@ void file_checksum(const char *fname, const
STRUCT_STAT *st_p, char *sum)
MD5_Init(&m5);
- for (i = 0; i + CSUM_CHUNK <= len; i += CSUM_CHUNK)
- MD5_Update(&m5, (uchar *)map_ptr(buf, i, CSUM_CHUNK), CSUM_CHUNK);
+ for (i = 0; i + CHUNK_SIZE <= len; i += CHUNK_SIZE)
+ MD5_Update(&m5, (uchar *)map_ptr(buf, i, CHUNK_SIZE), CHUNK_SIZE);
remainder = (int32)(len - i);
if (remainder > 0)
@@ -319,8 +319,8 @@ void file_checksum(const char *f...
2018 Jan 12
1
Reading over than the file size on dispersed volume
...42byte header in each files when create the file )
char buf[128*1024] = {0,};
offset += 42;
while ((retr = glfs_pread(fd, (void*)&buf, sizeof(buf), offset, 0)) >
0) {
DEBUG("retr : %ld, offset : %ld(%d)", retr,offset,errno) ;
offset += retr;
MD5_Update(&context, buf, retr);
}
DEBUG("total : %d", offset);
[DEBUG] retr : 130394, offset : 42(0) (star_glusterfs.c:96)
[DEBUG] retr : 1024, offset : 130436(0) (star_glusterfs.c:96)
[DEBUG] retr : 636, offset : 131460(0) (star_glusterfs.c:96)
[DEBUG] total : 132096 (star_glusterfs....
2012 Sep 04
2
[PATCH] Generalize HMAC implementation
...LEN];
- struct hmac_md5_context ctx;
+ struct hmac_context ctx;
const char *response_hex;
if (size != CRAM_MD5_CONTEXTLEN) {
@@ -59,9 +61,10 @@
return FALSE;
}
+ hmac_init(&ctx, NULL, 0, &hash_method_md5);
hmac_md5_set_cram_context(&ctx, credentials);
- hmac_md5_update(&ctx, request->challenge, strlen(request->challenge));
- hmac_md5_final(&ctx, digest);
+ hmac_update(&ctx, request->challenge, strlen(request->challenge));
+ hmac_final(&ctx, digest);
response_hex = binary_to_hex(digest, sizeof(digest));
diff --git a/src/auth/mech-...
2004 Sep 30
1
[PATCH] NTLM2 support
...nsigned char
}
void
+ntlmssp2_response(const unsigned char *hash,
+ const unsigned char *server_challenge,
+ const unsigned char *client_challenge,
+ unsigned char response[NTLMSSP_RESPONSE_SIZE])
+{
+ struct md5_context ctx;
+ unsigned char session_hash[16];
+
+ md5_init(&ctx);
+ md5_update(&ctx, server_challenge, NTLMSSP_CHALLENGE_SIZE);
+ md5_update(&ctx, client_challenge, NTLMSSP_CHALLENGE_SIZE);
+ md5_final(&ctx, session_hash);
+
+ ntlmssp_v1_response(hash, session_hash, response);
+}
+
+void
ntlmssp_v2_response(const char *user, const char *target,
const unsig...
2008 Aug 15
2
SSH Command Line Password Support
Hello,
I am interested in an ssh that is not interactive in requesting the password, i.e, whereas I can specify the password in the command line when calling SSH.
I have wondered how such a feature has not been included in such a good client, as it seems there are many (and I have searched for this) people require this capability for their scripts/automation.
I understand the possibility of
2003 Sep 17
1
sftp reget/reput
Hello openssh@
I thought about sftp's reget/reput commands.
Several days ago, Damien Miller write to tech at openbsd.org (it was
reply for my letter):
> Herein lies a problem which is not easy to detect or solve. For
> performance reasons, the sftp client does pipelined reads/writes when
> transferring files. The protocol spec allows for a server to process
> these requests out
2011 Dec 28
1
Need for a partial checksums patch?
...ob of data with high probability and check if it had been backed up
already.
I experimented by adding a new option that causes file_checksum() to not
sweep the file linearly but with increasing intervals. As a first approach,
I just doubled the index 'i' in each iteration and added another md5_update
to be applied at location size-i-CSUM_CHUNK. Thus, the file is checksummed
sparsely but with increasing density towards the beginning and the end of
the file. This seems to work well enough for me and best of all, it's
blazing fast (with enough practical confidence, for me). Further details
and...
2004 Jul 01
3
[PATCH, RFC] add APOP authentication mechanism
..._digest, sizeof(remote_digest));
+ if (hex_to_binary(auth->digest, digest_buf) <= 0) {
+ if (verbose)
+ i_info("apop(%s): invalid characters in APOP digest", get_log_prefix(auth_request));
+ mech_auth_finish(auth_request, NULL, 0, FALSE);
+ return;
+ }
+
+ md5_init(&ctx);
+ md5_update(&ctx, auth->challenge, strlen(auth->challenge));
+ md5_update(&ctx, credentials, strlen(credentials));
+ md5_final(&ctx, digest);
+
+ safe_memset((void *) credentials, 0, strlen(credentials));
+
+ mech_auth_finish(auth_request, NULL, 0,
+ memcmp(digest, remote_digest, 16) ? FAL...
2006 Jun 26
1
[PATCH, RFC 0/13] OTP: add auth_cache_remove()
This patchset add support for One-Time-Password authentication mechanisms,
both S/Key (RFC 1731) and OTP (RFC 2444) are implemented.
Tested with mutt (uses cyrus sasl library for authentication).
Patches were made against CVS HEAD. Please take a look.
Add auth_cache_remove() function which will be used by OTP code to evict
old entries from auth cache.
diff -urdpNX /usr/share/dontdiff -x
2020 May 22
2
[PATCH] Optimized assembler version of md5_process() for x86-64
...100644
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -147,6 +147,10 @@ static void md5_process(md_context *ctx, const
uchar data[CSUM_CHUNK])
ctx->D += D;
}
+#if defined(HAVE_SIMD) && (CSUM_CHUNK == 64)
+extern void md5_process_asm(md_context *ctx, const void *data, size_t num);
+#endif
+
void md5_update(md_context *ctx, const uchar *input, uint32 length)
{
uint32 left, fill;
@@ -171,11 +175,20 @@ void md5_update(md_context *ctx, const uchar
*input, uint32 length)
left = 0;
}
+#if defined(HAVE_SIMD) && (CSUM_CHUNK == 64)
+ if (length >= CSUM_CHUNK) {
+ uint32 chunks = l...
2005 Aug 09
2
error compiling asterisk on solaris
...ence to `RSA_size'
/usr/local/ssl/lib/libssl.so: undefined reference to `RAND_pseudo_bytes'
/usr/local/ssl/lib/libssl.so: undefined reference to `BIO_s_connect'
/usr/local/ssl/lib/libssl.so: undefined reference to `EVP_PKEY_free'
/usr/local/ssl/lib/libssl.so: undefined reference to `MD5_Update'
/usr/local/ssl/lib/libssl.so: undefined reference to `HMAC_Update'
/usr/local/ssl/lib/libssl.so: undefined reference to `X509_STORE_CTX_set_verify_ cb'
/usr/local/ssl/lib/libssl.so: undefined reference to `ERR_load_strings'
/usr/local/ssl...
2008 Apr 21
3
FIPS 140-2 OpenSSL(2007) patches
...sha);
+ SHA1_Update(&sha, (const u_char *)passphrase, strlen(passphrase));
+ SHA1_Final(digest, &sha);
+
+ cipher_init(cc, cipher, digest, 20, NULL, 0, do_encrypt);
+
+ memset(digest, 0, sizeof(digest));
+ memset(&sha, 0, sizeof(sha));
+ return;
+ }
+#endif
MD5_Init(&md);
MD5_Update(&md, (const u_char *)passphrase, strlen(passphrase));
MD5_Final(digest, &md);
--- openssh-4.7p1/configure.ac Mon Dec 17 20:25:49 2007
+++ openssh-4.7p1/configure.ac Mon Dec 17 20:29:36 2007
@@ -438,6 +438,7 @@
if test -z "$GCC"; then
CFLAGS="$CFLAGS -Ae"
fi
+...