Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: hide private values in debug and serialize #3905

Merged
merged 2 commits into from
Mar 21, 2022

Conversation

Cifko
Copy link
Contributor

@Cifko Cifko commented Mar 9, 2022

Description

Added derivative macro to get rid of the debug prints.

Motivation and Context

Hide all private values that can be exposed accidentally via debug or serializing.

How Has This Been Tested?

integration tests only

@Cifko Cifko changed the title [WIP] chore: hide private values in debug and serialize chore: hide private values in debug and serialize Mar 10, 2022
sdbondi
sdbondi previously approved these changes Mar 14, 2022
Copy link
Member

@sdbondi sdbondi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@Cifko Cifko force-pushed the hide-private branch 3 times, most recently from accc652 to 694fd51 Compare March 17, 2022 02:55
Copy link
Member

@sdbondi sdbondi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just the one signature that does not have to be ignored

comms/src/peer_manager/identity_signature.rs Outdated Show resolved Hide resolved
@Cifko
Copy link
Contributor Author

Cifko commented Mar 18, 2022

These ones are required to be serialized:

base_layer\core\src\transactions\transaction_components\unblinded_output.rs

  • UnblindedOutput
    • spending_key

base_layer\core\src\transactions\transaction_protocol\sender.rs

  • RawTransactionInfo
    • recipient_sender_offset_private_keys
    • private_commitment_nonces
    • gamma
    • private_nonce

base_layer\key_manager\src\key_manager.rs

  • KeyManager
    • seed
    • branch_seed

`base_layer\key_manager\src\wasm.rs

  • DerivedKeypair
    • private_key

comms\src\peer_manager\node_identity.rs

  • NodeIdentity
    • secret_key

@aviator-app aviator-app bot merged commit 4c26862 into tari-project:development Mar 21, 2022
aviator-app bot pushed a commit that referenced this pull request Mar 23, 2022
Description
---
- fixes regression where tor identity private key is not serialised in wallet db

Motivation and Context
---
Following error on wallet startup
```
ExitError { exit_code: WalletError, details: Some("Wallet storage error: `Error converting a type: `An error occurred de-/serialising an object from/into JSON``") }
```

Ref #3905 

How Has This Been Tested?
---
Wallet starts up
@Cifko Cifko deleted the hide-private branch June 23, 2022 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants