Skip to content

Wrong hash value returned in go v1.16.2 on arm64 #17

@gabrielbulancea

Description

@gabrielbulancea

Hello,

It appears that highwayhash returns a different hash in applications built with go v1.16.2 on linux/arm64.
Below you can find the sample code:

package main

import (
	"fmt"

	"github.com/minio/highwayhash"
)

var zeroHashKey = make([]byte, 32)

func main() {
	h, err := highwayhash.New(zeroHashKey)
	if err != nil {
		panic(err)
	}

	h.Write([]byte("highwayhash"))
	var r []byte

	fmt.Printf("%X\n", h.Sum(r))
}

It was build with:

  • go version go1.14.15 linux/arm64
    Output: 9CDC5F01022BDA9C24EF02BF64FB0D08BF7A55C9BD672D1AF16C25BB68047A60

  • go version go1.16.2 linux/arm64
    Output: 3A6E473DFDAB6331F90B3160D586CC1E05CAFFB09F854935991C026E7A1D4B59

  • the Go Playground running go1.16.2
    Output: 9CDC5F01022BDA9C24EF02BF64FB0D08BF7A55C9BD672D1AF16C25BB68047A60

  • go version go1.16.2 windows/amd64
    Output: 9CDC5F01022BDA9C24EF02BF64FB0D08BF7A55C9BD672D1AF16C25BB68047A60

Highway version: v1.0.1
As you can see, in go1.16.2 linux/arm64 a wrong value is returned, even on different hosts.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions