Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about the gerneration of the index #1

Open
xhylol opened this issue May 7, 2018 · 0 comments
Open

about the gerneration of the index #1

xhylol opened this issue May 7, 2018 · 0 comments

Comments

@xhylol
Copy link

xhylol commented May 7, 2018

why use the BigEndian and the LittleEndian of the fingerprint to gernerate the both index, rather than the way described in CMU paper?

Your way:
func genFirstIndex(sign Signature, numBuckets uint) uint {
bytes := make([]byte, 64, 64)
for i, b := range sign {
bytes[i] = b
}
hash := binary.LittleEndian.Uint64(bytes)
return uint(hash) & (numBuckets - 1)
}

func genBackupIndex(sign Signature, numBuckets uint) uint {
bytes := make([]byte, 64, 64)
for i, b := range sign {
bytes[i] = b
}
hash := binary.BigEndian.Uint64(bytes)
return uint(hash) & (numBuckets - 1)
}

Paper's way:
1

@xhylol xhylol changed the title about the gerneration of the index? about the gerneration of the index May 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant