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)
Thu, Dec 19, 1:06 AM
Unknown Object (File)
Thu, Dec 19, 12:56 AM
Unknown Object (File)
Thu, Dec 19, 12:37 AM
Unknown Object (File)
Thu, Dec 19, 12:36 AM
Unknown Object (File)
Wed, Dec 18, 10:23 PM
Unknown Object (File)
Wed, Dec 18, 6:16 PM
Unknown Object (File)
Wed, Dec 18, 6:16 PM
Unknown Object (File)
Wed, Dec 18, 6:16 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
Branch
native-tb-client-add-sign-string-func
Lint
No Lint Coverage
Unit
No Test Coverage

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