chiark / gitweb /
server/: Rename `bulkcrypto' structure to `bulkops'.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 14 May 2017 17:19:08 +0000 (18:19 +0100)
We shall want a structure to collect up a bulk transform's state later.
No functional change.  Basically

sed -i s/bulkcrypto/bulkops/g server/*.[ch]

and some reformatting.

server/bulkcrypto.c
server/keymgmt.c
server/tripe.h

index 144a8301068e9f2811249bb09f5368ab88edf4bd..b528bb5db35bf4dc43f950e2edb913cd0e1c6ff2 100644 (file)
@@ -358,7 +358,7 @@ static int iiv_decrypt(keyset *ks, unsigned ty, buf *b, buf *bb, uint32 *seq)
 
 /*----- Bulk crypto transform table ---------------------------------------*/
 
 
 /*----- Bulk crypto transform table ---------------------------------------*/
 
-const bulkcrypto bulktab[] = {
+const bulkops bulktab[] = {
 
 #define BULK(name, pre, prim)                                          \
   { name, prim, pre##_check, pre##_overhead, pre##_encrypt, pre##_decrypt }
 
 #define BULK(name, pre, prim)                                          \
   { name, prim, pre##_check, pre##_overhead, pre##_encrypt, pre##_decrypt }
index 50abd5d15639ece70fd7ea303f8a3c5e6046bdba..837bc6ef8d8129dd0240b9b149d7ebf2a31ef790 100644 (file)
@@ -178,7 +178,7 @@ static const kgops *kgtab[] = {
 static int algs_get(algswitch *a, dstr *e, key_file *kf, key *k)
 {
   const char *p;
 static int algs_get(algswitch *a, dstr *e, key_file *kf, key *k)
 {
   const char *p;
-  const bulkcrypto *bulk;
+  const bulkops *bulk;
   char *q, *qq;
   dstr d = DSTR_INIT, dd = DSTR_INIT;
   int rc = -1;
   char *q, *qq;
   dstr d = DSTR_INIT, dd = DSTR_INIT;
   int rc = -1;
index 86d3779e4eb4decdabbcecf5525137fd08555a94..cb892208b8e75ac96aa386aac481c97949604e79 100644 (file)
 typedef struct keyset keyset;
 typedef struct algswitch algswitch;
 
 typedef struct keyset keyset;
 typedef struct algswitch algswitch;
 
-typedef struct bulkcrypto {
+typedef struct bulkops {
   const char *name;
   unsigned prim;
   int (*check)(const algswitch */*a*/, dstr */*e*/);
   const char *name;
   unsigned prim;
   int (*check)(const algswitch */*a*/, dstr */*e*/);
@@ -167,7 +167,7 @@ typedef struct bulkcrypto {
   int (*encrypt)(keyset */*ks*/, unsigned /*ty*/, buf */*b*/, buf */*bb*/);
   int (*decrypt)(keyset */*ks*/, unsigned /*ty*/,
                 buf */*b*/, buf */*bb*/, uint32 */*seq*/);
   int (*encrypt)(keyset */*ks*/, unsigned /*ty*/, buf */*b*/, buf */*bb*/);
   int (*decrypt)(keyset */*ks*/, unsigned /*ty*/,
                 buf */*b*/, buf */*bb*/, uint32 */*seq*/);
-} bulkcrypto;
+} bulkops;
 
 #define BCP_CIPHER 1
 #define BCP_MAC 2
 
 #define BCP_CIPHER 1
 #define BCP_MAC 2
@@ -176,7 +176,7 @@ typedef struct bulkcrypto {
 struct algswitch {
   const gchash *h;                     /* Hash function */
   const gccipher *mgf;                 /* Mask-generation function */
 struct algswitch {
   const gchash *h;                     /* Hash function */
   const gccipher *mgf;                 /* Mask-generation function */
-  const bulkcrypto *bulk;              /* Bulk crypto transformation */
+  const bulkops *bulk;                 /* Bulk crypto transformation */
   const gccipher *c;                   /* Symmetric encryption scheme */
   const gcmac *m;                      /* Message authentication code */
   const gccipher *b;                   /* Block cipher */
   const gccipher *c;                   /* Symmetric encryption scheme */
   const gcmac *m;                      /* Message authentication code */
   const gccipher *b;                   /* Block cipher */
@@ -210,7 +210,7 @@ typedef struct knode {
 
 #define HASH_STRING(h, s) GH_HASH((h), (s), sizeof(s))
 
 
 #define HASH_STRING(h, s) GH_HASH((h), (s), sizeof(s))
 
-extern const bulkcrypto bulktab[];
+extern const bulkops bulktab[];
 
 /*----- Data structures ---------------------------------------------------*/
 
 
 /*----- Data structures ---------------------------------------------------*/
 
@@ -266,7 +266,7 @@ struct keyset {
   unsigned long sz_exp, sz_regen;      /* Data limits for the keyset */
   T( unsigned seq; )                   /* Sequence number for tracing */
   unsigned f;                          /* Various useful flags */
   unsigned long sz_exp, sz_regen;      /* Data limits for the keyset */
   T( unsigned seq; )                   /* Sequence number for tracing */
   unsigned f;                          /* Various useful flags */
-  const bulkcrypto *bulk;              /* Bulk crypto transform */
+  const bulkops *bulk;                 /* Bulk crypto transform */
   size_t tagsz;                                /* Length to truncate MAC tags */
   struct ksdir {
     gcipher *c;                                /* Keyset cipher for encryption */
   size_t tagsz;                                /* Length to truncate MAC tags */
   struct ksdir {
     gcipher *c;                                /* Keyset cipher for encryption */