mirror of
https://codeberg.org/scip/pcp.git
synced 2025-12-17 12:00:56 +01:00
started with py crypto, enhanced raw.py generation, better autoconf integration
This commit is contained in:
@@ -593,125 +593,338 @@ int _check_hash_keysig(PCPCTX *ptx, Buffer *blob, pcp_pubkey_t *p, pcp_keysig_t
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/mgmt.h:2712 */
|
||||
int _check_sigsubs(PCPCTX *ptx, Buffer *blob, pcp_pubkey_t *p, rfc_pub_sig_s *subheader);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3003 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/keyhash.h:2865 */
|
||||
void pcphash_del(PCPCTX *ptx, void *key, int type);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/keyhash.h:2865 */
|
||||
void pcphash_clean(PCPCTX *ptx);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/keyhash.h:2865 */
|
||||
void pcphash_cleanpub(pcp_pubkey_t *pub);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/keyhash.h:2865 */
|
||||
pcp_key_t *pcphash_keyexists(PCPCTX *ptx, char *id);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/keyhash.h:2865 */
|
||||
pcp_pubkey_t *pcphash_pubkeyexists(PCPCTX *ptx, char *id);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/keyhash.h:2865 */
|
||||
void pcphash_add(PCPCTX *ptx, void *key, int type);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/keyhash.h:2865 */
|
||||
int pcphash_count(PCPCTX *ptx);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/keyhash.h:2865 */
|
||||
int pcphash_countpub(PCPCTX *ptx);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/keyhash.h:2865 */
|
||||
pcp_keysig_t *pcphash_keysigexists(PCPCTX *ptx, char *id);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/scrypt.h:2908 */
|
||||
byte * pcp_scrypt(PCPCTX *ptx, char *passwd, size_t passwdlen, byte *nonce, size_t noncelen);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3199 */
|
||||
Pcpstream *ps_init(void);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3003 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3199 */
|
||||
Pcpstream *ps_new_file(FILE *backendfd);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3003 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3199 */
|
||||
Pcpstream *ps_new_inbuffer(Buffer *b);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3003 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3199 */
|
||||
Pcpstream *ps_new_outbuffer();
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3003 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3199 */
|
||||
size_t ps_read(Pcpstream *stream, void *buf, size_t readbytes);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3003 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3199 */
|
||||
size_t ps_write(Pcpstream *stream, void *buf, size_t writebytes);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3003 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3199 */
|
||||
size_t ps_finish(Pcpstream *stream);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3003 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3199 */
|
||||
size_t ps_print(Pcpstream *stream, const char * fmt, ...);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3003 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3199 */
|
||||
size_t ps_tell(Pcpstream *stream);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3003 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3199 */
|
||||
Buffer *ps_buffer(Pcpstream *stream);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3003 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3199 */
|
||||
void ps_close(Pcpstream *stream);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3003 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3199 */
|
||||
int ps_end(Pcpstream *stream);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3003 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3199 */
|
||||
int ps_err(Pcpstream *stream);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3003 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3199 */
|
||||
void ps_setdetermine(Pcpstream *stream, size_t blocksize);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3003 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3199 */
|
||||
void ps_armor(Pcpstream *stream, size_t blocksize);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3003 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3199 */
|
||||
void ps_unarmor(Pcpstream *stream);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3003 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3199 */
|
||||
size_t ps_read_decode(Pcpstream *stream);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3003 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3199 */
|
||||
void ps_determine(Pcpstream *stream);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3003 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3199 */
|
||||
size_t ps_read_next(Pcpstream *stream);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3003 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3199 */
|
||||
size_t ps_read_cached(Pcpstream *stream, void *buf, size_t readbytes);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3003 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3199 */
|
||||
size_t ps_read_raw(Pcpstream *stream, void *buf, size_t readbytes);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3003 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3199 */
|
||||
void ps_write_encode(Pcpstream *stream, Buffer *dst);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3003 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3199 */
|
||||
size_t ps_write_buf(Pcpstream *stream, Buffer *z);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3003 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3199 */
|
||||
int ps_left(Pcpstream *stream);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3003 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/pcpstream.h:3199 */
|
||||
int ps_readline(Pcpstream *stream, Buffer *line);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3181 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3377 */
|
||||
byte *pcp_padfour(byte *src, size_t srclen, size_t *dstlen);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3181 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3377 */
|
||||
size_t pcp_unpadfour(byte *src, size_t srclen);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3181 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3377 */
|
||||
byte *pcp_z85_decode(PCPCTX *ptx, char *z85block, size_t *dstlen);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3181 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3377 */
|
||||
char *pcp_z85_encode(byte *raw, size_t srclen, size_t *dstlen, int doblock);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3181 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3377 */
|
||||
char *pcp_readz85file(PCPCTX *ptx, FILE *infile);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3181 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3377 */
|
||||
char *pcp_readz85string(PCPCTX *ptx, byte *input, size_t bufsize);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3181 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3377 */
|
||||
uint8_t is_utf8(const byte * bytes);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3181 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3377 */
|
||||
size_t _buffer_is_binary(byte *buf, size_t len);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3181 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3377 */
|
||||
uint8_t _parse_zchar(Buffer *z, uint8_t c, uint8_t is_comment);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3181 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3377 */
|
||||
long int z85_header_startswith(Buffer *buf, char *what);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3181 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3377 */
|
||||
int z85_isheader(Buffer *buf);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3181 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3377 */
|
||||
int z85_isend(Buffer *buf);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3181 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3377 */
|
||||
int z85_isbegin(Buffer *buf);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3181 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3377 */
|
||||
int z85_iscomment(Buffer *buf);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3181 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3377 */
|
||||
int z85_isempty(Buffer *line);
|
||||
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3181 */
|
||||
/*** bindings/py/gencffi.pl: from include/pcp/z85.h:3377 */
|
||||
int z85_isencoded(Buffer *line);'''
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
PCP_ASYM_CIPHER = 5
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
EXP_FORMAT_C = 4
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
PCP_BLOCK_SIZE = 32 * 1024
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
EXP_PK_HEADER = "----- BEGIN ED25519-CURVE29915 PUBLIC KEY -----"
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
EXP_SK_FOOTER = "----- END ED25519-CURVE29915 PRIVATE KEY -----"
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
PCP_ENFILE_HEADER = "----- BEGIN PCP ENCRYPTED FILE -----\r\n"
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
EXP_FORMAT_NATIVE = 1
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
PBP_COMPAT_SALT = "qa~t](84z<1t<1oz:ik.@IRNyhG=8q(on9}4#!/_h#a7wqK{Nt$T?W>,mt8NqYq&6U<GB1$,<$j>,rSYI2GRDd:Bcm"
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
EXP_HASH_CIPHER = 0x22
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
EXP_HASH_NAME = "BLAKE2"
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
EXP_SIG_SUB_NOTATION = 20
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
EXP_SIG_CIPHER_NAME = "ED25519"
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
EXP_SIG_CIPHER = 0x23
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
PCP_ZFILE_HEADER = "----- BEGIN Z85 ENCODED FILE -----"
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
PCP_SIG_END = "----- END ED25519 SIGNATURE -----"
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
PCP_KEY_VERSION = 6
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
EXP_PK_CIPHER = 0x21
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
PCP_KEY_PRIMITIVE = "CURVE25519-ED25519-SALSA20-POLY1305"
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
PCP_RFC_CIPHER = 0x21
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
PCP_ASYM_CIPHER_ANON = 6
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
EXP_FORMAT_PERL = 6
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
PCP_ENFILE_FOOTER = "\r\n----- END PCP ENCRYPTED FILE -----\r\n"
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
EXP_FORMAT_YAML = 3
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
PCP_SYM_CIPHER = 23
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
EXP_SIG_TYPE = 0x1F
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
EXP_FORMAT_PY = 5
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
EXP_SIG_SUB_KEYFLAGS = 27
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
EXP_SK_HEADER = "----- BEGIN ED25519-CURVE29915 PRIVATE KEY -----"
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
PCP_SIGPREFIX = "\nnacl-"
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
PCP_ME = "Pretty Curved Privacy"
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
PCP_ZFILE_FOOTER = "----- END Z85 ENCODED FILE -----"
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
EXP_SIG_SUB_SIGEXPIRE = 3
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
PCP_ENCRYPT_MAC = 56
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
EXP_PK_FOOTER = "----- END ED25519-CURVE29915 PUBLIC KEY -----"
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
EXP_SIG_SUB_CTIME = 2
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
PCP_VAULT_ID = 14
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
PCP_SIG_HEADER = "----- BEGIN ED25519 SIGNED MESSAGE -----"
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
PCP_ASYM_CIPHER_SIG = 24
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
EXP_PK_CIPHER_NAME = "CURVE25519-ED25519-POLY1305-SALSA20"
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
EXP_FORMAT_PBP = 2
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
PCP_VAULT_VERSION = 2
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
PCP_CRYPTO_ADD = (32 - 16)
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
EXP_SIG_SUB_KEYEXPIRE = 9
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
PCP_SIG_VERSION = 2
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
PCP_SIG_START = "----- BEGIN ED25519 SIGNATURE -----"
|
||||
|
||||
|
||||
# bindings/py/gencffi.pl: from include/pcp/defines.h:187
|
||||
EXP_SIG_VERSION = 0x01
|
||||
|
||||
Reference in New Issue
Block a user