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
7626dc42
Commit
7626dc42
authored
1 year ago
by
Richard T. Carback III
Browse files
Options
Downloads
Patches
Plain Diff
Add converter for the private -> public key for prc servers
parent
9eeebee5
No related branches found
No related tags found
1 merge request
!701
RPC Module
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
bindings/rpc.go
+10
-0
10 additions, 0 deletions
bindings/rpc.go
with
10 additions
and
0 deletions
bindings/rpc.go
+
10
−
0
View file @
7626dc42
...
...
@@ -163,6 +163,16 @@ func GenerateRandomRPCKey(cMixID int) ([]byte, error) {
return
prk
.
Bytes
(),
nil
}
// DeriveRPCPublicKey derives the public key from the given private key
func
DeriveRPCPublicKey
(
privateKey
[]
byte
)
([]
byte
,
error
)
{
prk
:=
ecdh
.
ECDHNIKE
.
NewEmptyPrivateKey
()
err
:=
prk
.
FromBytes
(
privateKey
)
if
err
!=
nil
{
return
nil
,
err
}
return
ecdh
.
ECDHNIKE
.
DerivePublicKey
(
prk
)
.
Bytes
(),
nil
}
// LoadRPCServer load key and id from disk and return an RPC server
func
LoadRPCServer
(
cMixID
int
,
callback
RPCServerCallback
)
(
RPCServer
,
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