Add Tor-specific binary format for ED25519 keys

fixes #5
This commit is contained in:
Abel Luck 2025-09-10 14:00:12 +02:00
parent 5bf771ac96
commit f1cccbe22b
4 changed files with 102 additions and 1 deletions

View file

@ -58,6 +58,8 @@ resource "local_sensitive_file" "family_key" {
resource "tor_relay_identity_rsa" "bridge" {}
resource "tor_relay_identity_ed25519" "bridge" {}
# Note: Ed25519 keys are available in both PEM format (private_key_pem, public_key_pem)
# and Tor's binary format (private_key_tor, public_key_tor)
resource "tor_obfs4_state" "bridge" {
rsa_identity_private_key = tor_relay_identity_rsa.bridge.private_key_pem
@ -86,11 +88,17 @@ output "rsa_fingerprint_hashed" {
}
output "ed25519_identity_pem" {
description = "Ed25519 identity private key for bridge configuration"
description = "Ed25519 identity private key for bridge configuration (PEM format)"
value = tor_relay_identity_ed25519.bridge.private_key_pem
sensitive = true
}
output "ed25519_identity_tor" {
description = "Ed25519 identity private key in Tor's binary format (base64 encoded)"
value = tor_relay_identity_ed25519.bridge.private_key_tor
sensitive = true
}
output "obfs4_state_json" {
description = "Complete obfs4 state for bridge runtime"
value = tor_obfs4_state.bridge.state_json