feat(srp): pure-Python server Verifier so Termux can HOST a room
The srp package's C-extension has no aarch64/bionic wheel, so a phone in Termux couldn't run the room server. Add the server side of SRP-6a (create_salted_verification_key + Verifier) to the pure-Python shim and fall srp_auth.py back to it on ImportError. Proven live: a laptop (C-ext srp client) authenticated against a room HOSTED ON THE PHONE (pure Verifier) over Tailscale — cross-implementation handshake with matching session keys. Locked in with interop tests covering real-client-vs-pure-Verifier, pure-vs-pure, and a wrong-password negative control. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,10 @@ from dataclasses import dataclass, field
|
||||
from typing import Optional
|
||||
from uuid import uuid4
|
||||
|
||||
import srp
|
||||
try:
|
||||
import srp
|
||||
except ImportError: # no aarch64 wheel / C-ext build (Termux) — use the shim
|
||||
from ..client import _srp_pure as srp
|
||||
|
||||
|
||||
srp.rfc5054_enable()
|
||||
|
||||
Reference in New Issue
Block a user