mirror of
https://github.com/minio/minio.git
synced 2025-04-26 13:02:24 -04:00
This change adds the HighwayHash256 PRF as bitrot protection / detection algorithm. Since HighwayHash256 requires a 256 bit we generate a random key from the first 100 decimals of π - See nothing-up-my-sleeve-numbers. This key is fixed forever and tied to the HighwayHash256 bitrot algorithm. Fixes #5358
27 lines
497 B
Go
27 lines
497 B
Go
// Copyright (c) 2017 Minio Inc. All rights reserved.
|
|
// Use of this source code is governed by a license that can be
|
|
// found in the LICENSE file.
|
|
|
|
// +build !amd64
|
|
// +build !arm64
|
|
|
|
package highwayhash
|
|
|
|
var (
|
|
useSSE4 = false
|
|
useAVX2 = false
|
|
useNEON = false
|
|
)
|
|
|
|
func initialize(state *[16]uint64, k []byte) {
|
|
initializeGeneric(state, k)
|
|
}
|
|
|
|
func update(state *[16]uint64, msg []byte) {
|
|
updateGeneric(state, msg)
|
|
}
|
|
|
|
func finalize(out []byte, state *[16]uint64) {
|
|
finalizeGeneric(out, state)
|
|
}
|