Skip to content

Instantly share code, notes, and snippets.

@gtank
Created August 19, 2016 17:12
Show Gist options
  • Save gtank/80948ab92eddc0cf9a036ca47f6dff6a to your computer and use it in GitHub Desktop.
Save gtank/80948ab92eddc0cf9a036ca47f6dff6a to your computer and use it in GitHub Desktop.
hs crypto
Crypto operations in HS establishment:
GENERATE: service key (must be 1024-bit RSA)
rend_service_load_keys
init_key_from_file
crypto_pk_generate_key
SIGN: ESTABLISH_INTRO cells (once per intro point)
rend_service_intro_has_opened
crypto_pk_private_sign_digest
HASH: H(public-key)[:10] (=> must have public key)
everywhere, for service ID calculation
SIGN: V2 descriptors (once per hour)
upload_service_descriptor
rend_encode_v2_descriptors
router_append_dirobj_signature
router_get_dirobj_signature
crypto_pk_private_sign
DECRYPT: RELAY_COMMAND_INTRODUCE2 body (once per rendezvous establishment)
rend_service_decrypt_intro
crypto_pk_hybrid_decrypt
"for real" will also need client keys for limited auth case
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment