leekspin.const

String constants.

The following are constant strings used within Tor and OpenSSL to facilitate conversion between formats. Most are the -----BEGIN …----- and -----END…----- lines in PEM encoded keys and signatures.

Constant Description
TOR_BEGIN_KEY Found at the beginning of a public key
TOR_END_KEY Found at the end of a public key
TOR_BEGIN_SK Found at the beginning of a private key
TOR_END_SK Found at the end of a private key
TOR_BEGIN_SIG Found at the beginning of a signature
TOR_END_SIG Found at the end of a signature
TOR_BEGIN_MSG Found at the beginning of the encrypted introduction-points in an Hidden Service descriptor
TOR_END_MSG Found at the end of the encrypted introduction-points in an Hidden Service descriptor
OPENSSL_BEGIN_KEY Found at the beginning of all OpenSSL-generated keys
OPENSSL_END_KEY Found at the end of all OpenSSL-generated keys
OPENSSL_BEGIN_CERT Found at the beginning of all OpenSSL-generated certs
OPENSSL_END_CERT Found at the end of all OpenSSL-generated certs

Strings found in PEM-encoded objects created by Tor:

TOR_BEGIN_KEY = '-----BEGIN RSA PUBLIC KEY-----'
TOR_END_KEY = '-----END RSA PUBLIC KEY-----'
TOR_BEGIN_SK = '-----BEGIN RSA PRIVATE KEY-----'
TOR_END_SK = '-----END RSA PRIVATE KEY-----'
TOR_BEGIN_SIG = '-----BEGIN SIGNATURE-----'
TOR_END_SIG = '-----END SIGNATURE-----'
TOR_BEGIN_MSG = '-----BEGIN MESSAGE-----'
TOR_END_MSG = '-----END MESSAGE-----'

Tokens for [bridge-]server-descriptors:

TOKEN_SIGNING_KEY = 'signing-key\n'
TOKEN_ONION_KEY = 'onion-key\n'
TOKEN_ROUTER_SIGNATURE = 'router-signature\n'

Tokens for rendezvous-service-descriptors:

TOKEN_REND_SERV = 'rendezvous-service-descriptor '
TOKEN_PERMANENT_KEY = 'permanent-key\r\n'
TOKEN_SECRET_ID_PART = 'secret-id-part '
TOKEN_HS_PUBLICATION = 'publication-time '
TOKEN_HS_PROTO_VERSIONS = 'protocol-versions '
TOKEN_HS_INTRO_POINTS = 'introduction-points\r\n'
TOKEN_HS_SIGNATURE = 'signature\r\n'

Strings found in PEM-encoded objects created by OpenSSL:

OPENSSL_BEGIN_KEY = '-----BEGIN PRIVATE KEY-----'
OPENSSL_END_KEY = '-----END PRIVATE KEY-----'
OPENSSL_BEGIN_CERT = '-----BEGIN CERTIFICATE-----'
OPENSSL_END_CERT = '-----END CERTIFICATE-----'