1
0
şunun yansıması https://github.com/henrydcase/nobs.git eşitlendi 2024-11-26 00:51:22 +00:00

improve comment

Initial speed on i7-8665U

> go test -bench=. -test.cpu=1
goos: linux
goarch: amd64
pkg: github.com/henrydcase/nobs/hash/sha3
BenchmarkPermutationFunction 	 1634836	       732 ns/op	 273.18 MB/s
BenchmarkSha3_512_MTU        	   78438	     15340 ns/op	  88.00 MB/s
BenchmarkSha3_384_MTU        	  108807	     11025 ns/op	 122.45 MB/s
BenchmarkSha3_256_MTU        	  136902	      8767 ns/op	 153.98 MB/s
BenchmarkSha3_224_MTU        	  143377	      8355 ns/op	 161.57 MB/s
BenchmarkShake128_MTU        	  163569	      7108 ns/op	 189.94 MB/s
BenchmarkShake256_MTU        	  156534	      7643 ns/op	 176.64 MB/s
BenchmarkShake256_16x        	   10000	    112109 ns/op	 146.14 MB/s
BenchmarkShake256_1MiB       	     204	   5877014 ns/op	 178.42 MB/s
BenchmarkSha3_512_1MiB       	     100	  10967026 ns/op	  95.61 MB/s
PASS
ok  	github.com/henrydcase/nobs/hash/sha3	13.855s
Bu işleme şunda yer alıyor:
Henry Case 2020-08-25 17:08:04 +01:00
ebeveyn 516ea4f5e8
işleme ffd7590213
2 değiştirilmiş dosya ile 4 ekleme ve 4 silme

Dosyayı Görüntüle

@ -49,7 +49,8 @@ type state struct {
state spongeDirection // whether the sponge is absorbing or squeezing
}
// BlockSize returns the rate of sponge underlying this hash function.
// BlockSize returns block size in bytes. Corresponds to the input
// block size B of the HMAC
func (d *state) BlockSize() int { return d.rate }
// Size returns the output size of the hash function in bytes.

Dosyayı Görüntüle

@ -4,9 +4,8 @@
package sha3
// This file defines the ShakeHash interface, and provides
// functions for creating SHAKE and cSHAKE instances, as well as utility
// functions for hashing bytes to arbitrary-length output.
// SHAKE128 and SHAKE256 are FIPS approved XOFs. The cSHAKE128/256
// are SHAKE-based XOFs supporting domain separation.
//
//
// SHAKE implementation is based on FIPS PUB 202 [1]