westberliner / checksum

Plugin for Nextcloud and ownCloud to create hashes of files.
GNU General Public License v3.0
29 stars 15 forks source link

Support SHA-3 #10

Closed rugk closed 7 years ago

rugk commented 7 years ago

Integrating SHA-3 support would be nice.

westberliner commented 7 years ago

Done :) and pushed to apps.[nextcloud|owncloud].com or downloud it directly.

rugk commented 7 years ago

WOW, that was fast… 💪

rugk commented 7 years ago

But… ah you've added sSHA-384 support. Not bad, but not what this issue was about. It was really too fast to solve… SHA-3 is a whole new algorithm, similarly to what SHA-2 (i.e. SHA-256, SHA-512, …) is. See the Wikipedia article I've linked.

westberliner commented 7 years ago

You got lucky cause I fixed some minor issues on checksum right in that moment :) To bad that this is the wrong crypto.

PHP cannot create sha3 out of the box - at least till 7.0.x.

I found this extension https://github.com/strawbrary/php-sha3 or this library https://github.com/0xbb/php-sha3. But I am not a crypto guy so i cannot evaluate if these libraries are good implementations of sha3.

I can implement this in the future if php can generate sha3 more out of the box. If you cannot wait just fork my project or do have any more hints?

rugk commented 7 years ago

Looked around a bit and saw PHP 7.1 added support for SHA-3 in the hash extension. So you might use that. If the algo is not available, just don't show it. :smiley:

westberliner commented 7 years ago

Of course they implemented in PHP 7.1 XD

I had this idea too. To get the algo-list via ajax. But the list is quiet long. So i would want to create a admin settings page for the admin to preselect. In the next version then.

rugk commented 7 years ago

You don't have to get all algos, only the supported ones (and ones used in your project), but I think I get your idea. You could of course make all algos available to the admin.

DJCrashdummy commented 7 years ago

... i would want to create a admin settings page for the admin to preselect.

@westberliner if this gets implemented, the icing on top would be to sort them... (but only if it is not too much work!)