summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS10
-rw-r--r--doc/gcrypt.texi14
-rw-r--r--src/ChangeLog8
-rw-r--r--src/gcrypt-module.h19
-rw-r--r--src/gcrypt.h.in148
-rw-r--r--src/visibility.h91
6 files changed, 222 insertions, 68 deletions
diff --git a/NEWS b/NEWS
index fae8ee3c..3a92ad5a 100644
--- a/NEWS
+++ b/NEWS
@@ -29,6 +29,16 @@ Noteworthy changes in version 1.5.x (unreleased)
* Uses the Intel AES-NI instructions if available.
+ * The use of the deprecated Alternative Public Key Interface
+ (gcry_ac_*) will now print compile time warnings.
+
+ * The module register subsystem has been deprecated. This subsystem
+ is not flexible enough and would always require ABI changes to
+ extend the internal interfaces. It will eventually be removed.
+ Please contact us on the gcrypt-devel mailing list to discuss
+ whether you really need this feature or how it can be replaced by
+ an internal plugin mechanism.
+
* Interface changes relative to the 1.4.2 release:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GCRY_CIPHER_MODE_AESWRAP NEW.
diff --git a/doc/gcrypt.texi b/doc/gcrypt.texi
index 03c53633..3a0a5fc2 100644
--- a/doc/gcrypt.texi
+++ b/doc/gcrypt.texi
@@ -219,7 +219,7 @@ Certain parts of gcrypt.h may be excluded by defining these macros:
Do not define the shorthand macros @code{mpi_*} for @code{gcry_mpi_*}.
@item GCRYPT_NO_DEPRECATED
-Do not include defintions for deprecated features. This is useful to
+Do not include definitions for deprecated features. This is useful to
make sure that no deprecated features are used.
@end table
@@ -1602,7 +1602,8 @@ unsigned char *, unsigned int n)
Register a new cipher module whose specification can be found in
@var{cipher}. On success, a new algorithm ID is stored in
@var{algorithm_id} and a pointer representing this module is stored
-in @var{module}.
+in @var{module}. Deprecated; the module register interface will be
+removed in a future version.
@end deftypefun
@deftypefun void gcry_cipher_unregister (gcry_module_t @var{module})
@@ -2288,8 +2289,10 @@ Type for the `get_nbits' function, defined as: unsigned
Register a new public key module whose specification can be found in
@var{pubkey}. On success, a new algorithm ID is stored in
-@var{algorithm_id} and a pointer representing this module is stored
-in @var{module}.
+@var{algorithm_id} and a pointer representing this module is stored in
+@var{module}. Deprecated; the module register interface will be
+removed in a future version.
+
@end deftypefun
@deftypefun void gcry_pk_unregister (gcry_module_t @var{module})
@@ -3610,7 +3613,8 @@ Type for the `read' function, defined as: unsigned char
Register a new digest module whose specification can be found in
@var{digest}. On success, a new algorithm ID is stored in
@var{algorithm_id} and a pointer representing this module is stored
-in @var{module}.
+in @var{module}. Deprecated; the module register interface will be
+removed in a future version.
@end deftypefun
@deftypefun void gcry_md_unregister (gcry_module_t @var{module})
diff --git a/src/ChangeLog b/src/ChangeLog
index 68590429..750c8dad 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,13 @@
2011-02-17 Werner Koch <wk@g10code.com>
+ * gcrypt-module.h (gcry_cipher_register, gcry_cipher_unregister)
+ (gcry_pk_register, gcry_pk_unregister, gcry_md_register)
+ (gcry_md_unregister): Mark as deprecated by the API; in a future
+ version the module register feature will be removed.
+
+ * gcrypt.h.in: Attribute all _ac_ functions and types as
+ deprecated by the API.
+
* hwfeatures.c (detect_ia32_gnuc): Fix AES-NI detection. Use AND
instead of SUB for bit testing.
diff --git a/src/gcrypt-module.h b/src/gcrypt-module.h
index d8a8cefc..f39e2b5c 100644
--- a/src/gcrypt-module.h
+++ b/src/gcrypt-module.h
@@ -98,11 +98,14 @@ typedef struct gcry_cipher_spec
and a pointer representing this module is stored in MODULE. */
gcry_error_t gcry_cipher_register (gcry_cipher_spec_t *cipher,
int *algorithm_id,
- gcry_module_t *module);
+ gcry_module_t *module)
+ /* */ _GCRY_ATTR_INTERNAL;
+
/* Unregister the cipher identified by MODULE, which must have been
registered with gcry_cipher_register. */
-void gcry_cipher_unregister (gcry_module_t module);
+void gcry_cipher_unregister (gcry_module_t module)
+ /* */ _GCRY_ATTR_INTERNAL;
/* ********************** */
@@ -173,11 +176,13 @@ typedef struct gcry_pk_spec
and a pointer representhing this module is stored in MODULE. */
gcry_error_t gcry_pk_register (gcry_pk_spec_t *pubkey,
unsigned int *algorithm_id,
- gcry_module_t *module);
+ gcry_module_t *module)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Unregister the pubkey identified by ID, which must have been
registered with gcry_pk_register. */
-void gcry_pk_unregister (gcry_module_t module);
+void gcry_pk_unregister (gcry_module_t module)
+ /* */ _GCRY_ATTR_INTERNAL;
/* ********************** */
@@ -218,11 +223,13 @@ typedef struct gcry_md_spec
and a pointer representhing this module is stored in MODULE. */
gcry_error_t gcry_md_register (gcry_md_spec_t *digest,
unsigned int *algorithm_id,
- gcry_module_t *module);
+ gcry_module_t *module)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Unregister the digest identified by ID, which must have been
registered with gcry_digest_register. */
-void gcry_md_unregister (gcry_module_t module);
+void gcry_md_unregister (gcry_module_t module)
+ /* */ _GCRY_ATTR_INTERNAL;
#if 0 /* keep Emacsens's auto-indent happy */
{
diff --git a/src/gcrypt.h.in b/src/gcrypt.h.in
index 54fa9f37..3cd8e7f9 100644
--- a/src/gcrypt.h.in
+++ b/src/gcrypt.h.in
@@ -104,9 +104,8 @@ extern "C" {
#define _GCRY_GCC_ATTR_MALLOC
#endif
-/* Some members in a public type should only be used internally.
- There is no "internal" attribute, so we abuse the deprecated
- attribute to discourage external use. */
+/* Make up an attribute to mark functions and types as deprecated but
+ allow internal use by Libgcrypt. */
#ifdef _GCRYPT_IN_LIBGCRYPT
#define _GCRY_ATTR_INTERNAL
#else
@@ -1250,7 +1249,6 @@ void gcry_md_debug (gcry_md_hd_t hd, const char *suffix);
gcry_error_t gcry_md_list (int *list, int *list_length);
-
/* Alternative interface for asymmetric cryptography. This interface
is deprecated. */
@@ -1262,7 +1260,7 @@ typedef enum gcry_ac_id
GCRY_AC_ELG = 20,
GCRY_AC_ELG_E = 16
}
-gcry_ac_id_t;
+gcry_ac_id_t _GCRY_ATTR_INTERNAL;
/* Key types. */
typedef enum gcry_ac_key_type
@@ -1270,7 +1268,7 @@ typedef enum gcry_ac_key_type
GCRY_AC_KEY_SECRET,
GCRY_AC_KEY_PUBLIC
}
-gcry_ac_key_type_t;
+gcry_ac_key_type_t _GCRY_ATTR_INTERNAL;
/* Encoding methods. */
typedef enum gcry_ac_em
@@ -1278,7 +1276,7 @@ typedef enum gcry_ac_em
GCRY_AC_EME_PKCS_V1_5,
GCRY_AC_EMSA_PKCS_V1_5
}
-gcry_ac_em_t;
+gcry_ac_em_t _GCRY_ATTR_INTERNAL;
/* Encryption and Signature schemes. */
typedef enum gcry_ac_scheme
@@ -1286,7 +1284,7 @@ typedef enum gcry_ac_scheme
GCRY_AC_ES_PKCS_V1_5,
GCRY_AC_SSA_PKCS_V1_5
}
-gcry_ac_scheme_t;
+gcry_ac_scheme_t _GCRY_ATTR_INTERNAL;
/* AC data. */
#define GCRY_AC_FLAG_DEALLOC (1 << 0)
@@ -1294,41 +1292,43 @@ gcry_ac_scheme_t;
#define GCRY_AC_FLAG_NO_BLINDING (1 << 2)
/* This type represents a `data set'. */
-typedef struct gcry_ac_data *gcry_ac_data_t;
+typedef struct gcry_ac_data *gcry_ac_data_t _GCRY_ATTR_INTERNAL;
/* This type represents a single `key', either a secret one or a
public one. */
-typedef struct gcry_ac_key *gcry_ac_key_t;
+typedef struct gcry_ac_key *gcry_ac_key_t _GCRY_ATTR_INTERNAL;
/* This type represents a `key pair' containing a secret and a public
key. */
-typedef struct gcry_ac_key_pair *gcry_ac_key_pair_t;
+typedef struct gcry_ac_key_pair *gcry_ac_key_pair_t _GCRY_ATTR_INTERNAL;
/* This type represents a `handle' that is needed by functions
performing cryptographic operations. */
-typedef struct gcry_ac_handle *gcry_ac_handle_t;
+typedef struct gcry_ac_handle *gcry_ac_handle_t _GCRY_ATTR_INTERNAL;
typedef gpg_error_t (*gcry_ac_data_read_cb_t) (void *opaque,
unsigned char *buffer,
- size_t *buffer_n);
+ size_t *buffer_n)
+ /* */ _GCRY_ATTR_INTERNAL;
typedef gpg_error_t (*gcry_ac_data_write_cb_t) (void *opaque,
unsigned char *buffer,
- size_t buffer_n);
+ size_t buffer_n)
+ /* */ _GCRY_ATTR_INTERNAL;
typedef enum
{
GCRY_AC_IO_READABLE,
GCRY_AC_IO_WRITABLE
}
-gcry_ac_io_mode_t;
+gcry_ac_io_mode_t _GCRY_ATTR_INTERNAL;
typedef enum
{
GCRY_AC_IO_STRING,
GCRY_AC_IO_CALLBACK
}
-gcry_ac_io_type_t;
+gcry_ac_io_type_t _GCRY_ATTR_INTERNAL;
typedef struct gcry_ac_io
{
@@ -1367,7 +1367,7 @@ typedef struct gcry_ac_io
} writable;
} io _GCRY_ATTR_INTERNAL;
}
-gcry_ac_io_t;
+gcry_ac_io_t _GCRY_ATTR_INTERNAL;
/* The caller of gcry_ac_key_pair_generate can provide one of these
structures in order to influence the key generation process in an
@@ -1375,16 +1375,16 @@ gcry_ac_io_t;
typedef struct gcry_ac_key_spec_rsa
{
gcry_mpi_t e; /* E to use. */
-} gcry_ac_key_spec_rsa_t;
+} gcry_ac_key_spec_rsa_t _GCRY_ATTR_INTERNAL;
/* Structure used for passing data to the implementation of the
`EME-PKCS-V1_5' encoding method. */
typedef struct gcry_ac_eme_pkcs_v1_5
{
size_t key_size;
-} gcry_ac_eme_pkcs_v1_5_t;
+} gcry_ac_eme_pkcs_v1_5_t _GCRY_ATTR_INTERNAL;
-typedef enum gcry_md_algos gcry_md_algo_t;
+typedef enum gcry_md_algos gcry_md_algo_t _GCRY_ATTR_INTERNAL;
/* Structure used for passing data to the implementation of the
`EMSA-PKCS-V1_5' encoding method. */
@@ -1392,31 +1392,38 @@ typedef struct gcry_ac_emsa_pkcs_v1_5
{
gcry_md_algo_t md;
size_t em_n;
-} gcry_ac_emsa_pkcs_v1_5_t;
+} gcry_ac_emsa_pkcs_v1_5_t _GCRY_ATTR_INTERNAL;
/* Structure used for passing data to the implementation of the
`SSA-PKCS-V1_5' signature scheme. */
typedef struct gcry_ac_ssa_pkcs_v1_5
{
gcry_md_algo_t md;
-} gcry_ac_ssa_pkcs_v1_5_t;
+} gcry_ac_ssa_pkcs_v1_5_t _GCRY_ATTR_INTERNAL;
+
+#ifndef GCRYPT_NO_DEPRECATED
/* Returns a new, empty data set in DATA. */
-gcry_error_t gcry_ac_data_new (gcry_ac_data_t *data);
+gcry_error_t gcry_ac_data_new (gcry_ac_data_t *data)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Destroy the data set DATA. */
-void gcry_ac_data_destroy (gcry_ac_data_t data);
+void gcry_ac_data_destroy (gcry_ac_data_t data)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Create a copy of the data set DATA and store it in DATA_CP. */
gcry_error_t gcry_ac_data_copy (gcry_ac_data_t *data_cp,
- gcry_ac_data_t data);
+ gcry_ac_data_t data)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Return the number of named MPI values inside of the data set
DATA. */
-unsigned int gcry_ac_data_length (gcry_ac_data_t data);
+unsigned int gcry_ac_data_length (gcry_ac_data_t data)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Destroy any values contained in the data set DATA. */
-void gcry_ac_data_clear (gcry_ac_data_t data);
+void gcry_ac_data_clear (gcry_ac_data_t data)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Add the value MPI to DATA with the label NAME. If FLAGS contains
GCRY_AC_FLAG_DATA_COPY, the data set will contain copies of NAME
@@ -1424,13 +1431,15 @@ void gcry_ac_data_clear (gcry_ac_data_t data);
GCRY_AC_FLAG_DATA_COPY, the values contained in the data set will
be deallocated when they are to be removed from the data set. */
gcry_error_t gcry_ac_data_set (gcry_ac_data_t data, unsigned int flags,
- const char *name, gcry_mpi_t mpi);
+ const char *name, gcry_mpi_t mpi)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Store the value labelled with NAME found in DATA in MPI. If FLAGS
contains GCRY_AC_FLAG_COPY, store a copy of the MPI value contained
in the data set. MPI may be NULL. */
gcry_error_t gcry_ac_data_get_name (gcry_ac_data_t data, unsigned int flags,
- const char *name, gcry_mpi_t *mpi);
+ const char *name, gcry_mpi_t *mpi)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Stores in NAME and MPI the named MPI value contained in the data
set DATA with the index IDX. If FLAGS contains GCRY_AC_FLAG_COPY,
@@ -1438,42 +1447,50 @@ gcry_error_t gcry_ac_data_get_name (gcry_ac_data_t data, unsigned int flags,
may be NULL. */
gcry_error_t gcry_ac_data_get_index (gcry_ac_data_t data, unsigned int flags,
unsigned int idx,
- const char **name, gcry_mpi_t *mpi);
+ const char **name, gcry_mpi_t *mpi)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Convert the data set DATA into a new S-Expression, which is to be
stored in SEXP, according to the identifiers contained in
IDENTIFIERS. */
gcry_error_t gcry_ac_data_to_sexp (gcry_ac_data_t data, gcry_sexp_t *sexp,
- const char **identifiers);
+ const char **identifiers)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Create a new data set, which is to be stored in DATA_SET, from the
S-Expression SEXP, according to the identifiers contained in
IDENTIFIERS. */
gcry_error_t gcry_ac_data_from_sexp (gcry_ac_data_t *data, gcry_sexp_t sexp,
- const char **identifiers);
+ const char **identifiers)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Initialize AC_IO according to MODE, TYPE and the variable list of
arguments. The list of variable arguments to specify depends on
the given TYPE. */
void gcry_ac_io_init (gcry_ac_io_t *ac_io, gcry_ac_io_mode_t mode,
- gcry_ac_io_type_t type, ...);
+ gcry_ac_io_type_t type, ...)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Initialize AC_IO according to MODE, TYPE and the variable list of
arguments AP. The list of variable arguments to specify depends on
the given TYPE. */
void gcry_ac_io_init_va (gcry_ac_io_t *ac_io, gcry_ac_io_mode_t mode,
- gcry_ac_io_type_t type, va_list ap);
+ gcry_ac_io_type_t type, va_list ap)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Create a new ac handle. */
gcry_error_t gcry_ac_open (gcry_ac_handle_t *handle,
- gcry_ac_id_t algorithm, unsigned int flags);
+ gcry_ac_id_t algorithm, unsigned int flags)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Destroy an ac handle. */
-void gcry_ac_close (gcry_ac_handle_t handle);
+void gcry_ac_close (gcry_ac_handle_t handle)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Initialize a key from a given data set. */
gcry_error_t gcry_ac_key_init (gcry_ac_key_t *key, gcry_ac_handle_t handle,
- gcry_ac_key_type_t type, gcry_ac_data_t data);
+ gcry_ac_key_type_t type, gcry_ac_data_t data)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Generates a new key pair via the handle HANDLE of NBITS bits and
stores it in KEY_PAIR. In case non-standard settings are wanted, a
@@ -1483,32 +1500,40 @@ gcry_error_t gcry_ac_key_init (gcry_ac_key_t *key, gcry_ac_handle_t handle,
gcry_error_t gcry_ac_key_pair_generate (gcry_ac_handle_t handle,
unsigned int nbits, void *spec,
gcry_ac_key_pair_t *key_pair,
- gcry_mpi_t **misc_data);
+ gcry_mpi_t **misc_data)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Returns the key of type WHICH out of the key pair KEY_PAIR. */
gcry_ac_key_t gcry_ac_key_pair_extract (gcry_ac_key_pair_t key_pair,
- gcry_ac_key_type_t which);
+ gcry_ac_key_type_t which)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Returns the data set contained in the key KEY. */
-gcry_ac_data_t gcry_ac_key_data_get (gcry_ac_key_t key);
+gcry_ac_data_t gcry_ac_key_data_get (gcry_ac_key_t key)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Verifies that the key KEY is sane via HANDLE. */
-gcry_error_t gcry_ac_key_test (gcry_ac_handle_t handle, gcry_ac_key_t key);
+gcry_error_t gcry_ac_key_test (gcry_ac_handle_t handle, gcry_ac_key_t key)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Stores the number of bits of the key KEY in NBITS via HANDLE. */
gcry_error_t gcry_ac_key_get_nbits (gcry_ac_handle_t handle,
- gcry_ac_key_t key, unsigned int *nbits);
+ gcry_ac_key_t key, unsigned int *nbits)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Writes the 20 byte long key grip of the key KEY to KEY_GRIP via
HANDLE. */
gcry_error_t gcry_ac_key_get_grip (gcry_ac_handle_t handle, gcry_ac_key_t key,
- unsigned char *key_grip);
+ unsigned char *key_grip)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Destroy a key. */
-void gcry_ac_key_destroy (gcry_ac_key_t key);
+void gcry_ac_key_destroy (gcry_ac_key_t key)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Destroy a key pair. */
-void gcry_ac_key_pair_destroy (gcry_ac_key_pair_t key_pair);
+void gcry_ac_key_pair_destroy (gcry_ac_key_pair_t key_pair)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Encodes a message according to the encoding method METHOD. OPTIONS
must be a pointer to a method-specific structure
@@ -1516,7 +1541,8 @@ void gcry_ac_key_pair_destroy (gcry_ac_key_pair_t key_pair);
gcry_error_t gcry_ac_data_encode (gcry_ac_em_t method,
unsigned int flags, void *options,
gcry_ac_io_t *io_read,
- gcry_ac_io_t *io_write);
+ gcry_ac_io_t *io_write)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Decodes a message according to the encoding method METHOD. OPTIONS
must be a pointer to a method-specific structure
@@ -1524,7 +1550,8 @@ gcry_error_t gcry_ac_data_encode (gcry_ac_em_t method,
gcry_error_t gcry_ac_data_decode (gcry_ac_em_t method,
unsigned int flags, void *options,
gcry_ac_io_t *io_read,
- gcry_ac_io_t *io_write);
+ gcry_ac_io_t *io_write)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Encrypt the plain text MPI value DATA_PLAIN with the key KEY under
the control of the flags FLAGS and store the resulting data set
@@ -1533,7 +1560,8 @@ gcry_error_t gcry_ac_data_encrypt (gcry_ac_handle_t handle,
unsigned int flags,
gcry_ac_key_t key,
gcry_mpi_t data_plain,
- gcry_ac_data_t *data_encrypted);
+ gcry_ac_data_t *data_encrypted)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Decrypt the decrypted data contained in the data set DATA_ENCRYPTED
with the key KEY under the control of the flags FLAGS and store the
@@ -1542,14 +1570,16 @@ gcry_error_t gcry_ac_data_decrypt (gcry_ac_handle_t handle,
unsigned int flags,
gcry_ac_key_t key,
gcry_mpi_t *data_plain,
- gcry_ac_data_t data_encrypted);
+ gcry_ac_data_t data_encrypted)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Sign the data contained in DATA with the key KEY and store the
resulting signature in the data set DATA_SIGNATURE. */
gcry_error_t gcry_ac_data_sign (gcry_ac_handle_t handle,
gcry_ac_key_t key,
gcry_mpi_t data,
- gcry_ac_data_t *data_signature);
+ gcry_ac_data_t *data_signature)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Verify that the signature contained in the data set DATA_SIGNATURE
is indeed the result of signing the data contained in DATA with the
@@ -1557,7 +1587,8 @@ gcry_error_t gcry_ac_data_sign (gcry_ac_handle_t handle,
gcry_error_t gcry_ac_data_verify (gcry_ac_handle_t handle,
gcry_ac_key_t key,
gcry_mpi_t data,
- gcry_ac_data_t data_signature);
+ gcry_ac_data_t data_signature)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Encrypts the plain text readable from IO_MESSAGE through HANDLE
with the public key KEY according to SCHEME, FLAGS and OPTS. If
@@ -1569,7 +1600,8 @@ gcry_error_t gcry_ac_data_encrypt_scheme (gcry_ac_handle_t handle,
unsigned int flags, void *opts,
gcry_ac_key_t key,
gcry_ac_io_t *io_message,
- gcry_ac_io_t *io_cipher);
+ gcry_ac_io_t *io_cipher)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Decrypts the cipher text readable from IO_CIPHER through HANDLE
with the secret key KEY according to SCHEME, @var{flags} and OPTS.
@@ -1581,7 +1613,8 @@ gcry_error_t gcry_ac_data_decrypt_scheme (gcry_ac_handle_t handle,
unsigned int flags, void *opts,
gcry_ac_key_t key,
gcry_ac_io_t *io_cipher,
- gcry_ac_io_t *io_message);
+ gcry_ac_io_t *io_message)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Signs the message readable from IO_MESSAGE through HANDLE with the
secret key KEY according to SCHEME, FLAGS and OPTS. If OPTS is not
@@ -1593,7 +1626,8 @@ gcry_error_t gcry_ac_data_sign_scheme (gcry_ac_handle_t handle,
unsigned int flags, void *opts,
gcry_ac_key_t key,
gcry_ac_io_t *io_message,
- gcry_ac_io_t *io_signature);
+ gcry_ac_io_t *io_signature)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Verifies through HANDLE that the signature readable from
IO_SIGNATURE is indeed the result of signing the message readable
@@ -1606,12 +1640,12 @@ gcry_error_t gcry_ac_data_verify_scheme (gcry_ac_handle_t handle,
unsigned int flags, void *opts,
gcry_ac_key_t key,
gcry_ac_io_t *io_message,
- gcry_ac_io_t *io_signature);
+ gcry_ac_io_t *io_signature)
+ /* */ _GCRY_ATTR_INTERNAL;
/* Store the textual representation of the algorithm whose id is given
in ALGORITHM in NAME. This function is deprecated; use
gcry_pk_algo_name. */
-#ifndef GCRYPT_NO_DEPRECATED
gcry_error_t gcry_ac_id_to_name (gcry_ac_id_t algorithm,
const char **name)
/* */ _GCRY_GCC_ATTR_DEPRECATED;
@@ -1621,7 +1655,7 @@ gcry_error_t gcry_ac_id_to_name (gcry_ac_id_t algorithm,
gcry_error_t gcry_ac_name_to_id (const char *name,
gcry_ac_id_t *algorithm)
/* */ _GCRY_GCC_ATTR_DEPRECATED;
-#endif
+#endif /*GCRYPT_NO_DEPRECATED*/
/************************************
diff --git a/src/visibility.h b/src/visibility.h
index 6a054c5c..ea00b89c 100644
--- a/src/visibility.h
+++ b/src/visibility.h
@@ -239,6 +239,97 @@
deprecated attribute. */
# define GCRYPT_NO_DEPRECATED
# include "gcrypt.h"
+/* The algorithm IDs. */
+ gcry_error_t gcry_ac_data_new (gcry_ac_data_t *data);
+ void gcry_ac_data_destroy (gcry_ac_data_t data);
+ gcry_error_t gcry_ac_data_copy (gcry_ac_data_t *data_cp,
+ gcry_ac_data_t data);
+ unsigned int gcry_ac_data_length (gcry_ac_data_t data);
+ void gcry_ac_data_clear (gcry_ac_data_t data);
+ gcry_error_t gcry_ac_data_set (gcry_ac_data_t data, unsigned int flags,
+ const char *name, gcry_mpi_t mpi);
+ gcry_error_t gcry_ac_data_get_name (gcry_ac_data_t data, unsigned int flags,
+ const char *name, gcry_mpi_t *mpi);
+ gcry_error_t gcry_ac_data_get_index (gcry_ac_data_t data, unsigned int flags,
+ unsigned int idx,
+ const char **name, gcry_mpi_t *mpi);
+ gcry_error_t gcry_ac_data_to_sexp (gcry_ac_data_t data, gcry_sexp_t *sexp,
+ const char **identifiers);
+ gcry_error_t gcry_ac_data_from_sexp (gcry_ac_data_t *data, gcry_sexp_t sexp,
+ const char **identifiers);
+ void gcry_ac_io_init (gcry_ac_io_t *ac_io, gcry_ac_io_mode_t mode,
+ gcry_ac_io_type_t type, ...);
+ void gcry_ac_io_init_va (gcry_ac_io_t *ac_io, gcry_ac_io_mode_t mode,
+ gcry_ac_io_type_t type, va_list ap);
+ gcry_error_t gcry_ac_open (gcry_ac_handle_t *handle,
+ gcry_ac_id_t algorithm, unsigned int flags);
+ void gcry_ac_close (gcry_ac_handle_t handle);
+ gcry_error_t gcry_ac_key_init (gcry_ac_key_t *key, gcry_ac_handle_t handle,
+ gcry_ac_key_type_t type, gcry_ac_data_t data);
+ gcry_error_t gcry_ac_key_pair_generate (gcry_ac_handle_t handle,
+ unsigned int nbits, void *spec,
+ gcry_ac_key_pair_t *key_pair,
+ gcry_mpi_t **misc_data);
+ gcry_ac_key_t gcry_ac_key_pair_extract (gcry_ac_key_pair_t key_pair,
+ gcry_ac_key_type_t which);
+ gcry_ac_data_t gcry_ac_key_data_get (gcry_ac_key_t key);
+ gcry_error_t gcry_ac_key_test (gcry_ac_handle_t handle, gcry_ac_key_t key);
+ gcry_error_t gcry_ac_key_get_nbits (gcry_ac_handle_t handle,
+ gcry_ac_key_t key, unsigned int *nbits);
+ gcry_error_t gcry_ac_key_get_grip (gcry_ac_handle_t handle, gcry_ac_key_t key,
+ unsigned char *key_grip);
+ void gcry_ac_key_destroy (gcry_ac_key_t key);
+ void gcry_ac_key_pair_destroy (gcry_ac_key_pair_t key_pair);
+ gcry_error_t gcry_ac_data_encode (gcry_ac_em_t method,
+ unsigned int flags, void *options,
+ gcry_ac_io_t *io_read,
+ gcry_ac_io_t *io_write);
+ gcry_error_t gcry_ac_data_decode (gcry_ac_em_t method,
+ unsigned int flags, void *options,
+ gcry_ac_io_t *io_read,
+ gcry_ac_io_t *io_write);
+ gcry_error_t gcry_ac_data_encrypt (gcry_ac_handle_t handle,
+ unsigned int flags,
+ gcry_ac_key_t key,
+ gcry_mpi_t data_plain,
+ gcry_ac_data_t *data_encrypted);
+ gcry_error_t gcry_ac_data_decrypt (gcry_ac_handle_t handle,
+ unsigned int flags,
+ gcry_ac_key_t key,
+ gcry_mpi_t *data_plain,
+ gcry_ac_data_t data_encrypted);
+ gcry_error_t gcry_ac_data_sign (gcry_ac_handle_t handle,
+ gcry_ac_key_t key,
+ gcry_mpi_t data,
+ gcry_ac_data_t *data_signature);
+ gcry_error_t gcry_ac_data_verify (gcry_ac_handle_t handle,
+ gcry_ac_key_t key,
+ gcry_mpi_t data,
+ gcry_ac_data_t data_signature);
+ gcry_error_t gcry_ac_data_encrypt_scheme (gcry_ac_handle_t handle,
+ gcry_ac_scheme_t scheme,
+ unsigned int flags, void *opts,
+ gcry_ac_key_t key,
+ gcry_ac_io_t *io_message,
+ gcry_ac_io_t *io_cipher);
+ gcry_error_t gcry_ac_data_decrypt_scheme (gcry_ac_handle_t handle,
+ gcry_ac_scheme_t scheme,
+ unsigned int flags, void *opts,
+ gcry_ac_key_t key,
+ gcry_ac_io_t *io_cipher,
+ gcry_ac_io_t *io_message);
+ gcry_error_t gcry_ac_data_sign_scheme (gcry_ac_handle_t handle,
+ gcry_ac_scheme_t scheme,
+ unsigned int flags, void *opts,
+ gcry_ac_key_t key,
+ gcry_ac_io_t *io_message,
+ gcry_ac_io_t *io_signature);
+ gcry_error_t gcry_ac_data_verify_scheme (gcry_ac_handle_t handle,
+ gcry_ac_scheme_t scheme,
+ unsigned int flags, void *opts,
+ gcry_ac_key_t key,
+ gcry_ac_io_t *io_message,
+ gcry_ac_io_t *io_signature);
gcry_error_t gcry_ac_id_to_name (gcry_ac_id_t algorithm, const char **name);
gcry_error_t gcry_ac_name_to_id (const char *name, gcry_ac_id_t *algorithm);
#else