diff --git a/api/user.go b/api/user.go index 1f90d7c92adb7e75649b838381d4be80ab1a9c45..118db9d47c52d6c01da321406752847d6f3e32d6 100644 --- a/api/user.go +++ b/api/user.go @@ -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()) }