Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
027bc6b7
Commit
027bc6b7
authored
4 years ago
by
Benjamin Wenger
Browse files
Options
Downloads
Patches
Plain Diff
mode precanned e2e key generation predicable
parent
cdf2ab55
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
api/user.go
+3
-1
3 additions, 1 deletion
api/user.go
with
3 additions
and
1 deletion
api/user.go
+
3
−
1
View file @
027bc6b7
...
...
@@ -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
())
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment