7-Zip-zstd icon indicating copy to clipboard operation
7-Zip-zstd copied to clipboard

Adding SM3 hashing method and whirlpool hashing method

Open chuhei1987 opened this issue 1 year ago • 15 comments

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.

chuhei1987 avatar Aug 28 '23 05:08 chuhei1987

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

mcmilk avatar Aug 28 '23 07:08 mcmilk

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.

chuhei1987 avatar Aug 28 '23 11:08 chuhei1987

@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/

Hermholtz avatar Sep 01 '23 11:09 Hermholtz

@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.

chuhei1987 avatar Sep 01 '23 12:09 chuhei1987

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.

Hermholtz avatar Sep 01 '23 12:09 Hermholtz

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.

chuhei1987 avatar Sep 01 '23 13:09 chuhei1987

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

WAUthethird avatar Sep 01 '23 14:09 WAUthethird

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?

chuhei1987 avatar Sep 01 '23 15:09 chuhei1987

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.

Hermholtz avatar Sep 01 '23 18:09 Hermholtz

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.

chuhei1987 avatar Sep 02 '23 01:09 chuhei1987

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

mcmilk avatar Sep 06 '23 15:09 mcmilk

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

MouriNaruto avatar Sep 15 '23 04:09 MouriNaruto

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.

chuhei1987 avatar Sep 15 '23 06:09 chuhei1987

Additionally, digestpp maybe a starting point for our needs.

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

Kenji Mouri

MouriNaruto avatar Sep 15 '23 06:09 MouriNaruto

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.

chuhei1987 avatar Sep 15 '23 07:09 chuhei1987