summaryrefslogtreecommitdiffstats
path: root/include/cipher.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1998-06-13 08:59:14 +0200
committerWerner Koch <wk@gnupg.org>1998-06-13 08:59:14 +0200
commit37d2adfe61d9671086fa701b779c3b47895afe4c (patch)
tree3af3791cb54dbd56687ee09e6a2666fabdecdc15 /include/cipher.h
parent. (diff)
downloadgnupg2-37d2adfe61d9671086fa701b779c3b47895afe4c.tar.xz
gnupg2-37d2adfe61d9671086fa701b779c3b47895afe4c.zip
a whole bunch of internal cleanups
Diffstat (limited to 'include/cipher.h')
-rw-r--r--include/cipher.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/cipher.h b/include/cipher.h
index 186851a33..3fe56c2e3 100644
--- a/include/cipher.h
+++ b/include/cipher.h
@@ -84,6 +84,8 @@ struct cipher_handle_s { char does_not_matter[1]; };
#define CIPHER_MODE_DUMMY 5 /* used with algo DUMMY for no encryption */
+
+
int cipher_debug_mode;
/*-- dynload.c --*/
@@ -102,6 +104,23 @@ void cipher_encrypt( CIPHER_HANDLE c, byte *out, byte *in, unsigned nbytes );
void cipher_decrypt( CIPHER_HANDLE c, byte *out, byte *in, unsigned nbytes );
void cipher_sync( CIPHER_HANDLE c );
+/*-- pubkey.c --*/
+#define PUBKEY_MAX_NPKEY 4
+#define PUBKEY_MAX_NSKEY 6
+#define PUBKEY_MAX_NSIG 2
+#define PUBKEY_MAX_NENC 2
+
+int pubkey_get_npkey( int algo );
+int pubkey_get_nskey( int algo );
+int pubkey_get_nsig( int algo );
+int pubkey_get_nenc( int algo );
+unsigned pubkey_nbits( int algo, MPI *pkey );
+int pubkey_check_secret_key( int algo, MPI *skey );
+int pubkey_encrypt( int algo, MPI *resarr, MPI data, MPI *pkey );
+int pubkey_decrypt( int algo, MPI *result, MPI *data, MPI *skey );
+int pubkey_sign( int algo, MPI *resarr, MPI hash, MPI *skey );
+int pubkey_verify( int algo, MPI hash, MPI *data, MPI *pkey );
+
/*-- misc.c --*/
int string_to_pubkey_algo( const char *string );