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
30f1e3f2
Commit
30f1e3f2
authored
3 years ago
by
Richard T. Carback III
Browse files
Options
Downloads
Patches
Plain Diff
Move user interface to backup
parent
18063513
No related branches found
No related tags found
4 merge requests
!510
Release
,
!207
WIP: Client Restructure
,
!203
Symmetric broadcast
,
!197
WIP: Convert API to use new restructure
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
interfaces/user/user.go
+0
-94
0 additions, 94 deletions
interfaces/user/user.go
with
0 additions
and
94 deletions
interfaces/user/user.go
deleted
100644 → 0
+
0
−
94
View file @
18063513
///////////////////////////////////////////////////////////////////////////////
// Copyright © 2020 xx network SEZC //
// //
// Use of this source code is governed by a license that can be found in the //
// LICENSE file //
///////////////////////////////////////////////////////////////////////////////
package
user
import
(
"gitlab.com/elixxir/crypto/backup"
"gitlab.com/elixxir/crypto/contact"
"gitlab.com/elixxir/crypto/cyclic"
"gitlab.com/elixxir/primitives/fact"
"gitlab.com/xx_network/crypto/signature/rsa"
"gitlab.com/xx_network/primitives/id"
)
type
Proto
struct
{
//General Identity
TransmissionID
*
id
.
ID
TransmissionSalt
[]
byte
TransmissionRSA
*
rsa
.
PrivateKey
ReceptionID
*
id
.
ID
ReceptionSalt
[]
byte
ReceptionRSA
*
rsa
.
PrivateKey
Precanned
bool
// Timestamp in which user has registered with the network
RegistrationTimestamp
int64
RegCode
string
TransmissionRegValidationSig
[]
byte
ReceptionRegValidationSig
[]
byte
//e2e Identity
E2eDhPrivateKey
*
cyclic
.
Int
E2eDhPublicKey
*
cyclic
.
Int
}
type
Info
struct
{
//General Identity
TransmissionID
*
id
.
ID
TransmissionSalt
[]
byte
TransmissionRSA
*
rsa
.
PrivateKey
ReceptionID
*
id
.
ID
ReceptionSalt
[]
byte
ReceptionRSA
*
rsa
.
PrivateKey
Precanned
bool
// Timestamp in which user has registered with the network
RegistrationTimestamp
int64
//e2e Identity
E2eDhPrivateKey
*
cyclic
.
Int
E2eDhPublicKey
*
cyclic
.
Int
}
func
(
u
Info
)
GetContact
()
contact
.
Contact
{
return
contact
.
Contact
{
ID
:
u
.
ReceptionID
.
DeepCopy
(),
DhPubKey
:
u
.
E2eDhPublicKey
,
Facts
:
make
([]
fact
.
Fact
,
0
),
}
}
func
NewUserFromProto
(
proto
*
Proto
)
Info
{
return
Info
{
TransmissionID
:
proto
.
TransmissionID
,
TransmissionSalt
:
proto
.
TransmissionSalt
,
TransmissionRSA
:
proto
.
TransmissionRSA
,
ReceptionID
:
proto
.
ReceptionID
,
ReceptionSalt
:
proto
.
ReceptionSalt
,
ReceptionRSA
:
proto
.
ReceptionRSA
,
Precanned
:
proto
.
Precanned
,
RegistrationTimestamp
:
proto
.
RegistrationTimestamp
,
E2eDhPrivateKey
:
proto
.
E2eDhPrivateKey
,
E2eDhPublicKey
:
proto
.
E2eDhPublicKey
,
}
}
func
NewUserFromBackup
(
backup
*
backup
.
Backup
)
Info
{
return
Info
{
TransmissionID
:
backup
.
TransmissionIdentity
.
ComputedID
,
TransmissionSalt
:
backup
.
TransmissionIdentity
.
Salt
,
TransmissionRSA
:
backup
.
TransmissionIdentity
.
RSASigningPrivateKey
,
ReceptionID
:
backup
.
ReceptionIdentity
.
ComputedID
,
ReceptionSalt
:
backup
.
ReceptionIdentity
.
Salt
,
ReceptionRSA
:
backup
.
ReceptionIdentity
.
RSASigningPrivateKey
,
Precanned
:
false
,
RegistrationTimestamp
:
backup
.
RegistrationTimestamp
,
E2eDhPrivateKey
:
backup
.
ReceptionIdentity
.
DHPrivateKey
,
E2eDhPublicKey
:
backup
.
ReceptionIdentity
.
DHPublicKey
,
}
}
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