File: blowfish.h

package info (click to toggle)
cryptmount 6.3.0-1
  • links: PTS
  • area: main
  • in suites: sid, trixie
  • size: 1,208 kB
  • sloc: ansic: 6,249; sh: 2,478; makefile: 159; sed: 16
file content (23 lines) | stat: -rw-r--r-- 590 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
 *  Declarations for "Blowfish" cipher algorithm
 *  (Based on Bruce Schneier's implementation at http://www.schneier.com
 *  subsequently edited by RW Penney for "cryptmount")
 */

/*
    This file is part of cryptmount
 */

#include <inttypes.h>


typedef struct cm_bf_ctxt {
    uint32_t p[18];
    uint32_t sbox[4][256];
} cm_bf_ctxt_t;


cm_bf_ctxt_t *cm_bf_init(uint8_t *key, size_t keybytes);
void cm_bf_encipher(const cm_bf_ctxt_t *ctxt, uint32_t *xl, uint32_t *xr);
void cm_bf_decipher(const cm_bf_ctxt_t *ctxt, uint32_t *xl, uint32_t *xr);
void cm_bf_free(cm_bf_ctxt_t *ctxt);