Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding SM3 hashing method and whirlpool hashing method #347

Open
chuhei1987 opened this issue Aug 28, 2023 · 15 comments
Open

Adding SM3 hashing method and whirlpool hashing method #347

chuhei1987 opened this issue Aug 28, 2023 · 15 comments

Comments

@chuhei1987
Copy link

I have review the source code, When trying to take RAR out, taking obsolete hashing function out , I'm puzzled. I like some hints how to do that above.

@mcmilk
Copy link
Owner

mcmilk commented Aug 28, 2023

When I remove rar, some other will come and say rar support is important to me.

@chuhei1987
Copy link
Author

Can't create another branch to try out?

I am puzzled taking some bad function out from 23.01 src and try adding new things within. I like some hints for adding sha512 for hashing first.

@Hermholtz
Copy link

@chuhei1987
Why remove RAR support? Because of recent security vulnerability? Then maybe also remove 7z support for the same reason - https://www.zerodayinitiative.com/advisories/ZDI-23-1164/

@chuhei1987
Copy link
Author

@chuhei1987
Why remove RAR support? Because of recent security vulnerability? Then maybe also remove 7z support for the same reason - https://www.zerodayinitiative.com/advisories/ZDI-23-1164/

The question is about modules. As 7-zip is open, you can modify whatever you like.

By the way, I have a branch like that,

chuhei1987/7z2301-src/tree/Version_1 .

I now have to find ways adding new hashing method such as sha512.

@Hermholtz
Copy link

7-zip's strength is that it's universal, versatile and can unpack almost every format on the planet. And how you're thinking about stripping it down to remove a very big share of files that it can handle. This is unwise and childish.

@chuhei1987
Copy link
Author

7-zip's strength is that it's universal, versatile and can unpack almost every format on the planet. And how you're thinking about stripping it down to remove a very big share of files that it can handle. This is unwise and childish.

Perhaps you are right. I just prepare what if while try adding new things.

Dont worry, if you are not quite sure, then try reading these source code , compile by yourself.

@WAUthethird
Copy link

yeah, no, this is not the way forward
I don't want to have to download WinRAR and suffer through its "please pay us" messages, thanks

@chuhei1987
Copy link
Author

chuhei1987 commented Sep 1, 2023

yeah, no, this is not the way forward
I don't want to have to download WinRAR and suffer through its "please pay us" messages, thanks

There is rar extraction module found in zstd and orginal author , which is open source, you can use that if you concent the terms. 7-zip has to provide the term to us because of using the library.

By the way, I like asking one question, how to add new hashing function such as sha512 like what we see in 7-zip ZSTD?

@Hermholtz
Copy link

There is rar extraction module found in zstd and orginal author , which is open source, you can use that if you concent the terms.

On the other hand you can maintain your own fork of 7-zip with any features you want, RAR ripped out, added playing Chopin songs or whatever you desire. But don't force your broken ideas to entire world and all existing users.

@chuhei1987
Copy link
Author

There is rar extraction module found in zstd and orginal author , which is open source, you can use that if you concent the terms.

On the other hand you can maintain your own fork of 7-zip with any features you want, RAR ripped out, added playing Chopin songs or whatever you desire. But don't force your broken ideas to entire world and all existing users.

I may. Perhaps the flaws found in that rar extractor is already fixed.

@mcmilk
Copy link
Owner

mcmilk commented Sep 6, 2023

Okay, I will think about SM3 and Whirlpool - but removing rar will not be done.

@mcmilk mcmilk changed the title Removing RAR support entirely, Adding SM3 hashing method and whirlpool hashing method Adding SM3 hashing method and whirlpool hashing method Sep 6, 2023
@MouriNaruto
Copy link

I want to share something about my thoughts. Here is the content.

I'm struggle about finding a lightweight SM3 hashing implementation. (I don't want to add something like OpenSSL because it's too huge for the project.)

But I think Whirlpool hashing we can use the implementation from RHash. And here is my adaption: https://github.com/M2Team/NanaZip/blob/2.0.450/SevenZip/Extensions/RHash/WhirlpoolHandler.cpp

I hope it can make some help.

Kenji Mouri

@chuhei1987
Copy link
Author

I want to share something about my thoughts. Here is the content.

I'm struggle about finding a lightweight SM3 hashing implementation. (I don't want to add something like OpenSSL because it's too huge for the project.)

But I think Whirlpool hashing we can use the implementation from RHash. And here is my adaption: https://github.com/M2Team/NanaZip/blob/2.0.450/SevenZip/Extensions/RHash/WhirlpoolHandler.cpp

I hope it can make some help.

Kenji Mouri

Additionally, digestpp maybe a starting point for our needs.

@MouriNaruto
Copy link

Additionally, digestpp maybe a starting point for our needs.

About SM3 hashing, I think maybe GmSSL's implementation is lightweight enough.

Kenji Mouri

@chuhei1987
Copy link
Author

Additionally, digestpp maybe a starting point for our needs.

About SM3 hashing, I think maybe GmSSL's implementation is lightweight enough.

Kenji Mouri

There are people making that thing independent, we may try.

By the way, It is not easy finding a suitable one to add in 7-zip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants