X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/b3f050848e5d285c2a1d7f8a4bea98984c201805..80be023065ced106a4078a36371c135a60d2bd6c:/des.h diff --git a/des.h b/des.h index ac1461a..489d5e0 100644 --- a/des.h +++ b/des.h @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: des.h,v 1.2 1999/12/10 23:29:48 mdw Exp $ + * $Id$ * * The Data Encryption Standard * @@ -27,17 +27,6 @@ * MA 02111-1307, USA. */ -/*----- Revision history --------------------------------------------------* - * - * $Log: des.h,v $ - * Revision 1.2 1999/12/10 23:29:48 mdw - * Change header file guard names. - * - * Revision 1.1 1999/09/03 08:41:11 mdw - * Initial import. - * - */ - /*----- Notes on the Data Encryption Standard -----------------------------* * * Almost twenty years after it was first accepted, DES is still the standard @@ -69,6 +58,8 @@ #define DES_KEYSZ 7 #define DES_CLASS (N, B, 64) +extern const octet des_keysz[]; + /*----- Data structures ---------------------------------------------------*/ typedef struct des_ctx { @@ -77,6 +68,22 @@ typedef struct des_ctx { /*----- Functions provided ------------------------------------------------*/ +/* --- @des_expand@ --- * + * + * Arguments: @const octet *k@ = pointer to key material + * @size_t n@ = number of octets of key material (7 or 8) + * @uint32 *xx, *yy@ = where to put the results + * + * Returns: --- + * + * Use: Extracts 64 bits of key material from the given buffer, + * possibly expanding it from 56 to 64 bits on the way. + * Parity is set correctly if the key is expanded. + */ + +extern void des_expand(const octet */*k*/, size_t /*n*/, + uint32 */*xx*/, uint32 */*yy*/); + /* --- @des_init@ --- * * * Arguments: @des_ctx *k@ = pointer to key block