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

Crypto: Ephemeral Instance Random Seeds with Keepers #84

Merged
merged 1 commit into from
Oct 18, 2022

Conversation

da2ce7
Copy link
Contributor

@da2ce7 da2ce7 commented Sep 12, 2022

This module makes use of lazy_static, to initialize an instance ephemeral random seed for the server to use on startup.

This seed can be used to derive other instance ephemeral keys. The seed is forgotten upon shutdown of the server.

To help with testing, a DefaultSeed helping structure that provides a zeroed seed when testing, and the random seed when not testing.

@da2ce7
Copy link
Contributor Author

da2ce7 commented Sep 14, 2022

Rebased after merge of #81

Copy link
Member

@josecelano josecelano left a comment

Choose a reason for hiding this comment

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

hi @da2ce7, I reviewed this PR and made some comments.

src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/protocol/crypto.rs Outdated Show resolved Hide resolved
@da2ce7 da2ce7 force-pushed the crypto-static-keys branch 2 times, most recently from 8051173 to e5f1c38 Compare September 21, 2022 19:16
@da2ce7 da2ce7 changed the title Crypto: Add Crypro Module for Instance Random Key Crypto: Ephemeral Instance Random Seeds with Keepers Sep 21, 2022
@da2ce7 da2ce7 requested a review from josecelano October 9, 2022 12:07
@da2ce7
Copy link
Contributor Author

da2ce7 commented Oct 17, 2022

ACK d09c58f

@da2ce7 da2ce7 force-pushed the crypto-static-keys branch from d09c58f to 873293a Compare October 18, 2022 11:08
* Implement a lazy static that holds ephemeral seeds that are freshly generated on app load.

* New `crypto` supporting module that provides a simple interface to accessing the seed.

* Provide a 'default seed', that is zeroed-out when testing, and random when not testing.
@da2ce7
Copy link
Contributor Author

da2ce7 commented Oct 18, 2022

ACK 873293a

@da2ce7 da2ce7 merged commit ca07f32 into torrust:develop Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants