Code Monkey home page Code Monkey logo

hash_extender's Issues

Support for SM3

According to Wikipedia, the cryptographic hash function used in the Chinese National Standard uses Merkle-Damgård construction. Therefore, the algorithm is vulnerable to length extension attacks.

Would you like to support it?

can't make hash_extender on kali 2021.3

when i try to make,got a problem like this
ash_extender_engine.c: In function ‘md4_hash’: hash_extender_engine.c:362:3: error: ‘MD4_Init’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations] 362 | MD4_Init(&c); | ^~~~~~~~ In file included from hash_extender_engine.c:26: /usr/include/openssl/md4.h:50:27: note: declared here 50 | OSSL_DEPRECATEDIN_3_0 int MD4_Init(MD4_CTX *c); | ^~~~~~~~ hash_extender_engine.c:367:7: error: ‘MD4_Update’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations] 367 | MD4_Update(&c, "A", 1); | ^~~~~~~~~~ In file included from hash_extender_engine.c:26: /usr/include/openssl/md4.h:51:27: note: declared here 51 | OSSL_DEPRECATEDIN_3_0 int MD4_Update(MD4_CTX *c, const void *data, size_t len); | ^~~~~~~~~~ hash_extender_engine.c:375:3: error: ‘MD4_Update’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations] 375 | MD4_Update(&c, data, length); | ^~~~~~~~~~ In file included from hash_extender_engine.c:26: /usr/include/openssl/md4.h:51:27: note: declared here 51 | OSSL_DEPRECATEDIN_3_0 int MD4_Update(MD4_CTX *c, const void *data, size_t len); | ^~~~~~~~~~ hash_extender_engine.c:376:3: error: ‘MD4_Final’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations] 376 | MD4_Final(buffer, &c); | ^~~~~~~~~
how to solve this?

Can't make hash_extender on Windows 7 x64

Getting the following error:

$ make
[CC] formats.o
<command-line>: error: missing whitespace after the macro name
In file included from test.h:4,
                 from formats.c:4:
util.h:4:17: error: err.h: No such file or directory
make: *** [Makefile:39: formats.o] Error 1

Any pointers what should I do?

Thanks.

You may also need the length of `secret`

in your text you say

Knowing only data, H, and signature, the attacker's goal is to append 'append' to data and generate a valid signature for the new data. And that's easy to do! Let's see how.

but actually, you need the length of secret to calculate the length of padding?

"hash_extender: Couldn't parse argument" with example from readme (on ARM m2 mac and vm arm ubuntu)

➜  hash_extender ./hash_extender --data data --secret 6 --append append --signature 6036708eba0d11f6ef52ad44e8b74d5b --format sha256

hash_extender: Couldn't parse argument

this is the output im getting when running the readme example...

additionally the selftest segfaults:

➜  hash_extender ./hash_extender_test                                                                                               

md4: Testing some basic hash data...
md4: Testing hash data of various lengths...
md5: Testing some basic hash data...
md5: Testing hash data of various lengths...
ripemd160: Testing some basic hash data...
ripemd160: Testing hash data of various lengths...
sha: Testing some basic hash data...
sha: Testing hash data of various lengths...
sha1: Testing some basic hash data...
sha1: Testing hash data of various lengths...
sha256: Testing some basic hash data...
sha256: Testing hash data of various lengths...
sha512: Testing some basic hash data...
sha512: Testing hash data of various lengths...
sm3: Testing some basic hash data...
[1]    72710 segmentation fault (core dumped)  ./hash_extender_test

running on arm ubuntu 22.04 vm on arm mac m2

can't make hash_extender on mac os 10.11

➜ hash_extender git:(master) ✗ make
[CC] buffer.o
[CC] formats.o
[CC] hash_extender.o
[CC] hash_extender_engine.o
[CC] test.o
[CC] util.o
[LD] hash_extender
Undefined symbols for architecture x86_64:
"_WHIRLPOOL_Final", referenced from:
_whirlpool_hash in hash_extender_engine.o
"_WHIRLPOOL_Init", referenced from:
_whirlpool_hash in hash_extender_engine.o
"_WHIRLPOOL_Update", referenced from:
_whirlpool_hash in hash_extender_engine.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [hash_extender] Error 1

how can I fix it

correctness of the MD5 hash value

How did we calculate the original hash 6036708eba0d11f6ef52ad44e8b74d5b? I am getting a different hash value when i use hash_extension_1.c to calculate H(secret||data) . Would be happy if you could answer this.

Can't "make" on Kali 2016.2

Hi
Compilation by "make" worked first time on old Kali, having issues with later Kali (2016.2). First I got:
hash_extender_engine.c:25:25: fatal error: openssl/md4.h: No such file or directory
I solved this by locating md4.h and added a -I/path/to/file in the CPPFLAGS of the Makefile. Next I got:
/usr/bin/ld: cannot find -lssl
/usr/bin/ld: cannot find -lcrypto

I found a ssl.so and crypto.so in different and pretty random-looking places. But I went ahead and added -L/path/to/file (twice to cover both files) in the LDFLAGS of the Makefile. But no joy.
Needless to say my make/gcc skills aren't great so help appreciated where Google is letting me down.
Cheers

Can't make hash_extender

Assumed we just need to run make. Got this error at the start of the process.

$ make
uname: illegal option -- o
usage: uname [-amnprsv]
[CC] buffer.o
In file included from :162:
:2:9: error: macro names must be identifiers

define -DDISABLE_WHIRLPOOL 1

    ^

1 error generated.
make: *** [buffer.o] Error 1

As you can see, just using the make that comes with Apple.

$ make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.