public static void Test() { var alice = Entity.Of("Alice"); var bob = Entity.Of("Bob"); var p = new SVX_Test_Concat(alice); var req1 = new Concat2Request("A", "B"); var resp1 = SVX_Ops.Call(p.Concat2, req1); var req2 = new Concat2Request(resp1.output, "C"); var resp2 = SVX_Ops.Call(p.Concat2, req2); var chainResp = SVX_Ops.Call(p.Chain, resp1, resp2); var producer = Channel.GenerateNew(bob); var sender = Channel.GenerateNew(bob); SVX_Ops.TransferForTesting(chainResp, producer, sender); // Demonstrate that we can assume acts-for relationships and that // we've axiomatized that acts-for is transitive. Of course, the // acts-for relationships in this example do not represent the ones // we would assume in any real protocol. var respWithAssumption = SVX_Ops.Call(p.AssumeProducerActsForAlice, chainResp); SVX_Ops.Certify(respWithAssumption, p.Predicate); }
public static void Test() { var idp = new IdP(idpPrincipal); var rp = new RP(rpPrincipal); var aliceIdP = Channel.GenerateNew(idpPrincipal); var aliceRP = Channel.GenerateNew(rpPrincipal); var idpReq = new SignInIdPReq { username = "******", password = "******", SVX_sender = aliceIdP }; var rpReq = SVX_Ops.Call(idp.SignInIdP, idpReq); // Imagine the SignInRPReq was signed by the IdP. SVX_Ops.TransferForTesting(rpReq, idpPrincipal, aliceRP); var conc = SVX_Ops.Call(rp.SignInRP, rpReq); SVX_Ops.Certify(conc, rp.LoginSafety); }