mirror of
https://codeberg.org/scip/pcp.git
synced 2025-12-17 03:50:57 +01:00
added -M; removed CBC support, fixed asym-self-mode
This commit is contained in:
@@ -8,9 +8,9 @@ extern "C" {
|
||||
#include "pcp/config.h"
|
||||
#include "pcp/base85.h"
|
||||
#include "pcp/buffer.h"
|
||||
#include "pcp/config.h"
|
||||
#include "pcp/context.h"
|
||||
#include "pcp/crypto.h"
|
||||
#include "pcp/crypto_scrypt.h"
|
||||
#include "pcp/defines.h"
|
||||
#include "pcp/digital_crc32.h"
|
||||
#include "pcp/ed.h"
|
||||
|
||||
@@ -185,9 +185,6 @@
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define if you want to enable CBC mode */
|
||||
#undef PCP_CBC
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
|
||||
@@ -114,21 +114,11 @@ typedef enum _PCP_KEY_TYPES {
|
||||
#define PCP_SIG_VERSION 2
|
||||
|
||||
/* crypto file format stuff */
|
||||
/* enabled via config.h (configure --enable-cbc) */
|
||||
#ifndef PCP_CBC
|
||||
#define PCP_ASYM_CIPHER 5
|
||||
#define PCP_ASYM_CIPHER_ANON 6
|
||||
#define PCP_SYM_CIPHER 23
|
||||
#define PCP_ASYM_CIPHER_SIG 24
|
||||
#define PCP_BLOCK_SIZE 32 * 1024
|
||||
#else
|
||||
/* CBC mode, use smaller blocks */
|
||||
#define PCP_ASYM_CIPHER 7
|
||||
#define PCP_ASYM_CIPHER_ANON 9
|
||||
#define PCP_ASYM_CIPHER_SIG 8
|
||||
#define PCP_SYM_CIPHER 25
|
||||
#define PCP_BLOCK_SIZE 1 * 1024
|
||||
#endif
|
||||
#define PCP_ASYM_CIPHER 5
|
||||
#define PCP_ASYM_CIPHER_ANON 6
|
||||
#define PCP_SYM_CIPHER 23
|
||||
#define PCP_ASYM_CIPHER_SIG 24
|
||||
#define PCP_BLOCK_SIZE 32 * 1024
|
||||
|
||||
#define PCP_CRYPTO_ADD (crypto_box_ZEROBYTES - crypto_box_BOXZEROBYTES)
|
||||
#define PCP_BLOCK_SIZE_IN (PCP_BLOCK_SIZE) + PCP_CRYPTO_ADD + crypto_secretbox_NONCEBYTES
|
||||
|
||||
@@ -60,6 +60,13 @@ static inline void p_add(plist_t **lst, char *value) {
|
||||
}
|
||||
}
|
||||
|
||||
static inline void p_add_me(plist_t **lst) {
|
||||
char *me = (char *)malloc(13);
|
||||
strcpy(me, "__self__");
|
||||
p_add(lst, me);
|
||||
free(me);
|
||||
}
|
||||
|
||||
static inline void p_clean(plist_t *lst) {
|
||||
plist_t *iter = lst->first;
|
||||
plist_t *tmp;
|
||||
|
||||
Reference in New Issue
Block a user