mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
d637528181
This isn't the same as the standard bcrypt; it's OpenSSH's modification that they use for their new-style key format. In order to implement this, I've broken up blowfish_setkey() into two subfunctions, and provided one of them with an extra optional salt parameter, which is NULL in ordinary Blowfish but used by bcrypt. Also, I've exposed some of sshblowf.c's internal machinery for the new sshbcrypt.c to use.
16 lines
590 B
C
16 lines
590 B
C
/*
|
|
* Header file shared between sshblowf.c and sshbcrypt.c. Exposes the
|
|
* internal Blowfish routines needed by bcrypt.
|
|
*/
|
|
|
|
typedef struct BlowfishContext BlowfishContext;
|
|
|
|
void *blowfish_make_context(void);
|
|
void blowfish_free_context(void *handle);
|
|
void blowfish_initkey(BlowfishContext *ctx);
|
|
void blowfish_expandkey(BlowfishContext *ctx,
|
|
const unsigned char *key, short keybytes,
|
|
const unsigned char *salt, short saltbytes);
|
|
void blowfish_lsb_encrypt_ecb(unsigned char *blk, int len,
|
|
BlowfishContext *ctx);
|