Welcome to mirror list, hosted at ThFree Co, Russian Federation.

encrypt.h « util « dime « providers « src - github.com/lavabit/magma.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: eccae72deb6c41a870001b06c4dc78b6d8de15b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef ENCRYPT_H
#define ENCRYPT_H

#include "dime/dime_ctx.h"
#include "dime/error_codes.h"

typedef struct encrypt_ctx encrypt_ctx_t;
typedef struct { char unused[1]; } *encrypt_keypair_t;

derror_t const *
encrypt_ctx_new(
    dime_ctx_t const *dime_ctx,
    encrypt_ctx_t **result);

void
encrypt_ctx_free(encrypt_ctx_t *ctx);

derror_t const *
encrypt_keypair_generate(
    dime_ctx_t const *dime_ctx,
    encrypt_ctx_t const *encrypt_ctx,
    encrypt_keypair_t **result);

derror_t const *
encrypt_deserialize_pubkey(
    dime_ctx_t const *dime_ctx,
    encrypt_keypair_t **result,
    unsigned char const *buf,
    size_t blen);

derror_t const *
encrypt_deserialize_privkey(
    dime_ctx_t const *dime_ctx,
    encrypt_keypair_t **result,
    unsigned char const *buf,
    size_t blen);

//derror_t const *
//load_ec_pubkey(
//    dime_ctx_t const *dime_ctx,
//    encrypt_keypair_t **result,
//    char const *filename);

#endif