Page MenuHomePhabricator

[native/rust_library] Adding `sign_string_with_private_key` function to crypto tools
AcceptedPublic

Authored by max on Dec 22 2022, 7:12 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jun 24, 11:16 AM
Unknown Object (File)
Fri, Jun 21, 1:17 PM
Unknown Object (File)
Thu, Jun 20, 7:29 PM
Unknown Object (File)
Thu, Jun 20, 10:20 AM
Unknown Object (File)
Wed, Jun 19, 10:57 PM
Unknown Object (File)
Tue, Jun 18, 8:03 AM
Unknown Object (File)
Mon, Jun 17, 5:23 AM
Unknown Object (File)
Thu, Jun 13, 2:10 PM
Subscribers

Details

Summary

This diff introduces adding the sign_string_with_private_key function to crypto tools. This function gets the string to be signed and the private key and returns a sha256 signature. We will use this function in the Tunnelbroker client's new session creation because we need to provide the signed string to the Tunnelbroker to prove the ownership of the keys.

Linear task: ENG-1333

Test Plan

Successfully passing the unit test for this function in D6000

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

max held this revision as a draft.

Rebasing on parent changes.

max edited the test plan for this revision. (Show Details)
max added reviewers: jon, bartek.
max published this revision for review.Dec 22 2022, 8:15 AM
native/native_rust_library/src/crypto_tools.rs
42 ↗(On Diff #20029)

This should called a nonce

Change string_to_be_signed to be nonce.

max added inline comments.
native/native_rust_library/src/crypto_tools.rs
42 ↗(On Diff #20029)

This should called a nonce

Fixed.

This revision is now accepted and ready to land.Dec 23 2022, 2:29 PM
max marked an inline comment as done.

Rebasing and merging on master changes.

This diff will be landed after ENG-2563 will be resolved.

This revision is now accepted and ready to land.Dec 29 2022, 8:12 AM