SPDL: Introduced preconstructed PKI with pk/sk/k.
Introduced K(A1...AN) constant function for symmetric pre-shared keys. Added inverses (pk,sk) as default constructs.
This commit is contained in:
parent
03a8a1b6e7
commit
4ac74f321f
@ -121,11 +121,11 @@ main (int argc, char **argv)
|
|||||||
/* start system */
|
/* start system */
|
||||||
sys = systemInit ();
|
sys = systemInit ();
|
||||||
|
|
||||||
/* init compiler for this system */
|
/* init knowledge. Needs to go before compiler init for special term init */
|
||||||
compilerInit (sys);
|
|
||||||
|
|
||||||
sys->know = emptyKnowledge ();
|
sys->know = emptyKnowledge ();
|
||||||
|
|
||||||
|
/* init compiler for this system */
|
||||||
|
compilerInit (sys);
|
||||||
|
|
||||||
/* parse input */
|
/* parse input */
|
||||||
|
|
||||||
|
@ -54,6 +54,9 @@ Term AGENT_Bob;
|
|||||||
Term AGENT_Charlie;
|
Term AGENT_Charlie;
|
||||||
Term AGENT_Dave;
|
Term AGENT_Dave;
|
||||||
Term AGENT_Eve;
|
Term AGENT_Eve;
|
||||||
|
Term TERM_PK;
|
||||||
|
Term TERM_SK;
|
||||||
|
Term TERM_K;
|
||||||
|
|
||||||
Termlist CLAIMS_dep_prec;
|
Termlist CLAIMS_dep_prec;
|
||||||
|
|
||||||
@ -82,6 +85,13 @@ specialTermInit (const System sys)
|
|||||||
langcons (CLAIM_Empty, "Empty", TERM_Claim);
|
langcons (CLAIM_Empty, "Empty", TERM_Claim);
|
||||||
langcons (CLAIM_Reachable, "Reachable", TERM_Claim);
|
langcons (CLAIM_Reachable, "Reachable", TERM_Claim);
|
||||||
|
|
||||||
|
/* Define default PKI using PK/SK/K */
|
||||||
|
langcons (TERM_PK, "pk", TERM_Function);
|
||||||
|
langcons (TERM_SK, "sk", TERM_Function);
|
||||||
|
langcons (TERM_K, "k", TERM_Function);
|
||||||
|
knowledgeAddInverse (sys->know, TERM_PK, TERM_SK);
|
||||||
|
knowledgeAddTerm (sys->know, TERM_PK);
|
||||||
|
|
||||||
/* Construct a list of claims that depend on prec being not-empty */
|
/* Construct a list of claims that depend on prec being not-empty */
|
||||||
/* basically all authentication claims */
|
/* basically all authentication claims */
|
||||||
CLAIMS_dep_prec = termlistAdd (NULL, CLAIM_Niagree);
|
CLAIMS_dep_prec = termlistAdd (NULL, CLAIM_Niagree);
|
||||||
|
@ -48,6 +48,9 @@ extern Term AGENT_Bob;
|
|||||||
extern Term AGENT_Charlie;
|
extern Term AGENT_Charlie;
|
||||||
extern Term AGENT_Dave;
|
extern Term AGENT_Dave;
|
||||||
extern Term AGENT_Eve;
|
extern Term AGENT_Eve;
|
||||||
|
extern Term TERM_PK;
|
||||||
|
extern Term TERM_SK;
|
||||||
|
extern Term TERM_K;
|
||||||
|
|
||||||
extern Termlist CLAIMS_dep_prec;
|
extern Termlist CLAIMS_dep_prec;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user