Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Core
Tor
Commits
df78fb24
Commit
df78fb24
authored
6 years ago
by
George Kadianakis
Browse files
Options
Downloads
Patches
Plain Diff
Documentation: Document which descriptor elements are (im)mutable.
parent
29c194e0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/feature/hs/hs_service.h
+37
-21
37 additions, 21 deletions
src/feature/hs/hs_service.h
with
37 additions
and
21 deletions
src/feature/hs/hs_service.h
+
37
−
21
View file @
df78fb24
...
...
@@ -99,48 +99,64 @@ typedef struct hs_service_intropoints_t {
digestmap_t
*
failed_id
;
}
hs_service_intropoints_t
;
/* Representation of a service descriptor. */
/* Representation of a service descriptor.
*
* Some elements of the descriptor are mutable whereas others are immutable:
* Immutable elements are initialized once when the descriptor is built (when
* service descriptors gets rotated). This means that these elements are
* initialized once and then they don't change for the lifetime of the
* descriptor. See build_service_descriptor().
*
* Mutable elements are initialized when we build the descriptor but they are
* also altered during the lifetime of the descriptor. They could be
* _refreshed_ everytime we upload the descriptor (which happens multiple times
* over the lifetime of the descriptor), or through periodic events. We do this
* for elements like the descriptor revision counter and various
* certificates. See refresh_service_descriptor() and
* update_service_descriptor_intro_points().
*/
typedef
struct
hs_service_descriptor_t
{
/* Decoded descriptor. This object is used for encoding when the
service
* publishes the descriptor. */
/*
Mutable:
Decoded descriptor. This object is used for encoding when the
*
service
publishes the descriptor. */
hs_descriptor_t
*
desc
;
/* Client authorization ephemeral keypair. */
/*
Immutable:
Client authorization ephemeral keypair. */
curve25519_keypair_t
auth_ephemeral_kp
;
/* Descriptor cookie used to encrypt the descriptor, when the
client
* authorization is enabled */
/*
Immutable:
Descriptor cookie used to encrypt the descriptor, when the
*
client
authorization is enabled */
uint8_t
descriptor_cookie
[
HS_DESC_DESCRIPTOR_COOKIE_LEN
];
/* Descriptor signing keypair. */
/*
Immutable:
Descriptor signing keypair. */
ed25519_keypair_t
signing_kp
;
/* Blinded keypair derived from the master identity public key. */
/*
Immutable:
Blinded keypair derived from the master identity public key. */
ed25519_keypair_t
blinded_kp
;
/* When is the next time when we should upload the descriptor. */
/*
Mutable:
When is the next time when we should upload the descriptor. */
time_t
next_upload_time
;
/* Introduction points assign to this descriptor which contains
* hs_service_intropoints_t object indexed by authentication key (the RSA
*
key
if the node is legacy). */
/*
Mutable:
Introduction points assign to this descriptor which contains
* hs_service_intropoints_t object indexed by authentication key (the RSA
key
* if the node is legacy). */
hs_service_intropoints_t
intro_points
;
/* The time period number this descriptor has been created for. */
/*
Immutable:
The time period number this descriptor has been created for. */
uint64_t
time_period_num
;
/* True iff we have missing intro points for this descriptor because
we
* couldn't pick any nodes. */
/*
Mutable:
True iff we have missing intro points for this descriptor because
*
we
couldn't pick any nodes. */
unsigned
int
missing_intro_points
:
1
;
/** List of the responsible HSDirs (their b64ed identity digest)
last time we
* uploaded this descriptor. If the set of responsible HSDirs
is different
* from this list, this means we received new dirinfo and we
need to
* reupload our descriptor. */
/**
Mutable:
List of the responsible HSDirs (their b64ed identity digest)
*
last time we
uploaded this descriptor. If the set of responsible HSDirs
*
is different
from this list, this means we received new dirinfo and we
*
need to
reupload our descriptor. */
smartlist_t
*
previous_hsdirs
;
/** The OPE cipher for encrypting revision counters for this
descriptor.
* Tied to the descriptor blinded key. */
/**
Immutable:
The OPE cipher for encrypting revision counters for this
*
descriptor.
Tied to the descriptor blinded key. */
struct
crypto_ope_t
*
ope_cipher
;
}
hs_service_descriptor_t
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment