mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-07 04:03:53 +00:00
d2edcad66e
Thanks to Phil Zimmermann for the code and for the license exception we needed to include it. There remains some build system integration work to be done before this code will build properly in the FreeSWITCH tree.
35 lines
759 B
C
35 lines
759 B
C
/*
|
|
* Copyright (c) 1995 Colin Plumb. All rights reserved.
|
|
* For licensing and other legal details, see the file legal.c.
|
|
*/
|
|
#ifndef KEYS_H
|
|
#define KEYS_H
|
|
|
|
/*
|
|
* Structures for keys.
|
|
*/
|
|
|
|
#include "bn.h"
|
|
|
|
/* A structure to hold a public key */
|
|
struct PubKey {
|
|
struct BigNum n; /* The public modulus */
|
|
struct BigNum e; /* The public exponent */
|
|
};
|
|
|
|
/* A structure to hold a secret key */
|
|
struct SecKey {
|
|
struct BigNum d; /* Decryption exponent */
|
|
struct BigNum p; /* The smaller factor of n */
|
|
struct BigNum q; /* The larger factor of n */
|
|
struct BigNum u; /* 1/p (mod q) */
|
|
};
|
|
|
|
void pubKeyBegin(struct PubKey *pub);
|
|
void pubKeyEnd(struct PubKey *pub);
|
|
|
|
void secKeyBegin(struct SecKey *sec);
|
|
void secKeyEnd(struct SecKey *sec);
|
|
|
|
#endif /* KEYS_H */
|