Skip to content
Snippets Groups Projects
Commit 027bc6b7 authored by Benjamin Wenger's avatar Benjamin Wenger
Browse files

mode precanned e2e key generation predicable

parent cdf2ab55
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,7 @@ import (
"gitlab.com/elixxir/crypto/xx"
"gitlab.com/xx_network/crypto/signature/rsa"
"gitlab.com/xx_network/primitives/id"
"math/rand"
)
const (
......@@ -73,7 +74,8 @@ func createPrecannedUser(precannedID uint, rng csprng.Source, cmix, e2e *cyclic.
// FIXME: Why 256 bits? -- this is spec but not explained, it has
// to do with optimizing operations on one side and still preserves
// decent security -- cite this. Why valid for BOTH e2e and cmix?
e2eKeyBytes, err := csprng.GenerateInGroup(e2e.GetPBytes(), 256, rng)
prng := rand.New(rand.NewSource(int64(precannedID)))
e2eKeyBytes, err := csprng.GenerateInGroup(e2e.GetPBytes(), 256, prng)
if err != nil {
jww.FATAL.Panicf(err.Error())
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment