summaryrefslogtreecommitdiffstats
path: root/ncr-pk.h
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2010-09-06 17:18:08 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2010-09-06 17:18:41 +0200
commit943f9ab50c110133a5cd1118b5b19cb09301168f (patch)
tree1cef7570d78539ad84de9ce81debb4dc12188df5 /ncr-pk.h
parentdf05d27b761295820f3b13ec31c67c0ab0198bfc (diff)
downloadcryptodev-linux-943f9ab50c110133a5cd1118b5b19cb09301168f.tar.gz
cryptodev-linux-943f9ab50c110133a5cd1118b5b19cb09301168f.tar.xz
cryptodev-linux-943f9ab50c110133a5cd1118b5b19cb09301168f.zip
run scripts/Lindent.
Diffstat (limited to 'ncr-pk.h')
-rw-r--r--ncr-pk.h61
1 files changed, 32 insertions, 29 deletions
diff --git a/ncr-pk.h b/ncr-pk.h
index fb9aba5..c8d61cb 100644
--- a/ncr-pk.h
+++ b/ncr-pk.h
@@ -6,54 +6,57 @@
struct nlattr;
struct ncr_pk_ctx {
- const struct algo_properties_st *algorithm; /* algorithm */
-
- const struct algo_properties_st *sign_hash; /* for verification */
-
+ const struct algo_properties_st *algorithm; /* algorithm */
+
+ const struct algo_properties_st *sign_hash; /* for verification */
+
const struct algo_properties_st *oaep_hash;
- int salt_len; /* for RSA-PSS signatures */
-
- int type; /* libtomcrypt type */
- int init; /* non zero if initialized */
-
- struct key_item_st * key;
+ int salt_len; /* for RSA-PSS signatures */
+
+ int type; /* libtomcrypt type */
+ int init; /* non zero if initialized */
+
+ struct key_item_st *key;
};
/* PK */
-void ncr_pk_clear(struct key_item_st* key);
+void ncr_pk_clear(struct key_item_st *key);
int ncr_pk_generate(const struct algo_properties_st *algo, struct nlattr *tb[],
- struct key_item_st* private, struct key_item_st* public);
-int ncr_pk_pack( const struct key_item_st * key, uint8_t * packed, uint32_t * packed_size);
-int ncr_pk_unpack( struct key_item_st * key, const void * packed, size_t packed_size);
+ struct key_item_st *private, struct key_item_st *public);
+int ncr_pk_pack(const struct key_item_st *key, uint8_t * packed,
+ uint32_t * packed_size);
+int ncr_pk_unpack(struct key_item_st *key, const void *packed,
+ size_t packed_size);
/* encryption/decryption */
int ncr_pk_cipher_init(const struct algo_properties_st *algo,
- struct ncr_pk_ctx* ctx, struct nlattr *tb[],
+ struct ncr_pk_ctx *ctx, struct nlattr *tb[],
struct key_item_st *key,
const struct algo_properties_st *sign_hash);
-void ncr_pk_cipher_deinit(struct ncr_pk_ctx* ctx);
+void ncr_pk_cipher_deinit(struct ncr_pk_ctx *ctx);
-int ncr_pk_cipher_encrypt(const struct ncr_pk_ctx* ctx,
- const struct scatterlist* isg, unsigned int isg_cnt, size_t isg_size,
- struct scatterlist *osg, unsigned int osg_cnt, size_t* osg_size);
+int ncr_pk_cipher_encrypt(const struct ncr_pk_ctx *ctx,
+ const struct scatterlist *isg, unsigned int isg_cnt,
+ size_t isg_size, struct scatterlist *osg,
+ unsigned int osg_cnt, size_t * osg_size);
-int ncr_pk_cipher_decrypt(const struct ncr_pk_ctx* ctx,
- const struct scatterlist* isg, unsigned int isg_cnt, size_t isg_size,
- struct scatterlist *osg, unsigned int osg_cnt, size_t* osg_size);
+int ncr_pk_cipher_decrypt(const struct ncr_pk_ctx *ctx,
+ const struct scatterlist *isg, unsigned int isg_cnt,
+ size_t isg_size, struct scatterlist *osg,
+ unsigned int osg_cnt, size_t * osg_size);
int ncr_pk_cipher_sign(const struct ncr_pk_ctx *ctx, const void *hash,
- size_t hash_size, void *sig, size_t *sig_size);
-
-int ncr_pk_cipher_verify(const struct ncr_pk_ctx* ctx, const void *sig,
+ size_t hash_size, void *sig, size_t * sig_size);
+
+int ncr_pk_cipher_verify(const struct ncr_pk_ctx *ctx, const void *sig,
size_t sig_size, const void *hash, size_t hash_size);
int _ncr_tomerr(int err);
-int ncr_pk_derive(struct key_item_st* newkey, struct key_item_st* oldkey,
+int ncr_pk_derive(struct key_item_st *newkey, struct key_item_st *oldkey,
struct nlattr *tb[]);
-int ncr_pk_get_rsa_size( rsa_key* key);
-int ncr_pk_get_dsa_size( dsa_key* key);
-
+int ncr_pk_get_rsa_size(rsa_key * key);
+int ncr_pk_get_dsa_size(dsa_key * key);
#endif