Displaying 4 results from an estimated 4 matches for "ssh_digest".
Did you mean:
ssha_digest
2014 Jul 15
2
missing HAVE_EVP_RIPEMD160 breaks ssh client
Hello,
I've updated sources but forgot to recreate configure so I've ended without
#define HAVE_EVP_RIPEMD160 1
and ssh client ended with:
OpenSSH_6.7p1, OpenSSL 1.0.1h-fips 5 Jun 2014
debug1: Reading configuration data ssh.config
main: mux digest failed
The problem was that ssh_digest_by_alg() couldn't verify alg with an index bigger than 1 since
the line with SSH_DIGEST_RIPEMD160 wasn't compiled in and all indexes in the ssh_digest digests array
was lowered by one.
/* NB. Indexed directly by algorithm number */
const struct ssh_digest digests[] = {
{ SSH_DIGEST_MD5, &...
2024 Aug 06
1
[PATCH] Add SM3 secure hash algorithm
...dd4..87aefe0066d8 100644
--- a/digest-libc.c
+++ b/digest-libc.c
@@ -46,6 +46,7 @@
#define SHA512_BLOCK_LENGTH SHA512_HMAC_BLOCK_SIZE
#endif
+#include "sm3.h"
#include "ssherr.h"
#include "sshbuf.h"
#include "digest.h"
@@ -121,6 +122,16 @@ const struct ssh_digest digests[SSH_DIGEST_MAX] = {
(md_init_fn *) SHA512Init,
(md_update_fn *) SHA512Update,
(md_final_fn *) SHA512Final
+ },
+ {
+ SSH_DIGEST_SM3,
+ "SM3",
+ SM3_BLOCK_LENGTH,
+ SM3_DIGEST_LENGTH,
+ sizeof(SM3_CTX),
+ (md_init_fn *) SM3Init,
+ (md_update_fn *) SM3Update,
+ (md_...
2024 Aug 07
1
[PATCH] Add SM3 secure hash algorithm
...+++ b/digest-libc.c
> @@ -46,6 +46,7 @@
> #define SHA512_BLOCK_LENGTH SHA512_HMAC_BLOCK_SIZE
> #endif
>
> +#include "sm3.h"
> #include "ssherr.h"
> #include "sshbuf.h"
> #include "digest.h"
> @@ -121,6 +122,16 @@ const struct ssh_digest digests[SSH_DIGEST_MAX] = {
> (md_init_fn *) SHA512Init,
> (md_update_fn *) SHA512Update,
> (md_final_fn *) SHA512Final
> + },
> + {
> + SSH_DIGEST_SM3,
> + "SM3",
> + SM3_BLOCK_LENGTH,
> + SM3_DIGEST_LENGTH,
> + sizeof(SM3_CTX),
> + (md_ini...
2014 Apr 05
0
[PATCH] Use EVP_Digest
...Please consider applying the following patch:
diff -ru openssh-6.6p1.orig/digest-openssl.c openssh-6.6p1/digest-openssl.c
--- openssh-6.6p1.orig/digest-openssl.c 2014-02-04 02:25:45.000000000 +0200
+++ openssh-6.6p1/digest-openssl.c 2014-04-04 17:00:29.548457919 +0300
@@ -148,14 +148,11 @@
int
ssh_digest_memory(int alg, const void *m, size_t mlen, u_char *d, size_t dlen)
{
- struct ssh_digest_ctx *ctx = ssh_digest_start(alg);
+ const struct ssh_digest *digest = ssh_digest_by_alg(alg);
- if (ctx == NULL)
+ if (!EVP_Digest(m, mlen, d, dlen, digest->mdfunc(), NULL))
return -1;
- if (ssh_diges...