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
F3492170: D5999.diff
Wed, Dec 18, 10:23 PM
F3491018: D5999.id20299.diff
Wed, Dec 18, 6:16 PM
F3491016: D5999.id20255.diff
Wed, Dec 18, 6:16 PM
F3491015: D5999.id20076.diff
Wed, Dec 18, 6:16 PM
F3491014: D5999.id20026.diff
Wed, Dec 18, 6:16 PM
F3491013: D5999.id20029.diff
Wed, Dec 18, 6:16 PM
F3488661: D5999.id.diff
Wed, Dec 18, 10:59 AM
Unknown Object (File)
Wed, Nov 27, 1:12 AM
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