S25: npe adapter matches real send/keygen CLI; config key rotate script
Some checks are pending
ci / python (push) Waiting to run
ci / go (push) Waiting to run

Probe reports usable without enabling PFC_REQUIRE_NPE. Fail-closed if
sender .seed or recipient .npeid is missing.
This commit is contained in:
George Lambert 2026-09-15 23:19:37 -04:00
parent 43cbf51d3e
commit a72b4c513d
4 changed files with 109 additions and 14 deletions

View file

@ -37,8 +37,12 @@ class NpeAdapterTests(unittest.TestCase):
def test_npe_mode_fail_closed(self):
from secure_messaging import NpeRequired
from secure_messaging.envelope import seal
from secure_messaging.npe_adapter import probe
self.assertTrue(hasattr(__import__("secure_messaging"), "NpeRequired"))
st = probe()
self.assertIn("usable", st)
# mode=npe never falls back to lab-xor (missing seed or missing binary).
with self.assertRaises(NpeRequired):
seal(to="npe.inbox.x", sender="alice", body={"a": 1}, mode="npe")