aboutsummaryrefslogtreecommitdiff
path: root/helper.c
diff options
context:
space:
mode:
authorFranklin Wei <me@fwei.tk>2018-06-14 12:42:45 -0400
committerFranklin Wei <me@fwei.tk>2018-06-14 12:42:45 -0400
commit0b31788f9ef9bb760b56a4fd72bd618a276f0a70 (patch)
tree8028a24f7776ead870362ec312f811653c90f7e2 /helper.c
parent6ee13d7f3e0530f56215b134679aeb27a676543c (diff)
downloadcsaa-0b31788f9ef9bb760b56a4fd72bd618a276f0a70.zip
csaa-0b31788f9ef9bb760b56a4fd72bd618a276f0a70.tar.gz
csaa-0b31788f9ef9bb760b56a4fd72bd618a276f0a70.tar.bz2
csaa-0b31788f9ef9bb760b56a4fd72bd618a276f0a70.tar.xz
Working on EQ generation
Diffstat (limited to 'helper.c')
-rw-r--r--helper.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/helper.c b/helper.c
index 9b82e52..0e572db 100644
--- a/helper.c
+++ b/helper.c
@@ -44,43 +44,3 @@ struct tm_cert cert_rv(struct trusted_module *tm,
hmac_out,
0, NULL, NULL);
}
-
-/* generate an EQ certificate for inserting a placeholder with index
- * a, given an encloser (which must actually enclose a) */
-struct tm_cert cert_eq(struct trusted_module *tm,
- const struct iomt_node *encloser,
- int a,
- const hash_t *enc_comp, const int *enc_orders, size_t enc_n,
- const hash_t *ins_comp, const int *ins_orders, size_t ins_n,
- hash_t *hmac_out)
-{
- assert(encloses(encloser->idx, encloser->next_idx, a));
-
- struct iomt_node encloser_mod = *encloser;
- encloser_mod.next_idx = a;
-
- struct iomt_node insert;
- insert.idx = a;
- insert.next_idx = encloser->next_idx;
- insert.val = hash_null;
-
- hash_t h_enc = hash_node(encloser);
- hash_t h_encmod = hash_node(&encloser_mod);
-
- hash_t h_ins = hash_node(&insert);
-
- /* we need two NU certificates */
- hash_t nu1_hmac, nu2_hmac;
-
- struct tm_cert nu1 = tm_cert_node_update(tm,
- h_enc, h_encmod,
- enc_comp, enc_orders, enc_n,
- &nu1_hmac);
- /* FIXME: the complement will change upon changing this node, so
- * cert_equiv() will fail. */
- struct tm_cert nu2 = tm_cert_node_update(tm,
- hash_null, h_ins,
- ins_comp, ins_orders, ins_n,
- &nu2_hmac);
- return tm_cert_equiv(tm, &nu1, nu1_hmac, &nu2, nu2_hmac, encloser, a, hmac_out);
-}