Skip to content

Commit

Permalink
Cleaner fix for #5
Browse files Browse the repository at this point in the history
  • Loading branch information
nadimkobeissi committed Dec 19, 2023
1 parent fe8543e commit f7a41f8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion indcpa.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,10 @@ func indcpaKeypair(paramsK int) ([]byte, []byte, error) {
}
buf = buf[:0]
buf = h.Sum(buf)
publicSeed, noiseSeed := buf[:paramsSymBytes], buf[paramsSymBytes:]
publicSeed := make([]byte, paramsSymBytes)
noiseSeed := make([]byte, paramsSymBytes)
copy(publicSeed, buf[:paramsSymBytes])
copy(noiseSeed, buf[paramsSymBytes:])
a, err := indcpaGenMatrix(publicSeed, false, paramsK)
if err != nil {
return []byte{}, []byte{}, err
Expand Down

0 comments on commit f7a41f8

Please sign in to comment.