summaryrefslogtreecommitdiff
path: root/crypto/asymmetric_keys/asymmetric_keys.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2012-09-13 14:17:21 (GMT)
committerRusty Russell <rusty@rustcorp.com.au>2012-10-08 03:20:12 (GMT)
commit964f3b3bf49eb84b5831121446a28b76de3fb23a (patch)
tree7d299f690c8323c931b59bc142c45ac75097963f /crypto/asymmetric_keys/asymmetric_keys.h
parent9a83b46578df149160b1da057656d2f0cfcbb5b6 (diff)
downloadlinux-fsl-qoriq-964f3b3bf49eb84b5831121446a28b76de3fb23a.tar.xz
KEYS: Implement asymmetric key type
Create a key type that can be used to represent an asymmetric key type for use in appropriate cryptographic operations, such as encryption, decryption, signature generation and signature verification. The key type is "asymmetric" and can provide access to a variety of cryptographic algorithms. Possibly, this would be better as "public_key" - but that has the disadvantage that "public key" is an overloaded term. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'crypto/asymmetric_keys/asymmetric_keys.h')
-rw-r--r--crypto/asymmetric_keys/asymmetric_keys.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/crypto/asymmetric_keys/asymmetric_keys.h b/crypto/asymmetric_keys/asymmetric_keys.h
new file mode 100644
index 0000000..515b634
--- /dev/null
+++ b/crypto/asymmetric_keys/asymmetric_keys.h
@@ -0,0 +1,15 @@
+/* Internal definitions for asymmetric key type
+ *
+ * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+
+static inline const char *asymmetric_key_id(const struct key *key)
+{
+ return key->type_data.p[1];
+}