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
70d4c085
Commit
70d4c085
authored
2 years ago
by
Jake Taylor
Browse files
Options
Downloads
Patches
Plain Diff
fix precan crash
parent
734ecb66
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!510
Release
,
!267
Make BuildReceptionIdentity public, and make backup restore function return a...
,
!263
Hotfix/refactor cmd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
xxdk/user.go
+1
-10
1 addition, 10 deletions
xxdk/user.go
with
1 addition
and
10 deletions
xxdk/user.go
+
1
−
10
View file @
70d4c085
...
@@ -242,16 +242,6 @@ func createNewVanityUser(rng csprng.Source,
...
@@ -242,16 +242,6 @@ func createNewVanityUser(rng csprng.Source,
// createPrecannedUser
// createPrecannedUser
func
createPrecannedUser
(
precannedID
uint
,
rng
csprng
.
Source
,
e2e
*
cyclic
.
Group
)
user
.
Info
{
func
createPrecannedUser
(
precannedID
uint
,
rng
csprng
.
Source
,
e2e
*
cyclic
.
Group
)
user
.
Info
{
// DH Keygen
// 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?
prng
:=
rand
.
New
(
rand
.
NewSource
(
int64
(
precannedID
)))
e2eKeyBytes
,
err
:=
csprng
.
GenerateInGroup
(
e2e
.
GetPBytes
(),
256
,
prng
)
if
err
!=
nil
{
jww
.
FATAL
.
Panicf
(
err
.
Error
())
}
// Salt, UID, etc gen
// Salt, UID, etc gen
salt
:=
make
([]
byte
,
SaltSize
)
salt
:=
make
([]
byte
,
SaltSize
)
...
@@ -267,6 +257,7 @@ func createPrecannedUser(precannedID uint, rng csprng.Source, e2e *cyclic.Group)
...
@@ -267,6 +257,7 @@ func createPrecannedUser(precannedID uint, rng csprng.Source, e2e *cyclic.Group)
prime
:=
e2e
.
GetPBytes
()
prime
:=
e2e
.
GetPBytes
()
keyLen
:=
len
(
prime
)
keyLen
:=
len
(
prime
)
prng
:=
rand
.
New
(
rand
.
NewSource
(
int64
(
precannedID
)))
dhPrivKey
:=
diffieHellman
.
GeneratePrivateKey
(
keyLen
,
e2e
,
prng
)
dhPrivKey
:=
diffieHellman
.
GeneratePrivateKey
(
keyLen
,
e2e
,
prng
)
return
user
.
Info
{
return
user
.
Info
{
TransmissionID
:
&
userID
,
TransmissionID
:
&
userID
,
...
...
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