diff options
author | David Howells <dhowells@redhat.com> | 2012-09-13 15:17:21 +0100 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-10-08 13:50:12 +1030 |
commit | 964f3b3bf49eb84b5831121446a28b76de3fb23a (patch) | |
tree | 7d299f690c8323c931b59bc142c45ac75097963f /crypto/asymmetric_keys/asymmetric_keys.h | |
parent | 9a83b46578df149160b1da057656d2f0cfcbb5b6 (diff) | |
download | linux-964f3b3bf49eb84b5831121446a28b76de3fb23a.tar.gz linux-964f3b3bf49eb84b5831121446a28b76de3fb23a.tar.bz2 linux-964f3b3bf49eb84b5831121446a28b76de3fb23a.zip |
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.h | 15 |
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 000000000000..515b63430812 --- /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]; +} |