The Assimilation Project  based on Assimilation version 1.1.7.1474836767
cryptcurve25519.h File Reference

Describes interfaces to CryptFrame (encryption) C-Class It represents a FrameSet using libsodium (curve25519) for public key encryption. More...

#include <cryptframe.h>
Include dependency graph for cryptcurve25519.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _CryptCurve25519
 This is our CryptCurve25519 class object - representing a Curve25519 encryption Frame class. More...
 
#define MAXCRYPTNAMELENGTH   128
 
enum  keytype { NOTAKEY, PUBLICKEY, PRIVATEKEY }
 
typedef struct _CryptCurve25519 CryptCurve25519
 
WINEXPORT CryptCurve25519cryptcurve25519_new (guint16 frame_type, const char *pubkeyname, const char *privkeyname, gboolean forsending, gsize objsize)
 Construct a new CryptCurve25519 object (frame). More...
 
WINEXPORT Framecryptcurve25519_tlvconstructor (gpointer tlvstart, gconstpointer pktend, gpointer *, gpointer *)
 Given marshalled packet data corresponding to an CryptCurve25519 frame return the corresponding Frame In other words, un-marshall the data... More...
 
WINEXPORT void cryptcurve25519_gen_temp_keypair (const char *keyname)
 Generate a temporary (non-persistent) key pair. More...
 
WINEXPORT char * cryptcurve25519_gen_persistent_keypair (const char *keyname)
 Create a persistent keypair and write it to disk Returns a MALLOCed string with the key id for the key pair. More...
 
WINEXPORT gboolean cryptcurve25519_save_public_key (const char *key_id, gpointer public_key, int keysize)
 Save a public key away to disk so it's completely usable... More...
 
WINEXPORT CryptFramecryptcurve25519_new_generic (const char *sender_key_id, const char *receiver_key_id, gboolean forsending)
 Generic "new" function to use with cryptframe_set_encryption_method() More...
 
WINEXPORT void cryptcurve25519_cache_all_keypairs (void)
 We read in and cache all the key pairs (or public keys) that we find in CRYPTKEYDIR. More...
 
WINEXPORT gboolean cryptcurve25519_purge_keypair (const char *key_id)
 Purge a cryptcurve25519 key from the filesystem and from memory. More...
 
WINEXPORT void cryptcurve25519_set_encryption_method (void)
 Just for python simplicity... More...
 
WINEXPORT char * curve25519_key_id_to_filename (const char *key_id, enum keytype)
 

Detailed Description

Describes interfaces to CryptFrame (encryption) C-Class It represents a FrameSet using libsodium (curve25519) for public key encryption.

In particular, we use the libsodium simple_box*() interfaces which use the following algorithms: Key exchange: Curve25519 Encryption: XSalsa20 stream cipher Authentication: Poly1305 MAC

Note that these interfaces integrate message validation with encryption/decryption so we don't need a separate cryptographic validation of the sender.

This file is part of the Assimilation Project.

Author
Copyright © 2011, 2012 - Alan Robertson alanr.nosp@m.@uni.nosp@m.x.sh
The Assimilation software is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Assimilation software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with the Assimilation Project software. If not, see http://www.gnu.org/licenses/

Definition in file cryptcurve25519.h.

Macro Definition Documentation

#define MAXCRYPTNAMELENGTH   128

Definition at line 54 of file cryptcurve25519.h.

Referenced by _cryptcurve25519_default_isvalid().

Typedef Documentation

Definition at line 44 of file cryptcurve25519.h.