Files
Jason RhinelanderandClaude Opus 4.8 2cd30019cb Rename gen_index_hash -> revocation_tag
Per the wire spec (ยง2.1, delta #2): rename the libsession symbol and the
backend-JSON wire keys. The value stays an opaque 32-byte tag that
clients compare for equality against the revocation list; the "random
value, not BLAKE2b(counter, salt)" nature change is entirely backend-side.

- C/C++ struct fields, C API, config fields (pro_revocation_tag), and the
  "gen_index_hash" JSON keys in the generate-proof response + revocation
  list.
- Protobuf field genIndexHash (ProProof field #2) is left as-is: the wire
  is keyed by field number, renaming it would require regenerating the
  committed SessionProtos.pb.* and touches the shared cross-client schema.
- Config dict key "g" kept (internal, opaque; no format change).
- Stale "hash of the generation index" comments updated to describe the
  opaque revocation tag.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-07-23 16:29:23 -03:00

37 lines
1.0 KiB
C++

#pragma once
#include <session/config.hpp>
#include <session/config/base.hpp>
#include <session/session_protocol.hpp>
namespace session::config {
/// keys used currently or in the past (so that we don't reuse):
///
/// s + session pro data
/// |
/// +-- p + proof
/// | |
/// | +-- @ - version
/// | +-- e - expiry unix timestamp (in milliseconds)
/// | +-- g - revocation_tag
/// | +-- s - proof signature, signed by the Session Pro Backend's ed25519 key
/// |
/// +-- r - rotating ed25519 seed (32b)
class ProConfig {
public:
/// Rotating private key for the public key specified in the proof. On the wire we store the
/// seed. At runtime we derive the full key for convenience.
cleared_uc64 rotating_privkey;
/// A cryptographic proof for entitling an Ed25519 key to Session Pro
ProProof proof;
bool load(const dict& root);
bool operator==(const ProConfig& other) const {
return rotating_privkey == other.rotating_privkey && proof == other.proof;
}
};
}; // namespace session::config