File-KDBX-XS

 view release on metacpan or  search on metacpan

libtomcrypt/src/headers/tomcrypt_private.h  view on Meta::CPAN

/* LibTomCrypt, modular cryptographic library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

#include "tomcrypt.h"

/*
 * Internal Macros
 */

#define LTC_PAD_MASK       (0xF000U)

/*
 * Internal Enums
 */

enum ltc_oid_id {
   PKA_RSA,
   PKA_DSA,
   PKA_EC,
   PKA_EC_PRIMEF,
   PKA_X25519,
   PKA_ED25519,
};

/*
 * Internal Types
 */

typedef struct {
  int size;
  const char *name, *base, *prime;
} ltc_dh_set_type;


typedef int (*fn_kdf_t)(const unsigned char *password, unsigned long password_len,
                              const unsigned char *salt,     unsigned long salt_len,
                              int iteration_count,  int hash_idx,
                              unsigned char *out,   unsigned long *outlen);

typedef struct {
   /* KDF */
   fn_kdf_t kdf;
   /* Hash or HMAC */
   const char* h;
   /* cipher */
   const char* c;
   unsigned long keylen;
   /* not used for pbkdf2 */
   unsigned long blocklen;
} pbes_properties;

typedef struct
{
   pbes_properties type;
   const void *pwd;
   unsigned long pwdlen;
   ltc_asn1_list *enc_data;
   ltc_asn1_list *salt;
   ltc_asn1_list *iv;
   unsigned long iterations;
   /* only used for RC2 */
   unsigned long key_bits;
} pbes_arg;

/*
 * Internal functions
 */



( run in 2.358 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )